Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Maps that arent tiled

Author
Message
Vid
21
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: United States
Posted: 26th Jun 2003 02:56
Ok here's a question i have not seen around, maybe because the answer is really easy and im blanking, or its just because no one uses this technique.

I want to map a map creation tool for my game, its an overhead RPG, the problem is, the tiles are not square. So im not sure if the whole "Data" and "Read" ordeal is the correct process. To further advance and complcate things, the game is 2 main layers, the ground to walk on(grass, dirt, so forth) and the second layer is objects (player, trees, tools, anything interactive). Any one have any ideas on how i would go about this? I dont need exact code, explanation or psuedo-code is just fine...

Thnx
-ViD-
Vid
21
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: United States
Posted: 26th Jun 2003 03:10
Also, kinda related, if you using a map editor that was editting with perfectly square tiles, and you were going to save the map, would you save it into a text file that would be read by DB, because that would suck if you had like100 maps, there would be a hell of a lot of text files and people can tamper with them

thanks again
CrayZemon
20
Years of Service
User Offline
Joined: 16th Jun 2003
Location: United States
Posted: 27th Jun 2003 00:14
If the tiles are not square then what are they. Hexagonal?

"I need gopher-chucks!!"
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 27th Jun 2003 11:17
you could save the info on the tile positions into an array, they can't be viewed in a text editor. i suppose the best way to do it would be to record the position of every tile and write it all to another file, so in your editor you could click to place a tile, record its position and tile number/type the when you finish save it into an array

hi guys
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 27th Jun 2003 12:00
If your man is standing on a square using a normal map (Square) then he is surrounded by 8 tiles. So the Array would be like.....


man stands on square 6*6 he can attack

5*5,5*6,5*7,6*5,6*7,7*5,7*6,7*7 = 8 tiles.

If you have hexagonal tiles he can only attack 6 places, so you need a different kind of map. The square map would go like this..


Row 1 = 3 tiles
Row 2 = 3 tiles
Row 3 = 3 tiles

All equal!

A Hexagon map would go like this

Row 1 = 3 tiles
Row 2 = 1 tile
Row 3 = 3 tiles

The array for row 2 would be a system of...

Skip a tile
Add a tile
Skip a tile
Add a tile
Skip a tile
Add a tile

Do you see how your mapper has to skip a tile on all Even numbered vertical alligned tiles in your map!

I hope this makes sense to you.


Pincho.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 27th Jun 2003 14:11
If you mean you are just drawing to the screen randomly like a drawing, then you are just creating problems for yourself. You should copy and paste all your collision graphics to real grid positions..32*32 or 16*16. That is the easiest/Fastest/Less memory hungry way to make the map. It does not have to be perfect 32*32 squares, but your man will stop walking when he reaches 32*32 positions, but that is OK.

Login to post a reply

Server time is: 2024-03-29 15:36:00
Your offset time is: 2024-03-29 15:36:00