-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|51|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> Maps and Levels


 
Pakz
Created : 21 February 2024
Edited : 21 February 2024
Language : Javascript

2d polygon isometric tile map with height

Just like powermonger or populous






Back then I could not figure out how to program a game level like in Populous or even Powermonger. This time I figured out that using a wireframe as a base. And having the points that connect the tiles between each neighbor inside a array. Allows for being able to raise and lower terrain.

Each isometric tile here is a filled polygon. So keeping these interconnected allows for those height effects. Though Z ordering and overdrawing is another matter.

It took me 7 requests from GPT4 with various ideas on a isometric tile map to figure this out.


There is one function that changes the neighbor values to connect to the changed point its value. This works for every point. Easy.





Small single point example

 

Comments


Wednesday, 21 February 2024, 15:20
Pakz
Short update : ( raising and lowering - requires touch device - the white top left button is switch lower/raise)