libGDX-based ISO

Hi everyone!

Just want to share some funny stuff I do on libGDX.

Step 1:
Draw one png-file


http://jfix.by/wp-content/uploads/2014/08/input-640x506.jpg

Step 2.
Read it as RGB-function and print to console in ASCII format:

http://jfix.by/wp-content/uploads/2014/08/rgb_function-640x560.jpg

Step 3.
Each color represents one type of terrain: grass, water, dirt or snow. Process the RGB function to extract material-joints (borders?)

water vs dirt

http://jfix.by/wp-content/uploads/2014/08/water-dirt-640x396.jpg

dirt vs grass

http://jfix.by/wp-content/uploads/2014/08/grass-dirt-640x396.jpg

grass vs snow

http://jfix.by/wp-content/uploads/2014/08/snow-grass-640x396.jpg

Step 4.
Compose results from the step 3:


http://jfix.by/wp-content/uploads/2014/08/combo-640x396.jpg

Step 5. Render it!

http://jfix.by/wp-content/uploads/2014/08/world_map3-640x416.jpg

Check out these polygons!

http://jfix.by/wp-content/uploads/2014/08/world_map4-640x424.jpg

Hope you like it! :wink:

Have a nice day
J

It’s elegant. But I kind of feel there should be a step 6 of rendering a navigable, 3D view of the terrain you create, otherwise what is the point of working out all those oh so pretty polygons. Also some of them look a little odd; I think I see some edges crossing terrain borders and maybe a couple of t-junctions (I presume you are meaning to avoid them). Looking at it in 3D is the only way to be sure they are working well I think.

Looks nice, I like it. :slight_smile:
Not sure how this could be put to use though, maybe it would be good for some sort of a roguelike mini-map, or you could generate vortex terrains using your output image.
What are you planning to use this for?

Thanx for comments.

Yep right now I’m working on the step 6: to tilt the surface and to see it through isometric view.

If you look at the picture (one with captions), you can distinguish a 14Patch pattern (usual 9patch for concave sprites and 5 more for convex). Basically I’m revers-engineering the StarEdit (StarCraft Map Editor)

Here are the steps I’m trying to revert:

Step 1: Start StarEdit and draw random level.


http://jfix.by/wp-content/uploads/2014/08/step-001-640x339.jpg

Step 2: Turn-on grid to see sprites.


http://jfix.by/wp-content/uploads/2014/08/step-002-640x339.jpg

Step 3: Stretch everything 200% vertical.


http://jfix.by/wp-content/uploads/2014/08/step-003-640x339.jpg

Step 4: Rotate 45 degrees.


http://jfix.by/wp-content/uploads/2014/08/step-004-640x339.jpg

Step 5: Let’s see now


http://jfix.by/wp-content/uploads/2014/08/step-005-640x339.jpg


http://jfix.by/wp-content/uploads/2014/08/buggy-640x346.jpg


http://jfix.by/wp-content/uploads/2014/08/buggy2-640x346.jpg

a bit buggy, but you can see the concept

That’s sexy

when you are converting to isometric , are you performing 3d calculations before or after you add the borders, because that might be causing the problem.Very nice though I like the feel of it.

This was just a mistake in the rotation’s matrix.
Here is the new update:


http://jfix.by/wp-content/uploads/2014/08/0-640x346.jpg

http://jfix.by/wp-content/uploads/2014/08/1-640x346.jpg

http://jfix.by/wp-content/uploads/2014/08/2-640x346.jpg

http://jfix.by/wp-content/uploads/2014/08/3-640x346.jpg

http://jfix.by/wp-content/uploads/2014/08/4-640x346.jpg

http://jfix.by/wp-content/uploads/2014/08/5-640x346.jpg

http://jfix.by/wp-content/uploads/2014/08/6-640x346.jpg

http://jfix.by/wp-content/uploads/2014/08/7-640x346.jpg

Just attaching the first rasterization attempt: http://jfix.by/wp-content/uploads/2014/11/raster.jpg

Wow, this is great! Keep up the good work man :slight_smile:

Here is a demo of the Map Editor:

6Opf4gVd2dY