Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  I like smell of polygons in the morning  (Read 1682 times)
0 Members and 1 Guest are viewing this topic.
Offline JFixby
« Posted 2014-08-12 10:48:47 »

Hi everyone!

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


Step 1:
 Draw one png-file



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

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
 

dirt vs grass
 

grass vs snow
 

Step 4.
 Compose results from the step 3:



Step 5. Render it!
 

Check out these polygons!
 

Hope you like it!  Wink


Have a nice day
J

my dev log: http://jfix.by/
Offline quew8

JGO Coder


Medals: 29



« Reply #1 - Posted 2014-08-12 11:07:07 »

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.
Offline PandaMoniumHUN

JGO Coder


Medals: 32
Exp: 3 years


White-bearded OGL wizard


« Reply #2 - Posted 2014-08-12 12:19:21 »

Looks nice, I like it. Smiley
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?

My Blog | Jumpbutton Studio - INOP Programmer
Can't stress enough: Don't start game development until you haven't got the basics of programming down! Pointing
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline JFixby
« Reply #3 - Posted 2014-08-12 18:33:58 »

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.





Step 2: Turn-on grid to see sprites.



Step 3: Stretch everything 200% vertical.



Step 4: Rotate 45 degrees.



Step 5: Let’s see now





my dev log: http://jfix.by/
Offline JFixby
« Reply #4 - Posted 2014-08-16 23:15:42 »






a bit buggy, but you can see the concept

my dev log: http://jfix.by/
Offline CptSpike

Senior Member


Medals: 8
Projects: 1



« Reply #5 - Posted 2014-08-17 09:58:10 »

That's sexy
Offline lcass
« Reply #6 - Posted 2014-08-17 13:43:13 »

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.
Offline JFixby
« Reply #7 - Posted 2014-08-18 19:01:49 »

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


my dev log: http://jfix.by/
Pages: [1]
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

BurntPizza (14 views)
2014-09-21 02:42:18

BurntPizza (13 views)
2014-09-21 01:30:30

moogie (13 views)
2014-09-21 00:26:15

UprightPath (24 views)
2014-09-20 20:14:06

BurntPizza (27 views)
2014-09-19 03:14:18

Dwinin (40 views)
2014-09-12 09:08:26

Norakomi (70 views)
2014-09-10 13:57:51

TehJavaDev (96 views)
2014-09-10 06:39:09

Tekkerue (49 views)
2014-09-09 02:24:56

mitcheeb (70 views)
2014-09-08 06:06:29
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!