Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (636)
Games in Android Showcase (178)
games submitted by our members
Games in WIP (686)
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 3528 times)
0 Members and 1 Guest are viewing this topic.
Offline builderchad

Junior Newbie

« Posted 2005-06-20 06: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-26 23:58:03 »

Suggestion: The best bookm on Isometric games I know is TANSTAAFL's
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!
Offline Jeff

JGO Coder

Got any cats?

« Reply #2 - Posted 2005-06-26 23: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!
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Dwinin (63 views)
2015-11-07 13:29:08

Rems19 (77 views)
2015-10-31 01:36:56

Rems19 (69 views)
2015-10-31 01:32:37

williamwoles (104 views)
2015-10-23 10:42:59

williamwoles (91 views)
2015-10-23 10:42:45

Jervac_ (105 views)
2015-10-18 23:29:12

DarkCart (132 views)
2015-10-16 00:58:11

KaiHH (115 views)
2015-10-11 14:10:14

KaiHH (153 views)
2015-10-11 13:26:18

BurntPizza (167 views)
2015-10-08 03:11:46
Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30

Rendering resources
by Roquen
2015-10-15 07:40:48

Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11 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‑
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!