Page 2 of 7

Re: Action adventure game map test

Posted: Sat Sep 04, 2010 1:47 pm
by VideroBoy
What about now?
SpaceNinja.love
Alpha Three
(2.57 MiB) Downloaded 239 times
Also, the player sprite is a stand-in until I'm able to create the real sprite with animations and everything.

Re: Action adventure game map test

Posted: Sat Sep 04, 2010 7:40 pm
by Jasoco
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

Posted: Sat Sep 04, 2010 10:57 pm
by thelinx
Please remove the fsaa..

Re: Action adventure game map test

Posted: Sat Sep 04, 2010 11:29 pm
by Robin
thelinx wrote:Please remove the fsaa..
Luckily/hopefully, those problems will all be over in 0.7.0.

Re: Action adventure game map test

Posted: Sun Sep 05, 2010 2:29 am
by VideroBoy
thelinx wrote:Please remove the fsaa..
I never set the fsaa. Doesn't it default to zero? :(

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

Posted: Sun Sep 05, 2010 5:01 pm
by Luiji
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.

Re: Action adventure game map test

Posted: Sun Sep 05, 2010 7:49 pm
by Jasoco
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.

Re: Action adventure game map test

Posted: Sun Sep 05, 2010 8:59 pm
by VideroBoy
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.)

Re: Action adventure game map test

Posted: Sun Sep 05, 2010 10:09 pm
by Luiji
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.

Re: Action adventure game map test

Posted: Mon Sep 06, 2010 2:37 am
by Jasoco
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.