My own action adventure engine

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
VideroBoy
Party member
Posts: 102
Joined: Wed Mar 31, 2010 6:12 pm
Location: Canada

Re: Action adventure game map test

Post by VideroBoy » Sat Sep 04, 2010 1:47 pm

What about now?
SpaceNinja.love
Alpha Three
(2.57 MiB) Downloaded 90 times
Also, the player sprite is a stand-in until I'm able to create the real sprite with animations and everything.

User avatar
Jasoco
Inner party member
Posts: 3653
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Action adventure game map test

Post by Jasoco » Sat Sep 04, 2010 7:40 pm

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.

User avatar
thelinx
The Strongest
Posts: 848
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: Action adventure game map test

Post by thelinx » Sat Sep 04, 2010 10:57 pm

Please remove the fsaa..

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Action adventure game map test

Post by Robin » Sat Sep 04, 2010 11:29 pm

thelinx wrote:Please remove the fsaa..
Luckily/hopefully, those problems will all be over in 0.7.0.
Help us help you: attach a .love.

User avatar
VideroBoy
Party member
Posts: 102
Joined: Wed Mar 31, 2010 6:12 pm
Location: Canada

Re: Action adventure game map test

Post by VideroBoy » Sun Sep 05, 2010 2:29 am

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

User avatar
Luiji
Party member
Posts: 396
Joined: Mon May 17, 2010 6:59 pm

Re: Action adventure game map test

Post by Luiji » Sun Sep 05, 2010 5:01 pm

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.

User avatar
Jasoco
Inner party member
Posts: 3653
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Action adventure game map test

Post by Jasoco » Sun Sep 05, 2010 7:49 pm

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.

User avatar
VideroBoy
Party member
Posts: 102
Joined: Wed Mar 31, 2010 6:12 pm
Location: Canada

Re: Action adventure game map test

Post by VideroBoy » Sun Sep 05, 2010 8:59 pm

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

User avatar
Luiji
Party member
Posts: 396
Joined: Mon May 17, 2010 6:59 pm

Re: Action adventure game map test

Post by Luiji » Sun Sep 05, 2010 10:09 pm

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.

User avatar
Jasoco
Inner party member
Posts: 3653
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Action adventure game map test

Post by Jasoco » Mon Sep 06, 2010 2:37 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 41 guests