Some old voxel lighting code

Standard

If you look at some of the previous posts you will see this code or a variant of it in use. It may be useful to some. It is very much a hack and i hope to revisit it perhaps in c++ or java.

Lighting Test

Standard

Rewrote ambient occlusion and built a light spreading system.
This is a long way from NVIDIA’s new global illumination/maxwell ‘voxel’ based lighting i read about recently but I’m gradually improving the light system for this unity engine.

I still need to build a more efficient way to update chunks that have had light changed due to light spreading from another chunk.

I use a system of stacks (all chunks on vertical axis) and chunks. When a block is placed or removed the stack should have light recalculated and mesh rebuilt. If light values change in chunks not within this stack, then those chunks should be rebuilt. I’m probably still missing a few things but I’ll keep working on it.

Unity 5 Voxel Engine Update – Photon Multiplayer

Standard

more stuff here. more stuff to do. stuff..n stuff..

1. Implemented multiplayer chat with Photon from exit games. I’m not looking to implement full multiplayer yet but perhaps a town or village where people can meet in between battles. It will be easier to learn Photon this way and also give me a chance to clean up the code a bit.

2. Added a Shakespearean random name generator.

3. Rewrote mesh distortion, vastly simplified version. Still needs some adjustment.

TODO: debug everything, re-write lighting code, add new mobs, npcs

Unity Drag & Drop Slots-Inventory

Standard

Many of you seasoned unity pros out there are probably face-palming as you look at how I’ve approached this, but this is the method that is working for me at this point. I’m sure it will be revised in the future.

The script below is attached to all of my quickslot UI images. I use an extra “phantom” slot (dragImage & dragText) to play the part of the slot that is being dragged. so the actual slots or slot items don’t move, the slot data is just passed behind the scenes. If you have any q’s  you can contact me dev@nuzly.com. otherwise, i hope this is useful in some way.

Also, check out this tutorial for a good run down on a variation of the code below. It’s the tutorial that clued me into this method, also check the unity forums for some useful unity 4.6 > 5 info. (which is where i got the UI raycasting stuff.)

Unity Custom Particle System – Test #1

Standard

Below are the functions I’m using to set scale and color. This is the first attempt. It seems to work OK but perhaps it can be improved on;

unity3d voxel game engine test #6 (Zombies Part.2)

Standard

I really need to keep a change log or something for this. Created a bunch of zombie textures and more models in blender. Added female and fat zombies with differing, xp, damage and move speeds. Recorded a bunch of sound effects and music. Fixed up some very very basic movement AI for mobs. They can now jump. Still no path finding. Added some more UI elements, power bar beside cross-hair, health bar for mobs, gold coins, exploding limbs, better decapitation and more. There is a smallish memory leak on loading new level. Otherwise happy so far.

 

unity3d voxel game engine test #5 (Zombies)

Standard

Added some more game elements to play with some ideas .. including headshot instakill on mobs with x2 xp. A lot more stuff to do yet. I’d made the zombie last year in blender so it’s the resident test mob for now. The zombie (boxy) model is compatible with minecraft skins so i should be able to use the existing skin editors to make a plethora of boxy type characters,npc etc though i may end up steering away from that style.

Blender Gems

Standard

I found a great tutorial for setting up blender to render gemstones. The image below took about 1.5hrs to render but I’m pretty happy with the result. I wanted to make my own gem icon so this came in very handy. It may be useful for some other game project related art as well.

GemRender3n

If you’d like to try this yourself check out the tutorial by Addicted to CG here.

Thanks

Standard

Thanks to the people that have expressed some interest in this project. I would like to clarify a few things for any future visitors.

This engine is not for sale. I am trying to create an engine to build my own game the way i want it. Most engines i have bought have had things missing or I’ve not understood the authors methodology so well to be able to modify it to my liking. This is not a fault of the various authors.

I’m happy to share some bits of advice and code. But i won’t hand over the entire project. There are a few great partially completed projects i did use to get my toes wet so please look for those on the unity forums, especially  mine package  This project got me started. If you want to understand blocky voxel engines, rip that project apart and see what’s going on. Then write your own from scratch, over and over again.

If you’re interested in joining this project as an artist, coder or musician. Send an email or leave a comment.