Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
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  
  3D tile engine  (Read 1803 times)
0 Members and 1 Guest are viewing this topic.
Offline builderchad

Junior Newbie





« Posted 2005-06-20 08:24:45 »

I have been trying for a while now to figure out the best way to write a 3D tile engine using one of the scene graph APIs (like JME, Java3D, Xith etc).  I want to create a tile based terrain engine like the many found in isometric tile games but in 3D so the player has a limited movement of view and zoom from above and at a slight angle.  The game Civilization most closely resembles what I am aiming for.

I have played with heightmaps but the main problem I faced there is that I need a varying degree of detail from one tile to the next and heightmaps have a uniform level of detail.  So 'grassland' tiles should only be a few vertices, whereas a mountain should be 128 or 256 - each occupying the same amount of x,z area.  I then tried just creating tiles and mapping them out side by side but with around 60x60 tiles in view thats 3600 objects which the engine has to deal with and thats before I've started putting other details onto the terrain like units, cities, oilfields etc.  The total size of the maps need to be big (around 300x300 tiles) but I have realised I can only load a subset at any one time as trying to put that many objects into memory (even tried using a quadtree) is not feasible.  Anyway, mapping out the tiles side by side gave very poor results so I am looking for another solution.

I thought about grouping several tiles together into segments (e.g. 16x16) and handling those as chunks which could improve things as it would seriously reduce the number of objects the engine would need to deal with.  But I am still quite new to 3D and wouldnt know how to sew two tiles together that have different levels of detail (e.g. grassland with 2x2 vertices next to mountain with 16x16).  Also each segment of land could potentially end up having a huge number of vertices if all/most of the tiles were mountains (very unlikely but possible) so I am worried that having - as I calculated - around 100,000 vertices on screen at once would grind even a reasonable GPU to a halt once other details and units etc start to get added.

Cutting right to the chase, is there a reasonable solution or source code out there I can look at that implements this kind of thing?  I am currently using jME at the moment which seems very good but if someone has experience with either Java3D or Xith (or other) and is aware of some features in those APIs that might help me I would appreciate hearing about it. ...and any other general advice you might think would be useful I would appreciate very much too  Grin
Offline Jeff

JGO Coder




Got any cats?


« Reply #1 - Posted 2005-06-27 01:58:03 »

Suggestion: The best bookm on Isometric games I know is TANSTAAFL's
http://www.amazon.com/exec/obidos/tg/detail/-/0761530894/104-9864609-4399163?v=glance
Its a C/DirectX book but the alogrithyms are all easily portable to Java if you can read C code.

The last few chapters are all about implementing an isometric engine using Direct3D.


Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Jeff

JGO Coder




Got any cats?


« Reply #2 - Posted 2005-06-27 01:59:48 »

I shoudl add that NeverwinterNights is the only real-3D tiled game I knwo of.

Ive been developing an RPG engine that uses the NWN tiels and data.  Thats over in the JNWN project.  The lastest put back may not work a Im workign on the phydcis right now but if you cut the addition of the "PhysicsBehavior" in the RenderEngine class, you shoudl be able to build and run it.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (25 views)
2014-04-15 18:08:23

BurntPizza (20 views)
2014-04-15 03:46:01

UprightPath (36 views)
2014-04-14 17:39:50

UprightPath (18 views)
2014-04-14 17:35:47

Porlus (34 views)
2014-04-14 15:48:38

tom_mai78101 (60 views)
2014-04-10 04:04:31

BurntPizza (118 views)
2014-04-08 23:06:04

tom_mai78101 (218 views)
2014-04-05 13:34:39

trollwarrior1 (185 views)
2014-04-04 12:06:45

CJLetsGame (192 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!