Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Peril of Alchemy [2D Platformer - WIP]  (Read 5129 times)
0 Members and 1 Guest are viewing this topic.
Offline UprightPath
« Posted 2012-06-20 09:19:26 »

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.

Offline Gjallar

JGO Coder


Medals: 13
Projects: 1


Follower of Nurgle


« Reply #1 - Posted 2012-06-20 11:35:17 »

Why do people always use X and Z :/

Some keyboards have a different layout where the Z and Y keys are switched, including my humble self :p
Offline UprightPath
« Reply #2 - Posted 2012-06-20 11:39:32 »

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?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 744
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #3 - Posted 2012-06-20 13:46:05 »

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.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline UprightPath
« Reply #4 - Posted 2012-06-20 13:56:18 »

Definitely planning on doing that shortly. Cheesy

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

Offline Rorkien
« Reply #5 - Posted 2012-06-20 19:02:18 »

It kinda reminds me of Doom2D
Oh, the memories Undecided

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

Offline matheus23

JGO Kernel


Medals: 106
Projects: 3


You think about my Avatar right now!


« Reply #6 - Posted 2012-06-20 19:21:34 »

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
$ 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

Sad

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline UprightPath
« Reply #7 - Posted 2012-06-20 22:40:51 »

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.

Offline UprightPath
« Reply #8 - Posted 2012-06-21 01:42:47 »

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
$ 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

Sad

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.)

Offline StumpyStrust
« Reply #9 - Posted 2012-06-21 09:40:19 »

The collision detection it is spot on.  Grin

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?  Undecided

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

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

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline UprightPath
« Reply #10 - Posted 2012-06-21 09:49:17 »

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.

Offline gouessej
« Reply #11 - Posted 2012-06-26 23:42:14 »

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.

Offline UprightPath
« Reply #12 - Posted 2012-06-29 06:19:14 »

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.

Offline cawthorne

Senior Newbie


Medals: 2
Projects: 1



« Reply #13 - Posted 2012-06-30 13:22:31 »

I really like the look! I can't seem to control it very well,but that's probably me just being bad Tongue. 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 Tongue.

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 Tongue. I'm kind of a noob when it comes to GUI.
Offline UprightPath
« Reply #14 - Posted 2012-06-30 14:15:19 »

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.

Online Roquen
« Reply #15 - Posted 2012-06-30 14:35:11 »

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.
You could always lock-out all of the French members until they send in a photo of their qwerty keyboard.
Offline UprightPath
« Reply #16 - Posted 2012-06-30 14:51:40 »

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.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

E.R. Fleming (15 views)
2014-07-29 03:07:13

E.R. Fleming (5 views)
2014-07-29 03:06:25

pw (39 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (26 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21

Zero Volt (50 views)
2014-07-17 23:47:54

danieldean (42 views)
2014-07-17 23:41:23

MustardPeter (44 views)
2014-07-16 23:30:00
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!