For updates check out the profile here -> http://gamejolt.com/open-source/games/rpg/voxel-rpg-maker/2479/
This is currently pretty early on, I'm currently naming them phase# and so on until the whole engine is done.
Right now it just features basic Old-School dungeon crawler movement, but with voxel objects creating the level.
Collision with walls works, and only a portion of the map is rendered based on camera angle and position.
I've planned on creating a simulated fog with stipple(1 color dot patterns) billboards, since I'm limiting the view to keep the classic look and feel as well as keeping the overall speed high for other things. Looked ugly, trying something different.
Everything you need is in this zip, two kv6 files, the code and a bat file to load it in evaldraw(sets 320x200, full screen) Download VDCph3.zip
Ran 30-39 on my netbook, which is faster than the default (x,y)x*y code, but I suppose that isn't fare because I make use of frame limiting that ken provided in the docs.
There's some empty functions in there, mostly for place holders. Somethings may change, arrays will shrink or expand and so on.
However, it does not seem to want to work on the new compiler(on my netbook), but at one point it did. I get an exception message with an address.
Here's the code, can you find what is killing the new compiler? Ken's runs nicely. Solved. I took out the code cuz its already in the zip.
Edited by Scott_AW at
Awesoken at
Re: Voxel Dungeon Crawler in Evaldraw
Very cool script! Your demo works in Rscript if you add a dummy parameter to those 3 blank functions:
Hopefully Robert will have some time to look at the problem.
Scott_AW at
Well that was simple, thanks.
Atomic at
Pretty damn cool, reminds me of an old Master System game called Phantasy Star. The ground tiling needs some improvement, though.
Redeemer at
Pretty cool! Attach a random dungeon generator and some monsters/weapons/leveling/etc. and you'll have a fully functional Evaldraw rogue-like. :)
Scott_AW at
I don't plan on making a random dungeon generator, I like making maps.
The thing about the floor tiles is the voxel shading, theres not too much I can do about this. Walls and floors are going to look segmented.
Awesoken at
Hi Scott (and others),
I have cleaned, modified, and optimized your script. I gave the camera more freedom (try Home/End/PGUP/PGDN) and added collision detection. I improved the frame rate with back-face culling, and a quick & dirty raycaster to mark visible blocks. Feel free to use this script for any purpose. It would be really cool to see a voxel game with this type of tiled rendering : )
CaimX86 at
One word: Awesome.
I really love, and in my opnion, the Ken's free look camera it's more cool.
Ken, I was looking at all your VOXEL projects like CAVEDEMO today, and I feeling that since computers become faster, we will see great games using Voxels. All demos worked very smooth here. (I'm using a Dell Notebook with Intel C2D 2.0). And the world is destructible. Let's wait and see in the future ...
Scott_AW at
Indeed, awesome stuff.
I've got a faux fog shade I've put into my recent stuff, I'll have to incorperate it into the optimized version. I've an interesting idea for lighting which directly ties into the same function that handles the fake fog, or object fade out.
Thanks again Ken for doing that.
I've been doing all my work on an MSi Netbook with just an Atom, intel gma and 1gb of ddr ram. Voxlap and other such projects perform pretty well.
Edited by Scott_AW at
Scott_AW at
Ken's improved code w/ tile fog+light
So I successfully nested my function into the shiny new code to create both fake light and fog fade-off effect.
Of course I'm going to have to hack apart some of Ken's stuff so it can support different walls for four sides and different floor and ceilings. That and multiple levels. In the end, much like a previous project of mine, I'm going to have to make a map editor for this.
Anyways, here's the revised code, I broke up the various parts and put them in functions just because.
Note that the lighting part is quite perfected yet.Added max, that fixed it.
Removed, found out what I was doing wrong.
Edited by Scott_AW at
Awesoken at
Re: Voxel Dungeon Crawler in Evaldraw
Some suggestions:
1. Replace the block of code between movecam(voided) and //Simple collision detection with this:
readmouse(&fx,&fy); hang += fx*.01; vang += fy*.01; vang = min(max(vang,-PI/4),PI/4);
2. You should shade walls based on their orientation. For example: North walls are brighter, East and West walls are default, and South walls are darker. BTW, there's a little trick in EVALDRAW: you can make something brighter than 100% if you use the 3-parameter from of setcol. : )
3. You can remove the dummy parameter hack. Robert has fixed it and I have posted a new EVALDRAW on my site.
4. Please post your code inside a code block, not a quote block. The forum is replacing x's with square brackets around them with a stupid symbol, like in this example:
map[y][x]
map[y][x]
Scott_AW at
My mistake, didn't notice the # button.
I got some playing to do with the lighting, but I'll try and even out the wall & ceiling lighting.
I'll throw that mouse thing in there too. Thanks for updating so quickly.
What are the differences between the facings percentage wise?
Current results of the lighting, think I just about got it how I want it. Multiple lights will blend with each other when near....but not really in these captures since the light radius were small. http://i206.photobucket.com/albums/bb140/scott_aw/lightNfogtiles.png
Some video too. http://www.youtube.com/watch?v=NOBUUlTuwlw
Edited by Scott_AW at
CaimX86 at
Looks Great!
Scott_AW could you share the code? (With Light Effects).
Atomic at
Scott_AW said at
I don't plan on making a random dungeon generator, I like making maps.
The thing about the floor tiles is the voxel shading, theres not too much I can do about this. Walls and floors are going to look segmented.
Maybe you could tweak the normals on the kv6 files by hand to avoid them rounding at the edges. I could try to do that, not sure if it'll work well.
Edit: I made a modification to my kv6 import/export code to wrap the normals and it seems like it did the trick. Maybe the normals are a bit too smooth, not sure. I've attached the modified voxels.
Edited by Atomic at
Awesoken at
Scott, this is what I used for wall orientation shading:
You'll have to convert it to work with your shading function.
Atomic, that is a nice idea to calculate normals with the texture wrapped. Long walls look much better. Corners might look better with a separate model that used a different algorithm for the corner side.
Edited by Awesoken at
Scott_AW at
I haven't done anything with the normals, so maybe that's it. I forgot that the kv6's were more advanced.
You see I have one program that converts a series or strip of images into a raw VOX file, and then I re-saved them after applying a fixed palette, but never did anything about the normals.
I'll have to check that out.
Thanks for the values ken, shouldn't be a problem to correct now.
Once I get the wall shading offset put into the light code I'll release that too.
Edit: I made a modification to my kv6 import/export code to wrap the normals and it seems like it did the trick. Maybe the normals are a bit too smooth, not sure. I've attached the modified voxels.
Those look way nicer, can you share a compile version so I can convert future models?
Edited by Scott_AW at
Scott_AW at
Lighting/fadeout function
Download phase7
Well I did a cheap hack to try and normalize the wall shades, but there seems to be a little more than that going on as not all colors match up when lightened. For now its fine. I've included the corrected KV6 files as well, looks much better.
Currently I've been adding support for different walls for all four sides and different floors. At the moment different floor/ceilings and NW,SE wall sets can be set.
Map data is now stored as a decimal which is manipulated to obtain the values.
For example:
2.01 stands for NW = wall ID 2, SE = wall id 1
-1.02 stands for the floor ceiling index
So the collision check now checks for values below 0, since 0 will now stand of absences of floor & ceiling.
I found out that only ceil works best because a value of 2.01 for some reason creates a 0 when the formula is applied using int or floor.
Some captures of the process in action, plus a template character. http://i206.photobucket.com/albums/bb140/scott_aw/genmanNvarytiles.png
Extending it further for the walls, it would be something like this.
2.010102
N=2, W=1, S=1, and E=2;
Which may require a slightly different approach. I'll update on its progress later on.
Edited by Scott_AW at
Atomic at
Re: Voxel Dungeon Crawler in Evaldraw
Awesoken said at
Atomic, that is a nice idea to calculate normals with the texture wrapped. Long walls look much better. Corners might look better with a separate model that used a different algorithm for the corner side.
Indeed, a 4x4x64 corner "pillar" may do the job.
Scott_AW said at
Those look way nicer, can you share a compile version so I can convert future models?
I'd like to but I coded it inside Paint3D's codebase (which uses a completely different internal format) so I can't. If you need to do it to more files just post them here.
Maybe Ken or someone else could use slab6's code to create a command line utility that does it?
Scott_AW at
Vids and 4 different wall faces per cell.
I've got two new ones...but if its fairly simple for you to do, then I can wait til I have a small batch of them. Regular objects shouldn't need it.
I want to redo them all anyways.
Here's some animation test and a FPS concept...
http://www.youtube.com/watch?v=eUDOXbW4ff8
http://www.youtube.com/watch?v=S_5Wa-r9wnM
Corner parts could be nice to add too.
Finally got to completing the four-different tile walls feature. http://i206.photobucket.com/albums/bb140/scott_aw/4diffwalls.png
A wall stored like such = 2.010304 is broken down with this.
Wandering with no where to go. Some stop and think and other's go round in circles.
That's what I have so far, no agressive units yet, just wandering NPCs, fit for towns or as critters.
See it in action!
At this point the only thing I truelly would like to see is strings in arrays, which would make handling KV6 models a lot easier.
Other than that, progress is going well. Evaldraw is handling nicely.
Scott_AW at
And, why not, a demo.
And why not, here's a demo. Be sure to get the latest Evaldraw first. And let the INI file be replaced, or just set the x & y pixel size to 1 & 1 instead of 2 & 1.
I made a bunch of modifications, and need to do some cleaning up sooner or later, but I still have plenty to do.
One thing I changed in the INI which improves the look is I've made the X & Y pixel size the same(they were 2/1, causing funky effects when models were far away) and made them both 1.
ConsistentCallsign at
Re: Voxel Dungeon Crawler in Evaldraw
I demand a suppressed m4a1! :-X You should add verlet integration, ragdoll physics and .kv6 sprite deformation and tons of blood n guts (just copypasta code from vxlst v.101 ;)) That would be awesome, running around in a dungeon, shooting green ogres and people with m4a1 :P Alternately you could use swords.. :P
Schraubendreher at
If all goes well, then strings in arrays will definitely be supported. Along with general pointers. And native integers.
Having said that, do not expect this change too soon. Currently, the compilers are all designed exclusively for 64-bit floating point variables. The guy working on the new compiler will probably have to rewrite all of it, and making it stable will probably not be a one-day project.
The only big problem that comes from such features is security. Scripts might have to be inspected in a text editor before they are run to ensure that they are not malign. If you can suggest possible ways to enforce security with general pointers, then I am sure the guy writing the compiler would like to hear them. I know that he visits the forum frequently.
Edited by Schraubendreher at
Awesoken at
Scott, are you talking about pixxsiz and pixysiz in EVALDRAW.INI? Those settings only apply to the 2D graphing modes, such as (x,y), (x,y,t), (x,y,&r,&g,&b), and (x,y,t,&r,&g,&b). They can be changed in the menu under Options .. 2D Render Resolution. It seems you are a sucker for the placebo effect :-P
After looking at your latest demo, I noticed that you can eliminate 2 of your testman models by taking advantage of symmetry. To render a model backwards, you must use the long form of drawspr() - the one that takes a 3x3 rotation matrix as input. The following example shows how it works. Hold the mouse button to display the other model flipped (it should render in the same place and orientation).
cls(0); clz(1e32); t = klock(); if (0) { if (bstatus) drawspr("testman2.kv6",0,1,3, cos(t),0,-sin(t), 0,1,0, +sin(t),0,+cos(t)); else drawspr("testman4.kv6",0,1,3, cos(t),0,-sin(t), 0,1,0, -sin(t),0,-cos(t)); } else { if (bstatus) drawspr("testman3.kv6",0,1,3, cos(t),0,-sin(t), 0,1,0, +sin(t),0,+cos(t)); else drawspr("testman5.kv6",0,1,3, cos(t),0,-sin(t), 0,1,0, -sin(t),0,-cos(t)); }
Scott_AW at
Maybe I did something else when I changed that. I was noticing uneven distortion as models became less detailed further away. Could just be using different computers and being tired.
Some models won't have semitry in the future. Animal models most likely will though, so thats useful, its nice to have mirroring.
Strings will be nice, but I can make do.
Don't expect anything too fancy, that'll just drag down developement. I want to keep it simple and smooth.
Oh and Evaldraw is pretty fun to work with.
Edited by Scott_AW at
Scott_AW at
Map maker preview
Heres a demostration showing a map file being used with the game.
http://www.youtube.com/watch?v=FYz0IpOVvhA
A quick update, map editor on the way.
Preview of map maker and display
So I've made some new tiles and modified coloring on two of them. Plus a pillar object. The mindless drones happily wander about too.
The editor itself makes no sense without some kind of color key.
Colors represent the index for walls, floor and ceilings. The palette gets split depending on what your using, and you get a little display of what colors are chosen.
Still some bugs, but working fine otherwise for a quick made editor.
Object, light, npc and event placement are next to add.
You can have maps currently 8-64 in size. Maybe bigger if I fix a few things about how the map is scanned. Currently it does a full scan, and my attempts to limit it weren't proper, causing problems. I just need to make a smarter algorithm for it.
Edited by Scott_AW at
Scott_AW at
Basic information about Voxel Dungeon & you.
So I tested it out, 254x254 maps work great, heres a vid. http://www.youtube.com/watch?v=DzC9blDWATY To put in perspective, that tiles that 64x64, so a map is up to 16256x16256x64 voxels
Voxel Dungeon, plans
Details about the project have been hovering more in the technical, so here's a bit about the planned features, limits and tools. A few tools you know already, but I'll list them anyways.
TOOLS
Evaldraw, made by Ken Silverman, the program that currently is used to run and edit it. Currently it has no support for storing strings yet, so a lot of data is hard coded. But not impossible to figure out for making modifications. I'll be keeping functions that hold the lists of models at the bottom of the code to make it easier to find.
Strip2voxel, the program I made in GLBasic converts a strip of images into a raw VOX file. There are currently some limits, as GLBasic seems to have some issues handling very large images. So I may need to remake this in something that only uses software rendering in hopes of better accuracy. Another alternative is to just use bmp files and read straight from them instead of loading them. Right now the limits I've found are with 64x64 images with a limit of 14-16 'layers' before the program starts to chew up the image.
Slab6, also by Ken Silverman, allows more fine tuning of the vox, and then you save as a KV6 file. Color, pivot point, scaling and such can be modified.
poly2vox, might be by Ken, but I'm not sure. This one is very useful for converting models, with textures included. It supports 3ds and OBJ formats and you can set the sizing 1-255 for the largest point.
map editor, also made in GLBasic by myself and still a work in progress, but it'll handle creation of various sized maps, light, object, event and entity placement.
Templates, because nothing is easier than working from templates and examples, I plan to provide mask templates with template man that you can easily create your own 3d person w/ animations. Right now just simple walking is done, but I still have some modifications to do.
Now for limits, because there are always limits...
LIMITS
Single story, there are no rooms over room, and may not plan to be any. There will be the ability to create double story walls, but I'll save that for the features bit.
Size & Index, Entities, objects, events and lights are currently limited to 32 of each. I may double this, but don't want it too high. Maps are limited to 8x8-254x254, must be square.
Visual bugs, been experienced on some platforms but not all. Strip2voxel has some issues on certain computers using onboard memory for video ram. Other glitches have occured but only one systems tested.
No strings, none. Editing to the source file required to add text.
some more!, but can't think of them now...
So on to the positive,planned features.
FEATURES
(1) Special stair objects - since theres no true rooms over rooms, when placing down/up stairs, adjacent walls will be cloned to make it seem like you have two stories worth of stairs going up.
(2) In addition to this stairs will have a special light source that either fades them to black(background color) or white(like outside). Going up stairs will be an automated movement and fading transition between levels. This will also be applied to exit halls and exit doors.
(3) Two piece doors that swing like doors. Consisting of a frame and door itself.
(4) Dynamic lights, this is already working.
(5) Dynamic enviroment lighting, much like I've done in past projects with a time based color change for outdoor enviroments. Would affect the 'white' fade out screen.
(6) Good, bad & neutral NPCs.
(7) Text speak built into Evaldraw, could be promising because it can be modified at any point.
(8) Basic RPG features, stats, items and possibly item creation and resource collection.
(9) Conforming tile objects, objects that change depending on their neighbor. Like a group of grass getting taller or having curved edges to reduce the squarish look. Also including roofs, paths(maybe) and a few other objects that may benefit from this. Another thing I'm taking from my past attempts.
And more...but feel free to add suggestions. Except for anything involving physics, jumping, voxel deformation and all the fanciness. This project will be kept simple(sorta) for the purpose of easy modability by other users.
And yes, I will be making a game with this...eventually.
Edited by Scott_AW at
Scott_AW at
Now with XYZ lights and "transforming" stairs.
So, believe it or not, lighting and fogging did not use the Z value, just X & Y. With a quick mod, now its there, allowing me to complete the transforming stairs.
The stairs are just one object, picking the neighboring walls and pushing the ceiling up a space, replicating itself...yeah, just look at the pictures.
Lights can be placed at any point in the grid, have super high bright or create darkness.
Going up/down stairs will be like a cutscene animation, while fading in or out.
Also an 'ambient' model to create black/white noise for stairs, exit hallways/doorways and other possible uses. Ambient model can only be white or black, eliminating the weird look lighting would give it.
5/26 - They now sample side and back walls, heres a demo video. http://www.youtube.com/watch?v=HWRRqzwUXW4
Edited by Scott_AW at
Scott_AW at
New tech demo
Found at the profile page.
Basic teleporting via stairs, no animations for entering them yet, just a fade in. NPCs can also use stairs as long as they teleport within the map.
Also a introduction of water tiles, which both player and NPC can fall into. I need to add an instance handling for the creation of splashes and such temporary effects.
In addition, Atomic has fixed my voxel model's normals so that they look a lot better.
A few corrections needed to be made to lighting, I found out. Hopefully its all worked out.
I'm considering treating the grass tiles like I have the water tiles, split them up into quad tiles for better lighting and possibly alternating the heights based on proximity to other grass tiles.
Teleporting between maps works, but is not featured in this demo.
I still need to revisit my map maker to implement object, light and entity placement, as currently those are written into the source code.
Scott_AW at
New tech demo and map maker preview
Can be found here.
This tech demo features instances like rain drop and splashes, although the current map provided doesn't have any water squares. You can find some sample videos on the site showing splashes created by player and entities.
Entities have been disabled, but can be reenabled by editing the VC file, looking in the 'initgame' function and removing the /* */ from around the entity data.
Also included is a early version of the map maker, its pretty bare bones right now but you can draw out your maps, place objects and lights. Don't place stairs, they're not finished in the editor and cause problems in the game if used.
Read the text file included for a few more details.
You can also check out the *.VC at the top for what is being worked on and to be worked on.