Slick Forums

Discuss the Slick 2D Library
It is currently Thu Aug 16, 2018 4:43 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue Sep 18, 2012 7:35 am 
Offline

Joined: Tue Sep 18, 2012 7:11 am
Posts: 1
Hello Everyone,
So, I have been looking into using slick2D and phys2D to build on a game idea I have. I have looked through the demo code and phys2D looks very easy to use and understand for a standard platformer style game. However, I want to build a semi-isometric brawler style game ... think Double Dragon, Final Fight, or Castle Crashers. What I am wondering is, can phys2D be used easily in a game like this? Allow me to elaborate:

My thought for the generic level layout was to have an area along, lets say, the bottom half of the screen. This area is the ground basically. The player can freely walk up or down in this area: (please pardon the crappy ascii art)
____________________________
\ \
\ x \
\____________________________\

The thing I am having trouble wrapping my head around is how I can use phys2D to handle the physics for, lets say, a character jumping. I understand applying a force in the y direction and gravity pulling the "body" back down, but I assume that in order to know when to stop falling, there needs to be a body to collide with in the "world". Referencing the "art" above, it seems to me as if I really need a "body" box for the character, and a bounding "line" for the lowest y coordinate of the character.

Without having written a scrap of code yet, I am just trying to think all of this through to see if I can pull off this style of game using phys2d. My thought was, unlike a platformer style game where non-passable tiles have a "body" shape that the character's "body" shape can collide with, I would need to have my character's "body" shape colliding with another box that followed him around and was always "under" him. This way, if he jumped forward, the "floor" body shape would simply change position to follow him around, giving him a physical "body" to collide with and land on. Later on I can add tiles that simulate varying heights that you can jump up onto, but baby steps first.

This approach seems reasonable to my, probably naive, mind since it would be somewhat similar to something like a moving platform in a platform game. This is just an invisible platform that follows the character around. I welcome any thoughts or advice! Perhaps there is a much simpler way to handle a game like this using phys2d and I just lack the knowledge to see it.

Thank you!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group