This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Tile graphics engines


Tile graphics engines

Postby brendan » Feb 10, 2002 @ 11:57pm

User avatar
brendan
pm Insider
 
Posts: 451
Joined: Oct 23, 2001 @ 2:51am
Location: Hobart, Australia


Postby Dan East » Feb 11, 2002 @ 3:02am

You would use the exact same logic you are currently using. The smooth movement of an object from one tile to another is purely visual. You should test to see if the object is allowed to move to the destination tile before the move takes place. If the move is allowed, then draw several frames to smoothly animate the object's movement to the new tile. You should not accept input, etc, during the move - it has to complete before the next move can take place.

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


mmm

Postby brendan » Feb 11, 2002 @ 3:38am

OK, it's just that most rpg's etc allow you to move in smaller steps ? for example mario allow you to move the player part of a block etc, I'm sure I can rig the code to do what your saying but....
User avatar
brendan
pm Insider
 
Posts: 451
Joined: Oct 23, 2001 @ 2:51am
Location: Hobart, Australia


Postby MirekCz » Feb 11, 2002 @ 9:27am

brendan:well, diablo1 doesn't allow you to do so.
If you want smooth movement you can still try to do as Dan said but allow players to stop between blocks (althrought if they want to move again they must press a position near themselfs which isn't blocked)
Another approach is to use a small bittable which represents where you can go and where you can't. It could be either exact tile size, or much smaller (for ex. 4x4). Before a move you would check if it's allowed. This way you could make much smoother move esp. along a wall, around a small blocking object etc.

hope it helps
With best regards,
Mirek Czerwinski
User avatar
MirekCz
pm Member
 
Posts: 269
Joined: Sep 18, 2001 @ 6:42pm
Location: Poland,city Poznań


OK doky

Postby brendan » Feb 11, 2002 @ 10:13am

OK, I'll implement the code and see what it looks like, my game is not exactly a RPG etc, it's more like mario that anthing else.... I'll see how it goes....

-brendan
User avatar
brendan
pm Insider
 
Posts: 451
Joined: Oct 23, 2001 @ 2:51am
Location: Hobart, Australia


Postby refractor » Feb 11, 2002 @ 11:05am

Hello.

A general approach is to have a collision map that's similar to the main map. Then, you have a set of collision "tiles" the same size as your graphics tiles (these could be made up of 4, 8, 16, 32, blocks, *however many you need*):

A full tile
a /| tile
a |\ tile
a half-height tile
...
etc

Store them as triangles or boxes in an array. Then you can look up the entry in the collision data and check a point at the character's feet/head against the single box/triangle, which is very simple.

The collision map tends to be *much* more sparse than the main tile map, so you (c)/(s)hould use RLE compression on it to save space.


Another alternative, is to ignore the way the graphics are laid out in tiles and have a polygonal/circle - based collision system, where the characters walk on circles, triangles, boxes, etc of arbitrary size.


(P.s. I really wouldn't have the character only moving from block to block, that *really* sucks game-play wise).

Cheers,

Refractor.
User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

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