psVox

Author Topic: psVox  (Read 1468 times)



psVox is a pseudo-voxel system made for Blockland. It can be used to help with games where things in the world must be organised in a uniform, cellular manner.



Features
• Chunk system
• Block data system (works similarly to datablocks)
• Block object-based shape system
• Block properties system
• Block update system
• Block weight & cave-ins (wip in peace)
Simplex Noise terrain generator with caves (thanks to Brian Smith for some help here)
• Generation job handler
• Default building mechanic
• Voxel space searching
• Player-block interaction
• Builder object to handle planting blocks
• Some other stuff











Issues
• TorqueScript is slow. This is something that we can't fix, we just have to work with. Most of my time spent making this is probably done optimising things. If you find a way to make something more efficient, please do speak up.
• Somewhat related to the above, the current shape system is fairly poor. I'm probably going to redo it completely later on.



Application

Trench

Trench warfare has always been a favourite gamemode of mine. I figured this system would be perfect for re-imagining it. I plan on having randomly generated maps, with landscapes made using the simplex noise functions. Ideally, I would also implement cave-ins and destructive explosives. The gamemode would have much more convenient building mechanics that don't waste two tool slots for building.

Progress
• Trench map 'blueprint' generator, creates a battlefield and two connected team spawn points.
• Trench dirt-based building mechanic built off of the default psVox voxBuild mode.

Pretty much all that's left is to have it be a gamemode.










GitHub


early testing basic systems
early testing building mechanic

more visual stuff coming later
« Last Edit: June 06, 2014, 08:23:08 PM by otto-san »


I can tell you right now that if you want it to be really optimized your best bet is to avoid strings at all costs. I've had cases where using only integers instead of strings has sped up code by a factor of over 300%.

This includes things like scriptobjects, simsets, etc etc.
« Last Edit: June 06, 2014, 12:13:19 PM by Ipquarx »

I can tell you right now that if you want it to be really optimized your best bet is to avoid strings at all costs. I've had cases where using only integers instead of strings has sped up code by a factor of over 300%.

This includes things like scriptobjects, simsets, etc etc.
I'll keep that in mind, thanks for the tip.

edit:
I just added a more basic building method for simpler block shapes, and it's way faster. There's still room for improvement, but this is a great step.
« Last Edit: June 06, 2014, 02:11:34 PM by otto-san »

can you make this load .kv6 or .vox files

can you make this load .kv6 or .vox files
depends. if you can show me an example of what you're talking about i may be able to get a better idea
from what i'm seeing though, probably not. not in TS at least.
« Last Edit: June 06, 2014, 05:40:17 PM by otto-san »

can you make this load .kv6 or .vox files
I'm pretty sure KV6 is a binary file format, which means it can't be read by TS.