- SpaceNinja.love
- Alpha Three
- (2.57 MiB) Downloaded 239 times
My own action adventure engine
Re: Action adventure game map test
What about now?
Also, the player sprite is a stand-in until I'm able to create the real sprite with animations and everything.- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Action adventure game map test
Works great. But you need to deal with getting through small openings 1 tile wide. Most games simply nudge the player towards the opening 1 pixel at a time until it can fit through. Otherwise you end up not being able to get through because you're 1 or more pixels off center.
Re: Action adventure game map test
Please remove the fsaa..
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Action adventure game map test
Luckily/hopefully, those problems will all be over in 0.7.0.thelinx wrote:Please remove the fsaa..
Help us help you: attach a .love.
Re: Action adventure game map test
I never set the fsaa. Doesn't it default to zero?thelinx wrote:Please remove the fsaa..
Edit: Also, how hard is it to get through the one-tile wide hallways, Jasoco? I've been able to get in them by sliding along the wall (try moving horizontally and vertically at once), but how much of an issue is this?.
Re: Action adventure game map test
You should have it so that characters when pushing against the wall in a certain range for a doorway it slides them into it so nobody gets frustrated. I think Jasaco's RPG engine thing does that, now, so you might want to check it out and steel some code.
Good bye.
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Action adventure game map test
It's rudimentary though. Instead of only pushing through doorways it simply checks if you're pushing against something then nudges you to the nearest tile. I was trying to replicate what modern tile-based RPG's on systems like the iPhone (Check out the demo of Zenonia or Zenonia II) do where you can simply walk to a wall and keep going and the game will just move you to the doorway to help you not have to move around so much. It's important on the iPhone because of the limited control scheme.
When I check for collisions, I simply check 2 or 4 pixels less than the left side and right side or top and bottom (Well, not so much top and bottom since my player's hit area is only 16 pixels instead of 32 which is easier to get through a 32 pixel opening.) to allow for some leeway in getting through.
Look at games like Zelda: Link to the Past. (And all 2D Zelda's since) Notice if you are going into a doorway and are not exactly centered, it will push you to the center. This is what you need to accomplish. Games would be a lot harder if you had to be exact in placement of the player.
When I check for collisions, I simply check 2 or 4 pixels less than the left side and right side or top and bottom (Well, not so much top and bottom since my player's hit area is only 16 pixels instead of 32 which is easier to get through a 32 pixel opening.) to allow for some leeway in getting through.
Look at games like Zelda: Link to the Past. (And all 2D Zelda's since) Notice if you are going into a doorway and are not exactly centered, it will push you to the center. This is what you need to accomplish. Games would be a lot harder if you had to be exact in placement of the player.
Re: Action adventure game map test
So, whenever the player presses against the wall and there's an opening nearby, nudge him towards it. e.g. If the player is moving east against a wall, and there's an opening to the north, nudge the player north unless he is already moving diagonally (which causes the player to slide against the wall anyway).
I'm wondering how trivial this would be. First of all, nudging the player will still require a collision check. Also, the the player's size is not based on tiles, so he can be as big or small as I want. I could make his collision box bigger or smaller than a tile if I wanted, not to mention other actors of assorted sizes. So...how far do you guys want me to go on this?
I suppose I could also just avoid this by not having levels with one-tile wide openings. Or make the player smaller than a tile.
(Sorry if I'm being a stick-in-the-mud over this issue.)
I'm wondering how trivial this would be. First of all, nudging the player will still require a collision check. Also, the the player's size is not based on tiles, so he can be as big or small as I want. I could make his collision box bigger or smaller than a tile if I wanted, not to mention other actors of assorted sizes. So...how far do you guys want me to go on this?
I suppose I could also just avoid this by not having levels with one-tile wide openings. Or make the player smaller than a tile.
(Sorry if I'm being a stick-in-the-mud over this issue.)
Re: Action adventure game map test
You know, you could have your player get bigger at certain points (sort of like Mario but in a lesser extent) so that certain paths can only be taken when small. You could have some sort of shrinking totem or something.
Good bye.
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Action adventure game map test
My game already checks for pushing since it's used to trigger certain switches and move certain movable objects and enter doors. So I just add the nudge function to this.
Who is online
Users browsing this forum: No registered users and 12 guests