Author Topic: Need tips to do a Dungeon Master type game  (Read 3808 times)

Wismerhill

  • Guest
Need tips to do a Dungeon Master type game
« on: May 12, 2005, 02:57:10 pm »
Hi,

I'm currently working on a Dungeon Master clone and I plan to provide a 3D rendered view using jPCT, even if the world and the player mouvements are  tiled.

My question is: how to best manage static map, i.e. the jPCT World ? Maps are likely to be 32 by 32 tiles. Should I create all the 3D tiles when loading a map ? Or should I reconstruct each visible 3D tile after each player's move (which means something like 9 tiles) ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Need tips to do a Dungeon Master type game
« Reply #1 on: May 12, 2005, 06:51:15 pm »
Recreating the tiles every step is too expensive IMHO. I suggest to create the complete level at startup and use an OcTree to subdivide it for faster processing/rendering. That's what i'm doing in Paradroidz (http://www.jpct.net/paradroidz). My maps are very similar to Dungeon Master layout...like this one:

Code: [Select]
**a*****************
*       d       d  *
********* *****d*  *********
        * *     *a**       *****
        *l*        d  l    d   a
        ***        *       *****
*********          *********
*       d          *
********************


I load the file at startup, parse it and create the Object3Ds required for it (in Paradroidz, i'm using one for the walls, one for the floor and one for the top level)...the result is something like this:



By creating the Object3Ds out of ASCII files, i'm free to increase wall tessellation if i want to (to increase vertex lighting quality for example).

BTW: The basic ASCII-level-loader was written with a kind of Dungeon Master clone in mind...because that was what i was planning to do before i decided to switch to a Paradroid clone. That's why Paradroidz's JAR file is still named Naroth: I wanted to write a successor of my old Amiga RPG (http://amiga.emucamp.com/quelle.htm)

Wismerhill

  • Guest
Need tips to do a Dungeon Master type game
« Reply #2 on: May 13, 2005, 03:25:47 pm »
Thank you very much. That was what I was thinking but I wanted to be sure.

I hope constructing a whole level is not too long, I'll have to test that. Maybe it can be done in a background thread to accelerate level transitions.

How do you alter wall tessellation ? Do you have a library of wall objects or are they constructed at runtime using primitives ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Need tips to do a Dungeon Master type game
« Reply #3 on: May 13, 2005, 03:49:53 pm »
Quote from: "Wismerhill"
I hope constructing a whole level is not too long, I'll have to test that. Maybe it can be done in a background thread to accelerate level transitions.
Should be fast enough unless your levels are really large...

Quote from: "Wismerhill"
How do you alter wall tessellation ? Do you have a library of wall objects or are they constructed at runtime using primitives ?
I'm creating them with the desired tessellation at load time from simple triangles, i.e. addTriangle(...) in Object3D.

Wismerhill

  • Guest
Need tips to do a Dungeon Master type game
« Reply #4 on: May 18, 2005, 11:56:31 am »
Thank you, very much appreciated. I'll come back with a demo ASAP.