Optimization, properties, etc

Posted By: Carlos3DGS

Optimization, properties, etc - 02/10/11 22:13

Hi guys, Im working on a game thats kind of a mix of dungeon keeper and minecraft. For those that dont know them... lets just say that means levels/worlds created from simple blocks.
Dungeon Keeper:
http://www.youtube.com/watch?v=FsxJRpheNEE
Minecraft:
http://www.youtube.com/watch?v=qss4uy6C_g0

Currently im using squares just to test the framerate and it is waaaaay tooo low and takes a long time to gereate my level.
Im not using complicated models, just simple squares...


I was wondering if anyone knew a way to create entities withought all those fancy properties/skills/etc...
All I want is to create entities with the basic properties (x,y,z pan,tilt,roll and mabe a pointer or two...) Is that possible? Does anyone know how to do it?

Something else that would help me improve map perfomance would be for block behind eachother (not visible to player) to not be rendered. I read that the 3DGS engine does that automatically (I have A7 commercial). But it dosnt seem to be working... While it creates the cube models performance rapidly goes down so I'm guessing the not visible ones are also being rendered or something? Mabe it is because that only happens automatically when building the level? I use a null level for load and then generate the cubes with a script so I can create random worlds to explore...

Any help to remove entity properties and to hide not visible ones would be of great help.

I dont think its related to my PC performance as I have a 3Ghz Dual core, with 4Gb Dual Channel Ram, and 512 Mb of Video Memory.

At the moment for testing I am creating 50x50x50 = 125000 cubes. I know thats alot but its not even near what I need, im just doing it for testing and its insane... The blocks are very simple cubes with 16x16 pixel textures!

Any help would be greatly appreciated
Posted By: Sajeth

Re: Optimization, properties, etc - 02/10/11 22:15

This wont work with Acknex, I assume. Minecraft for example is also not working with vertices (for blocks at least).
Posted By: Logan

Re: Optimization, properties, etc - 02/10/11 22:59

For your question about not rendering blocks behind other blocks, this only works with a precompiled level, not dynamically created ones. So unfortunately you cannot have this done automatically with a level that is generated at runtime. The reason is, the calculations that determine what blocks are visible behind others are incredibly complex, sometimes taking a few days to compile a whole map. Obviously this is completely impossible to do effectively at runtime. It also only works with level geometry (I believe), not models or even map entities, so if you built a whole level from model cubes it wouldn't work anyway.*

*Don't quote me on this--I know it worked this way back in A6, but I'm not 100% sure anymore.
Posted By: JibbSmart

Re: Optimization, properties, etc - 02/10/11 23:14

Check out this thread and this thread for some older discussions on how one might get it to work efficiently in GS. It's possible, but takes some tricks.

Jibb
Posted By: Carlos3DGS

Re: Optimization, properties, etc - 02/10/11 23:17

Originally Posted By: Logan
For your question about not rendering blocks behind other blocks, this only works with a precompiled level, not dynamically created ones.


What if instead of making my world of "mdl models" I made small square "level blocks" and placed those with my script? Would it work then?

How about creating entities withought all that extra skills and flag stuff? That would also help reduce memory and increase performance? Anyone knows how that could be achieved?
Posted By: Carlos3DGS

Re: Optimization, properties, etc - 02/10/11 23:18

Originally Posted By: JulzMighty
Check out this thread and this thread for some older discussions on how one might get it to work efficiently in GS. It's possible, but takes some tricks.

Thanks! I'll take a look at those and get back to you guys tomorrow
Posted By: Logan

Re: Optimization, properties, etc - 02/11/11 00:35

As for your question RE what I said, unfortunately this won't work. The only way to get this optimization is to create the whole level in WED and click Build--i.e. it only works for pre-built, "set in stone" levels. Level geometry from WMB files that you create at runtime is the same as creating a level from MDLs or any other thing.
Posted By: Carlos3DGS

Re: Optimization, properties, etc - 02/11/11 14:52

Lots of good ideas in those threads, gonna be tough though, lets see what i can achieve.
Posted By: jenGs

Re: Optimization, properties, etc - 02/11/11 16:12

I am working at a voxel Terrain generator at the moment, so I know your problem:
How I am doing it:
- Acknex is able to load object files
- Wavefront obj is a very simple fileformat
- Get the Terraindata from somewhere (in my case Libnoise)
- slice this data in chunks (i am using 16 x 16 x 4 chunks)
- For every chunk write an *.obj file in a virtual filesystem
- If you do it right it is at least so fast, that you can add and remove voxel data per chunk
- You can't store so large arrays (perhaps you can in bitmaps). So you need a proper generation code for your terraindata and a level for when a block is filled or not filled

Only Texturing gives me headaches, because I always get an out of memory error ... why ... why ...
Posted By: lostzac

Re: Optimization, properties, etc - 02/11/11 18:43

I have something that may be able to help you , that I am planning on releasing to the community in a few days (just have to touch up the source code)..It is a random dungeon generation dll...

What it does it generate a text file map of a dungeon, from their I load it into 3dgs and read the chars...each char represents a tile block that is loaded into the level making a complete dungeon, the dll generates random size and layout...I am using this to make a rouge like game that is 3d....

Anyways as I said I will be releasing the source code and dll to the community tonight or tomorrow, and as it uses tile blocks to make the dungeon I thought it could help you with makeing your levels
© 2024 lite-C Forums