Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Scott_AW

Pages: 1 ... 11 12 [13] 14 15
181
GLBasic - en / Re: Making animated models
« on: 2010-Apr-09 »
@Matchy - Can't do that, the models are being created by the program, not externally.

@Kitty Hello - That would be wonderful.

182
GLBasic - en / Re: Making animated models
« on: 2010-Apr-09 »
Well thats a shame, anyway of combining DDD files into one with frames?

183
GLBasic - en / Making animated models
« on: 2010-Apr-09 »
I'm currently working on a model generation program, I believe that model files can store animation frames, but I was wondering is it possible to to create a model with animation in code.  I attempted it, but either I did something wrong or its not supported.

Basicly what I'm doing is generating a model, with an index as the frame number, saving to the same model each new model with a different index.  This crashes the program.

184
GLBasic - en / Re: Downloadable patch proposal
« on: 2010-Apr-06 »
Thanks for those links, however the copying method work well too, didn't haven't to mess with anything.

185
GLBasic - en / Re: Downloadable patch proposal
« on: 2010-Apr-04 »
Well then it should work.  I can move the glbasic folder to my usb drive and transfer it.  I actually have it installed on the usb stick, but didn't realize I could just copy the updated version to it. 

I found problems in attempting to update glbasic if its located on a flash drive, which sucked since so many improvements have been made.  That and the project file formats were no longer compatible, and new commands have been added.  Which wasn't too big of a deal.  In fact when I was testing out a gui I'm working on, I compiled a mac version since one was available to me and had pretty nice result and an amazing FPS of 500 on a G5, vs my netbook which is 300.   But I haven't tested it with this new version yet, and I'm using polyvectors.  It might explain a visual glitch I saw.  That and I had to switch to blacksreen.

http://i206.photobucket.com/albums/bb140/scott_aw/sampleinterfacepsd.png
On Windows XP, GLB Version 7.285 ^

http://i206.photobucket.com/albums/bb140/scott_aw/macporttest.png
On MacOSX G5, GLB Version 7.203 ^

File search works like a dream.

186
GLBasic - en / Toon shade question
« on: 2010-Apr-04 »
Is it possible to use toon shading but omit the black outline?  If not I suppose I can look for a shader.

187
GLBasic - en / Re: Downloadable patch proposal
« on: 2010-Apr-04 »
Does that work right out or do you have to modify the register?  I do have a netbook I used to use for GLBasic that I could update and transfer files to my main netbook.

188
That would be nice, like seperate .app folders

189
GLBasic - en / Downloadable patch proposal
« on: 2010-Apr-03 »
I was wondering if you guys would support a downloadable patch option.  I don't always have a connection to my main work laptop, so updating it can be tricky.  If its not too much trouble that is.

190
Code Snippets / Re: 16 cubic cube
« on: 2010-Mar-25 »
Its like trying to get people who use pens into using pencils.  Even though you can produce more detail with a pencil drawing than a pen.  That would make the video card the factor of the ink's quality while the pencil lead would be like raw cpu power.

You really just need a math chip, not a graphics chip to handle voxels.

191
Why not distance your sprites from the font index, like maybe start sprite indexes at 10.  Never mind, reverse that.  Stick the font index at a higher number, like 255. 

Isn't loading a font treated like a animation, each character has an index?

192
Code Snippets / Re: 16 cubic cube
« on: 2010-Mar-14 »
And there was also Outcast which was pretty impressive at its time.  I wonder how hard it would be to get the Voxlap code to work in GLBasic's inline functions.  http://advsys.net/ken/voxlap.htm you can find the source code here.

A new demo,  think I fixed some more bugs and such.  No code with this though, I think I'll wait until its finished.  It won't be the actual game engine, since the game will just use the created models, won't need to build objects.  So this will evolve into a simple object creation tool.  The scene in this demo was create by using a strip of images that consisted of the slices to create a 3d sprite.  This is pretty much how voxels work, except being simulated by polygons and such.

http://host-a.net/scott_aw/Cube16_test3.zip

193
Code Snippets / Re: 16 cubic cube
« on: 2010-Mar-14 »
There is already a few interesting works with voxel style graphics, but usually emulated.  Theres a Voxel/ISO Metroid out there and a somewhat questionable developement called Voxelstein.

194
Code Snippets / 16 cubic cube
« on: 2010-Mar-13 »
I've always had a thing for voxels, renewed when I found out about voxlap.  But I'm not about to mess with ray tracing math.

I posted for some recommendations on how to fix a issue I was having.  But I had a chance to read through it again and made it simpler and work.  So yay.

So now that I got it fixed up, here's the code.  I've got some more fun test I want to work on...

First here's a screen capture and a compiled exe.



Download cube16.zip

UPDATED 3/13/10
Now it will show a bunch of same model, with ripped FPS code showing you the frame rate.  I think I fixed the hole problem that I kept seeing.
Quote
// --------------------------------- //
// Project: Cube16
// Start: Thursday, March 04, 2010
// Author: Scott A. Williams
// IDE Version: 7.285
  //Object conversion
  DIM cbox[18][18][18]
// Init =====================================================================================||

// Main =====================================================================================||

// Test =====================================================================================||
  GLOBAL cnt, rot=0, final = FALSE

  //Process
  GOSUB make_obj_thinwall
  create_obj(1)
  //X_LOADOBJ "dump.ddd", 1
  GOSUB ShowFPS
  PRINT "done",300,100
  SHOWSCREEN
  KEYWAIT

  X_AUTONORMALS 0
WHILE final = FALSE
  //Display
  X_MAKE3D 1, 128, 45
  X_CAMERA 9-rot,8,48+rot, 9,8,0
  X_CULLMODE 0
  //X_SPOT_LT 0, RGB(255,255,255), 8,16,32, 1,-1,-1, 90
  //X_SPOT_LT 1, RGB(255,255,255), 8,16,-16, -1,-1,-1, 90
 
  IF rot < 96
    INC rot, 1
  ELSE
    rot = 0
  ENDIF
 
  FOR cnt = 0 TO 5
    X_MOVEMENT 16,0,-8*cnt; X_DRAWOBJ 1,0
    X_MOVEMENT 0,-16,-8*cnt; X_DRAWOBJ 1,0
    X_MOVEMENT 0,16,-8*cnt; X_DRAWOBJ 1,0
    X_MOVEMENT -16,0,-8*cnt; X_DRAWOBJ 1,0
  NEXT
  GOSUB ShowFPS
  SHOWSCREEN
  IF KEY(1) THEN final = TRUE
WEND
  END
// Subs =====================================================================================||
SUB make_obj_thinwall:
  // Create 1 thick 16 squared wall
  LOCAL cx, cy, cz
  FOR cy = 0 TO 17
    FOR cx = 0 TO 17
      FOR cz = 0 TO 17
        cbox[cx][cy][cz] = 0
      NEXT
    NEXT
  NEXT
  FOR cy = 1 TO 16
    FOR cx = 1 TO 16
      FOR cz = 1 TO 7
        cbox[cx][cy][cz] = 1//RND(1)
      NEXT
    NEXT
  NEXT
ENDSUB

FUNCTION create_obj: index
  // Scan through object data, create model
  LOCAL cx, cy, cz
  LOCAL fn,fs,fe,fw,fu,fd,fc
  LOCAL first = 0
  LOCAL line = 0, tic = 0
  X_OBJSTART index
  FOR cy = 1 TO 16
    FOR cx = 1 TO 16
      FOR cz = 1 TO 16
        IF cbox[cx][cy][cz] > 0
          fn = cbox[cx][cy][cz-1]
          fs = cbox[cx][cy][cz+1]
          fw = cbox[cx+1][cy][cz]
          fe = cbox[cx-1][cy][cz]
          fd = cbox[cx][cy-1][cz]
          fu = cbox[cx][cy+1][cz]
          fc = cbox[cx][cy][cz]
          make_cube(cx,cy,cz,fn,fs,fe,fw,fu,fd,fc)
          PRINT "posxyz:" + cx+cy+cz + " facekey:"+fn+fs+fe+fw+fu+fd+" color:"+fc,0,8*line
          INC line, 1
        ENDIF
        PRINT "sector:"+tic+" value:"+cbox[cx][cy][cz],400,8*line
        INC tic, 1
      NEXT
    NEXT
  NEXT
  X_OBJEND
  X_SAVEOBJ "dump.ddd", index

ENDFUNCTION

FUNCTION make_cube: x,y,z,n,s,w,e,u,d,col
  color = RGB((y*4)+64,(y*4)+64,(z*4)+64)
  IF n = 0
    X_OBJNEWGROUP
    X_OBJADDVERTEX x+1,y,z,1,0,color
    X_OBJADDVERTEX x,y,z,0,0,color
    X_OBJADDVERTEX x+1,y+1,z,1,1,color
    X_OBJADDVERTEX x,y+1,z,0,1,color
  ENDIF
  IF s = 0
    X_OBJNEWGROUP
    X_OBJADDVERTEX x+1,y+1,z+1,1,1,color
    X_OBJADDVERTEX x+1,y,z+1,1,0,color
    X_OBJADDVERTEX x,y+1,z+1,0,1,color
    X_OBJADDVERTEX x,y,z+1,0,0,color
  ENDIF
  IF e = 0
    X_OBJNEWGROUP
    X_OBJADDVERTEX x+1,y+1,z+1,1,1,color
    X_OBJADDVERTEX x+1,y+1,z,1,0,color
    X_OBJADDVERTEX x+1,y,z+1,0,1,color
    X_OBJADDVERTEX x+1,y,z,0,0,color
  ENDIF
  IF w = 0
    X_OBJNEWGROUP
    X_OBJADDVERTEX x,y+1,z,1,0,color
    X_OBJADDVERTEX x,y,z,0,0,color
    X_OBJADDVERTEX x,y+1,z+1,1,1,color
    X_OBJADDVERTEX x,y,z+1,0,1,color
  ENDIF
  IF u = 0
    X_OBJNEWGROUP
    X_OBJADDVERTEX x,y+1,z,0,0,color
    X_OBJADDVERTEX x,y+1,z+1,0,1,color
    X_OBJADDVERTEX x+1,y+1,z,1,0,color
    X_OBJADDVERTEX x+1,y+1,z+1,1,1,color
  ENDIF
  IF d = 0
    X_OBJNEWGROUP
    X_OBJADDVERTEX x,y,z+1,0,1,color
    X_OBJADDVERTEX x+1,y,z+1,1,1,color
    X_OBJADDVERTEX x,y,z,0,0,color
    X_OBJADDVERTEX x+1,y,z,1,0,color
  ENDIF
ENDFUNCTION

// ------------------------------------------------------------- //
// -=#  SHOWFPS  #=-
// ------------------------------------------------------------- //
SUB ShowFPS:
   X_MAKE2D
   dtime=GETTIMER()
   fps = ((1000/dtime)+fps)/2
   delay=delay+dtime
   IF delay>1000 // 1/2 sec
      delay=0
      fps_draw=fps
   ENDIF
   PRINT "FPS: "+fps_draw, 0 ,0
ENDSUB // SHOWFPS


195
While I was going through the forum and happened upon Kitty Hello's ray caster, in which I believe it was mentioned that it went from C to FreeBasic to GLBasic.

So I decided to (quickly even) convert a experiment I had done in freebasic.

You can find it here.

Although it doesn't seem to quite perform as well as the Freebasic version, my current intent with the concept requires a far less amount of spaces to render then either of these two versions handle.

The version below, the GLB one, lacks the file handling of the Freebasic version and uses a smaller array for the plotting of the squares. 

Download ssvox_convert.zip

Both are far from complete and perfect, but mostly done out for fun.  They lack proper spacing for one.

I believe one main reason Freebasic ran better was due to how I made sure variables were exactly what they needed to be, integers, bytes, floats, ect.  Could be other factors too.

This little experiment had also inspired another one in GM using 20 layers of images to create a fake-voxel style side-scroller engine.  Link provided below.

Playable tech demo

Pages: 1 ... 11 12 [13] 14 15