Peril of Alchemy [2D Platformer - WIP]

Well hello again!

I just wanted to post some screens from a game I’m calling ‘Peril of Alchemy’, which is a sort of genre shift sequel to my other game. I know, Puzzle to Platformer makes little sense, but oh-well. Anyway, I just finished writing a large portion of the game’s physics system, primarily the bits to do with player based control. There are still a few states missing, but for now… Well, it works.

I’m writing it using the libGDX framework to provide the graphics/input handling. The system is currently based on a AABB style collision handling, with a few other ideas tossed in.

Demo Here
Short Video Here
Controls Here

Questions/Advice
I’ve been kind of flip-flopping back and forth between how I want to handle various bits, mostly control wise. The opinion of people who actually play these games.

1) How to control Slide/Edge moved? Currently, I’m controlling it by by holding towards the face of the edge of the wall. The other options would be to make walls ‘sticky’, so that until you purposefully release (Jump or move in opposite direction) you stick to it or to assign a ‘Cling’ key, that determines whether you hold onto the wall.

My current method works fairly well except in the case of using parallel walls to jump upwards. This causes “fun” because if you jump off the wall (Jump or Jump+Up), and don’t release the directional key fast enough, your horizontal speed bleeds off. If you collide with the other wall (Losing all of your velocity) and you don’t let up, you end up falling a long way downwards due to the lack of acceleration while in the air.

2) How to implement ‘Double Jumps’? Currently, I’m adding a fixed velocity to the current velocity (You can only double jump near the apex of your jump). The other option would be to set Y velocity to the jump value.

My current method leads to some slightly weird visual effects. If you use it at the same same |velocityY|, you’ll get the same amount of up time regardless, but +velocityY results in a higher maximum posY than using it at -velocityY.

Sprite Information: The sprites that I’m using for the the character are taken from Teej’s Sheet.

Why do people always use X and Z :confused:

Some keyboards have a different layout where the Z and Y keys are switched, including my humble self :stuck_out_tongue:

Hmm, for me, it’s because I’m used to using z, x, a, s for key commands combined with the arrows.

What would be a better key combination for you?

Given the huge amount of odd keyboard layouts (like AZERTY), it’d probably be best to make keybindings configurable.

Definitely planning on doing that shortly. :smiley:

Especially since I’d like to customize this so it can be played on an Android. Hah.

It kinda reminds me of Doom2D
Oh, the memories :-\

It looks good actually, do you plan on removing those outlines?

$ java -jar PerilsOfAlchemy-v0.02.jar 
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load file: res/tiles-edged.png
        at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java:140)
        at com.badlogic.gdx.graphics.glutils.FileTextureData.prepare(FileTextureData.java:64)
        at com.badlogic.gdx.graphics.Texture.load(Texture.java:175)
        at com.badlogic.gdx.graphics.Texture.create(Texture.java:159)
        at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:133)
        at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:122)
        at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:118)
        at com.uprightpath.alchemy.peril.gui.ImageLoader.initialize(ImageLoader.java:89)
        at com.uprightpath.alchemy.peril.PerilsOfAlchemy.create(PerilsOfAlchemy.java:28)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:144)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:131)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: File not found: res/tiles-edged.png (Internal)
        at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:133)
        at com.badlogic.gdx.files.FileHandle.length(FileHandle.java:561)
        at com.badlogic.gdx.files.FileHandle.readBytes(FileHandle.java:221)
        at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java:137)
        ... 10 more
AL lib: ReleaseALC: 1 device not closed

:frowning:

Thank you Matheus, I’ll look into that.

And yes, the outlines where just there for when I was messing around with the collision detector system I was writing.

I figured out the issue there, and rebuilt/reuploaded it (See first post). Some how the Desktop project’s assets file (Which is created and linked up through the libGDX setup) wasn’t being loaded into the .jar. It could have been something I did, but either way, it should work correctly now. (And, I even fixed the .bat that I had been using. Hah.)

The collision detection it is spot on. ;D

Make the controls a little more responsive. Increase the friction between the player and the floor so when I stop, I slide but only a little. Make it so the player speeds up faster but does not go warp ten at maximum velocity.

The jumping felt odd but this may be because it takes so long for you guy to speed up. Maybe make the up arrow jump? :-\

I like the animations but they seemed to play a little too slow.

I looks really great. ;D I have always liked platformers where you can jump off walls like ninja or an assassin…

Yeah, I need to fiddle around with the friction issue.

The jumping was done intentionally that way, though I might mess with it to change the max/time it takes to get to the max. Movement in air is supposed to be somewhat difficult to control so that you have to plan your jumps and ensure you’re running fast enough to make them. The focus is going to be more around exploring areas, than fighting monsters, though there will be a bit of that.

Yeah, the animations are slow, and there’s supposed to be another when you get above a ground speed of 5.

Hi

I cannot play the video, I only get an error message “error playing video”. I’m under Mageia Linux 1, Firefox 10, Gnash 10. Do you plan to use an installer or an applet?

I agree with Gjallar.

Riven, azerty keyboards are not odd, they are commonly used in France. I would never say that qwerty keyboards are odd. Anyway, I agree with you, it would be better to make configurable key bindings.

Well, I can’t help you with the video. It’s an issue of tumblr’s player/your system then.

As for how I’m planning on doing it? I’m thinking installer at this point, rather than applet. Partially because I don’t have an website, and partially because the intended game itself is going to have quite a bit of local/save data.

The idea started off of something that someone had asked, earlier, about randomly generating a platforming game. So, after I spent some time making a generator, I decided to make a game to use it with (Though I’ll need to rewrite the generator to work with this game).

Basically, in game you’ll cause the generation of semi-random dungeons by arranging sigils on a map, that will then be used to generate the dungeon. The magic system’s also going to be based on this sigil arrangement system to some degree or another.

I really like the look! I can’t seem to control it very well,but that’s probably me just being bad :P. I have only really made grid based 2D games that utilise Jlabels and changing their background colour accordingly etc. But I’d really like to get into making real 2D games. I’ve heard of a few libraries, but not sure how to use them or anything really. Do you think you could point me in the right direction?

These games are the sort of level I’m at: http://www.java-gaming.org/topics/my-java-games-with-source-code-tetris-mineweeper-tron-etc/26759/view.html so I think I’m ready for it I just don’t know where to start :P.

That’s the annoying thing about programming, you can do the algorithms fine, but it’s learning the syntax to do it!

Thanks for any help :P. I’m kind of a noob when it comes to GUI.

For this game? I’m just using libGDX which is fairly good and intended to be cross-platform (With a focus on providing the ability to put it onto an Android and turn it into an HTML5 program). I did play around with Slick2D as well, which works pretty damn well too.

It really ends up depending on what you’re needing/trying to do.

You could always lock-out all of the French members until they send in a photo of their qwerty keyboard.

Yes, I could! Hwa hwa hwa.

I started to mess around with the guts of the system, because I wanted to include stuff like moving platforms, etc. And broke a lot of stuff in doing so. And I’m sort of on the fence about how I want to proceed with certain features in the game.

Like, do I want to keep the 64 degree slopes, which honestly cause issues with the collisions (Since they sort of show up as two ‘solid’ blocks.) If I do, I’m probably going to rewrite the entire code base for walking. Currently, it’s mostly based off the code that I’m using for ‘falling’, in that it handles collisions in the same way, etc. I’m thinking that I’ll rewrite it so that the map gets preprocessed and creates a bunch of walkable objects that I can clamp objects/entities to. Then, instead of having to perform a somewhat complicated set of checks to determine what the player’s standing on/whether they’re actually standing, I just check if they’ve moved off the walkable objects. I was also thinking of setting up walking collisions in much the same way, probably with end points being flags of either ‘Edge’ or ‘Wall’.

If I make something “clampable” like that, it’ll make doing things like adding moving platforms (Something that I was planning on doing) quite a bit easier, but I’m not sure exactly how I’m going to end up doing that. Heh.