Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Alundra Physics


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Thekill473   Members   -  Reputation: 213

Like
0Likes
Like

Posted 06 August 2012 - 12:55 AM

Well for awhile now I've had a physics/tile engine in mind but only until now I've found an example.
So I was wondering how would I accomplish something like this:


so far I've set up a system where the map is made up of Y-Levels much like stories in a building and then each Y-Level has layers to place different tiles on. Would that system work for something like this or has anybody got something better in mind.

Thanks for reading.

Sponsor:

#2 6677   Members   -  Reputation: 1058

Like
0Likes
Like

Posted 06 August 2012 - 03:54 AM

If you look carefully at that game its actually entirely flat. Walls etc are drawn as floor tiles. Falling off the wall is then a case of: "if player moving from above: allow through and push to next tile, else, don't allow", end result, you enter a "wall" tile and the character goes to fall animation and gets moved to the tile below it. Same would work for falling off the building at the beginning. Think the pokemon GBA games, clearly flat and always had that gym with the floor tiles that shot you off in a direction and those dirt ledges you could walk down but not up.

Clever art makes it look like there is height to it but in reality its not.

#3 Thekill473   Members   -  Reputation: 213

Like
0Likes
Like

Posted 06 August 2012 - 04:48 AM

But what would happen if I wanted objects that the player could walk over but also go under. for example a bridge. because one of the cities in my game is going to be pretty vertical.

#4 BeerNutts   Crossbones+   -  Reputation: 3017

Like
0Likes
Like

Posted 06 August 2012 - 11:55 AM

But what would happen if I wanted objects that the player could walk over but also go under. for example a bridge. because one of the cities in my game is going to be pretty vertical.


You would have to have that extra Z-layer (assuming X and Y are used for the actual tile drawings). So, you could have tiles at simultaneous X,Y location, but different Z-levels. What I would do is allow a player to traverse across a Z difference of 1 (going up or down stairs), but, that's it. If you have multiple tiles at the same X,Y, but varying Z, the player would only be able to go go to the tile with the same Z, or within 1.

For example, if a player going up, starts at 1,1,1 and ground tiles are at 1, 2, 1 & 1, 3, 1 and you have bridge tiles at 0, 2, 5 & 1, 2, 5 & 2, 2, 5, the player would be able to move "under" the bridge from 1, 1, 1 to 1, 3, 1 (walking under the bridge at 1, 2, 1).

If a player is at 0, 2, 5 moving right, he would walk across the bridge at 1, 2, 5and end up at 2, 2, 5.

That's how I'd do it atleast, using walkable tiles, wall tiles, and air tiles.
My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

#5 Thekill473   Members   -  Reputation: 213

Like
0Likes
Like

Posted 06 August 2012 - 04:50 PM

@BeerNuts
Yeah that's pretty much what I had except I called it Y-Levels... Up down I dunno the name made sense in my head. XD but I'm glad someone else had the same concept.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS