September 10, 2010, 07:55:59 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New members: I'm testing a different CAPTCHA system that hopefully is less prone to spambot abuse. Email me at jf@jonof.id.au if you have problems.
 
   Home   Help Search Login Register  
Pages: 1 [2] 3
  Print  
Author Topic: Voxel Dungeon Crawler in Evaldraw  (Read 2594 times)
Scott_AW
Participant
**
Posts: 79


View Profile WWW
« Reply #15 on: May 10, 2010, 06:19:28 AM »

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.

Quote
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?
« Last Edit: May 10, 2010, 06:23:34 AM by Scott_AW » Logged
Scott_AW
Participant
**
Posts: 79


View Profile WWW
« Reply #16 on: May 10, 2010, 08:31:36 AM »

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.

North+West wall = floor(img)
South+East Wall = ceil((img*100)-int(img)*100)

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.


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.
« Last Edit: May 11, 2010, 11:11:11 AM by Scott_AW » Logged
Atomic
Observer
*
Posts: 29



View Profile WWW
« Reply #17 on: May 13, 2010, 12:51:35 AM »

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.


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?
Logged

Paint3D developer - Easy to use, paint-like voxel editor
Scott_AW
Participant
**
Posts: 79


View Profile WWW
« Reply #18 on: May 13, 2010, 01:21:27 AM »

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.


A wall stored like such = 2.010304 is broken down with this.

  if(k == 0) imd = int(img);
  if(k == 1) imd = int((img*100)-floor(img)*100);
  if(k == 2) imd = int((img*10000)-(floor(img*100)*100));
  if(k == 3) imd = ceil((img*1000000)-(floor(img*10000)*100));

« Last Edit: May 13, 2010, 05:25:53 PM by Scott_AW » Logged
Scott_AW
Participant
**
Posts: 79


View Profile WWW
« Reply #19 on: May 16, 2010, 08:06:56 AM »

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.
Logged
Scott_AW
Participant
**
Posts: 79


View Profile WWW
« Reply #20 on: May 16, 2010, 05:23:33 PM »

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. 
Logged
ConsistentCallsign
Fixture
*****
Posts: 596


This video is not available in your color.


View Profile
« Reply #21 on: May 16, 2010, 08:05:24 PM »

I demand a suppressed m4a1! Lips sealed
You should add verlet integration, ragdoll physics and .kv6 sprite deformation and tons of blood n guts (just copypasta code from vxlst v.101 Wink)
That would be awesome, running around in a dungeon, shooting green ogres and people with m4a1 Tongue Alternately you could use swords.. Tongue
Logged

1488 ╬卐†§• • •«««***{ Volumetric Power }***»»»• • •§†卐╬ 1488
¡Viva Voxel! D:
Schraubendreher
Participant
**
Posts: 70



View Profile
« Reply #22 on: May 16, 2010, 09:15:47 PM »

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.
« Last Edit: May 16, 2010, 09:19:03 PM by Schraubendreher » Logged

Jesus is Lord.
Awesoken
Global Moderator
Fixture
*
Posts: 895



View Profile WWW
« Reply #23 on: May 17, 2010, 02:16:40 AM »

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).
Code:
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));
}
Logged

-Ken S.
Scott_AW
Participant
**
Posts: 79


View Profile WWW
« Reply #24 on: May 17, 2010, 02:36:21 AM »

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.
« Last Edit: May 17, 2010, 06:02:07 AM by Scott_AW » Logged
Scott_AW
Participant
**
Posts: 79


View Profile WWW
« Reply #25 on: May 18, 2010, 08:12:58 AM »

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.
« Last Edit: May 20, 2010, 06:37:02 AM by Scott_AW » Logged
Scott_AW
Participant
**
Posts: 79


View Profile WWW
« Reply #26 on: May 21, 2010, 01:55:18 PM »

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.

(Cool 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.
« Last Edit: May 22, 2010, 05:13:47 AM by Scott_AW » Logged
Scott_AW
Participant
**
Posts: 79


View Profile WWW
« Reply #27 on: May 24, 2010, 03:03:19 PM »

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.





Logged
TX
EDuke32 developer
Global Moderator
Fixture
*
Posts: 404



View Profile WWW
« Reply #28 on: May 24, 2010, 11:43:39 PM »

Pretty cool, dude.
Logged

Scott_AW
Participant
**
Posts: 79


View Profile WWW
« Reply #29 on: May 25, 2010, 06:12:39 AM »



Improved the stairs, two types so far.

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
« Last Edit: May 27, 2010, 06:12:00 AM by Scott_AW » Logged
Pages: 1 [2] 3
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC