Duke4.net Forums: Build 2 Released by Ken Silverman - Duke4.net Forums

Jump to content

Hide message Show message
Welcome to the Duke4.net Forums!

Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

  • 6 Pages +
  • « First
  • 3
  • 4
  • 5
  • 6
  • You cannot start a new topic
  • You cannot reply to this topic

Build 2 Released by Ken Silverman

User is online   MusicallyInspired 

  • 2,886

#121

I must say, I don't like how even though a light can be a certain colour, it still shows up as white when an object is close enough. It's not 100% any particular colour if it's bright enough.

Roland SC-55 Music Packs
It's Green (Duke3D BETA Track!) in FLAC, OGG, & MP3 with metadata loop tags
Duke3D, Doom, Descent, Hocus Pocus, and more...
Legacy of Grabbag Metal Medley
0

User is offline   Photonic 

  • 1,238

#122

I think you've limited yourself to 1 for the RGB settings on lights, try 2,0,0 for red it looked great on my end.

Also about move_lights, I've made a simplified version with some comments hopefully it's helpful.

move_lights ()
{
   for(i=0;i<maplightn;i++) // sets the loop up to go through all the lights, i will be each individual light processed once per frame
   {
      j = maplight[i]; // gets the sprite number of the light
      mapgetspri(j,MAP_SXYZ,&s,&x,&y,&z); // fetches the &s sector, and xyz co-ordinates of the sprite
      vx = 0; // sin(tim)*dtim;  // vx, vy, vz, are the velocity settings tim is set from the klock
      vy = sin(tim)*dtim;        // dtim is the difference in time between this frame and the last
      vz = cos(tim)*dtim;        // set as is will be a clockwise circle on the y z plane with no x movement
                                 // if vz = 0 then it would move in a straight line back and forth on the y axis
                                 // if vz were sin() instead of cos() it would move in a diagonal line instead of a circle
                                 // if vz were -cos() it would be a counterclockwise circle...
                                 // speed is set at sin(tim); sin(tim*2) is twice as fast
                                 // radius of circle is set at *dtim; sin(tim)*(dtim/2) is half the radius...
      ontype = mapcoll(&s,&x,&y,&z,vx,vy,vz,mapgetspri(j,MAP_FAT),1,&onsect,
&onind); // give the vectors to the engine to work out collision
      mapsetspri(j,MAP_SXYZ,s,x,y,z); // now move the sprite
   }
}



Here is a sample that may fit what you asked for, faster lights, smaller movements, otherwise just like move_lights () in maptest.kc
Spoiler


This post has been edited by Drek: 11 April 2018 - 12:40 PM

2

User is online   MusicallyInspired 

  • 2,886

#123

 Drek, on 11 April 2018 - 12:33 PM, said:

I think you've limited yourself to 1 for the RGB settings on lights, try 2,0,0 for red it looked great on my end.


Not sure how to accomplish this when you can't set manual RGB values. At least, I couldn't find a way and Ken told me he didn't think it was a necessary feature...

Actually what would be really welcome is to make a texture surface a light source instead of just sprites.

Quote

Also about move_lights, I've made a simplified version with some comments hopefully it's helpful.


Thank you, that's immensely helpful! I have a novice understanding of programming and I take too many breaks in between experimenting with it to really grasp a hold of many of the concepts, not least of which are vector movement and velocity formulae/algorithms.

Roland SC-55 Music Packs
It's Green (Duke3D BETA Track!) in FLAC, OGG, & MP3 with metadata loop tags
Duke3D, Doom, Descent, Hocus Pocus, and more...
Legacy of Grabbag Metal Medley

This post has been edited by MusicallyInspired: 12 April 2018 - 06:01 AM

1

User is offline   Photonic 

  • 1,238

#124

 MusicallyInspired, on 12 April 2018 - 05:28 AM, said:

Not sure how to accomplish this when you can't set manual RGB values. At least, I couldn't find a way and Ken told me he didn't think it was a necessary feature...

Setting light colours is all done in code, line 541 of maptest.kc is "Process sprite tags"
At line 545 the variable "tag" is set, after that point you can code light colours based on sprite tag, like so;
         if (tag == 200) { // any tag # you want
             mapsetspri(i,MAP_INVISIBLE,1); // toggle visisbility of sprite 0/1
             mapsetspri(i,MAP_RGB,2,0,0); // set colour values here
         }


 MusicallyInspired, on 12 April 2018 - 05:28 AM, said:

Actually what would be really welcome is to make a texture surface a light source instead of just sprites.

You could tag a wall and code it to spawn a light, even a spotlight if you wanted. I doubt you can get the entire wall to become a light...

 MusicallyInspired, on 12 April 2018 - 05:28 AM, said:

Thank you, that's immensely helpful! I have a novice understanding of programming and I take too many breaks in between experimenting with it to really grasp a hold of many of the concepts, not least of which are vector movement and velocity formulae/algorithms.

I'm much in the same boat, but one of my other hobbies is theoretical physics, so vector math has slowly creeped its way into my brain somehow.

This post has been edited by Drek: 12 April 2018 - 01:17 PM

1

User is online   MusicallyInspired 

  • 2,886

#125

Ah in code. Nice. Only thing is I wanted to designate a light sprite tag for the rapid movement code and I want to have slightly different shades for different lights.

I'm a little confused why Ken decided to restrict sectors, walls. ceilings, sprites, etc to only having one tag instead of two (hitag/lotag). Would have been handy for a time like this.

Roland SC-55 Music Packs
It's Green (Duke3D BETA Track!) in FLAC, OGG, & MP3 with metadata loop tags
Duke3D, Doom, Descent, Hocus Pocus, and more...
Legacy of Grabbag Metal Medley
1

User is offline   Photonic 

  • 1,238

#126

View PostMusicallyInspired, on 12 April 2018 - 01:21 PM, said:

Ah in code. Nice. Only thing is I wanted to designate a light sprite tag for the rapid movement code and I want to have slightly different shades for different lights.

Sorry I was wrong about the lights colour being only settable in code. The documentation is sort of lacking, but pressing c on any sprite,wall,sector will bring up a colour cube to set a 32bit colour for the object. That's the proper way to do shading, full RGB control. This setting will act as the light colour for any emitters. Also, for shading only, when the colour selector is up, hold RMB and the mouse movement sets "intensity" (shade) without changing colour. Same as keypad + -.
0

User is offline   mrDUKE!zone 

  • -12

#127

Ken needs to release the source code.

Take this you rapscallion!
2

User is offline   Photonic 

  • 1,238

#128

Setting colours by this cube is awkward and I can't find values for what the current shade/colour is.

My request list so far;

Quote

console control of MAP_RED, GREEN, BLUE settings
/r /g /b with hotkeys ALT+R, ALT+G, ALT+B
brings up current values, like ALT+T does for tag
show current rgb values on top right with other info

0

User is online   MusicallyInspired 

  • 2,886

#129

Yes, the 'C' key and hold+RMB is what I've been doing. It's difficult to get the exact values you want sometimes, though. When I brought it up to Ken to add the possibility to add manual values he asked if it was really all that necessary.

View PostmrDUKE!zone, on 15 April 2018 - 09:04 AM, said:

Ken needs to release the source code.


Yeah. He won't, though. It's a shame. He treats this as nothing more than a hobby project. People really want to use it, though, but can't because he won't open it up or add the features users want. So it's not really good for anything...and I guess that's why he hasn't released it in 8 years or so whenever he started it. :(

Roland SC-55 Music Packs
It's Green (Duke3D BETA Track!) in FLAC, OGG, & MP3 with metadata loop tags
Duke3D, Doom, Descent, Hocus Pocus, and more...
Legacy of Grabbag Metal Medley

This post has been edited by MusicallyInspired: 15 April 2018 - 07:06 PM

0

User is offline   Trooper Dan 

  • Duke Plus Developer
  • 2,901

#130

Be careful not to burn bridges by saying things out of frustration or disappointment. My impression from the snippets of convos you have posted with Ken is that he wants build2 to work well and is willing to provide small updates and support as long as it's not too much trouble. That's a reasonable amount of effort for something that's not a primary focus. Releasing source is a whole different ball game. There may be parts of his code that are relevant to his current projects or that he just isn't ready to have people messing with. Don't forget it's still his baby.
1

User is online   MusicallyInspired 

  • 2,886

#131

I've got nothing against him. I don't mean to imply I'm upset with him or about this. My bad for communicating poorly. I am happy he's been as available as he has.

Roland SC-55 Music Packs
It's Green (Duke3D BETA Track!) in FLAC, OGG, & MP3 with metadata loop tags
Duke3D, Doom, Descent, Hocus Pocus, and more...
Legacy of Grabbag Metal Medley
1

User is offline   Photonic 

  • 1,238

#132

Build2 is a voxels oriented engine. What are some of the voxel tools people are using lately?
Here is my tools folder list.

Quote

MagicaVoxel
poly2vox
slab6
strip2voxel3beta.1
vox2png

0

User is online   MusicallyInspired 

  • 2,886

#133

I still can't figure out how to actually make something as a voxel. I feel like it should be way easier than it seems to be. Maybe I'm just underestimating it, though. Slab6 is a royal pain. It's more like a 3D "painter" that "sprays" voxels in a certain radius. Why can't I just make certain kind of geometric shape and then sculpt it or add to it one voxel at a time?

I don't know. I'm new to voxels.

Roland SC-55 Music Packs
It's Green (Duke3D BETA Track!) in FLAC, OGG, & MP3 with metadata loop tags
Duke3D, Doom, Descent, Hocus Pocus, and more...
Legacy of Grabbag Metal Medley
0

User is offline   Photonic 

  • 1,238

#134

Well my method depends on the size of the voxel usually, low res I'll start it in strip2vox, high res I'll make a md3 and run poly2vox, slab6 I use for finishing details. Insert/delete is what you want for single voxel editing.
Magica Voxel I've heard good things about, and have found it useful a few times, it's a full .vox compatible editor.
0

User is online   Micky C 

  • Honored Donor
  • 3,581

#135

How do you actually animate voxels though? There must be some way other than having a separate voxel for each frame, surely?

Polymer wishlist: Global illumination, SSAO, Bloom, reflective surfaces, adjustable specular (wetness), volumetric lighting.
Mapper of the Month December 2014.

Herbs? Tell me more!

This post has been edited by Micky C: 17 April 2018 - 04:03 PM

1

User is offline   Tea Monster 

  • Polymancer
  • 1,952

#136

I don't know if you've tried these, but...

http://guillaumecher...ithub.io/goxel/

https://blackflux.com/node/11
1

User is offline   Photonic 

  • 1,238

#137

View PostTea Monster, on 17 April 2018 - 04:05 PM, said:

I don't know if you've tried these, but...

http://guillaumecher...ithub.io/goxel/

https://blackflux.com/node/11

Thanks I haven't heard of either of them. I'll look into them both.

View PostMicky C, on 17 April 2018 - 04:03 PM, said:

How do you actually animate voxels though? There must be some way other than having a separate voxel for each frame, surely?

Yes. With evaldraw I think I can do "soft" animations. That's where an enemy would be made up of multiple voxels, each one controlled by code to move separately to make the animations. An example of this is voxelstein or ace of spades.
0

User is online   MusicallyInspired 

  • 2,886

#138

Voxelstein animations were intense from what I recall.

Roland SC-55 Music Packs
It's Green (Duke3D BETA Track!) in FLAC, OGG, & MP3 with metadata loop tags
Duke3D, Doom, Descent, Hocus Pocus, and more...
Legacy of Grabbag Metal Medley
0

User is offline   Photonic 

  • 1,238

#139

faceplayer3D(i,ix,iy,iz)
{
   ha = atan2(ipos.y - iy, ipos.x - ix)-1.6;
   va = (ipos.z - iz)/(sqrt((ipos.x - ix)*(ipos.x - ix) + (ipos.y - iy)*(ipos.y - iy) + (ipos.z - iz)*(ipos.z - iz)));
   if (va>.99) va=.99;
   if (va<-.99) va=-.99;
   va = tan(va);
   mapsetspri(i,MAP_HVANG,ha,va);
}


I've been working on voxel animations, it's a mess right now to say the least, thinking about parent/child relationships and general 3D world orientations that need to carry from a parent to it's animated children. Here is a function I'm working on that I think is working ok, I'm hoping it's useful to someone here and maybe even I could get some constructive criticism because it's a bit outside my comfort zone. This should keep a sprite facing the camera, where the orientation is the same as it would be loaded into slab6.

it may read better like this;
Hangle = atan2(ipos.y - iy, ipos.x - ix)-1.6;
XYZdist = (sqrt((ipos.x - ix)*(ipos.x - ix) + (ipos.y - iy)*(ipos.y - iy) + (ipos.z - iz)*(ipos.z - iz)));
Zdiff = (ipos.z - iz);
va = Zdiff/XYZdist; // tan()=opp/adj
if (va>.99) va=.99;
if (va<-.99) va=-.99;
Vangle = tan(va);
mapsetspri(i,MAP_HANG,Hangle);
mapsetspri(i,MAP_VANG,Vangle);


This post has been edited by Drek: 22 April 2018 - 09:43 AM

0

User is offline   Photonic 

  • 1,238

#140

I was using inverted co-ords from build2 and got some stuff upside-down/inverted. This is better, the voxel orientation matches the sprite angle in 2d mode build, which is opposite slab6.

faceplayer3D(i,ix,iy,iz)
{
   ha = atan2(ipos.y - iy, ipos.x - ix)+1.572;
   va = tan(((iz - ipos.z)*.95)/(sqrt((ipos.x - ix)*(ipos.x - ix) + (ipos.y - iy)*(ipos.y - iy) + (ipos.z - iz)*(ipos.z - iz))));
   mapsetspri(i,MAP_HVANG,ha,va);
}

0

User is online   MusicallyInspired 

  • 2,886

#141

I think the scale is too small as the characters from the game are much smaller than what your character is in Build2. And it's supposed to be a mansion and it just seems like a cottage. I'll increase the scale somehow. It's too bad there wasn't a quick way to just increase the scale of everything in a Build/2 map. I used the key voxel model for candle holders. The wall is thick enough that it doesn't stick out the other side. Playing with voxels like that is fun.

Posted Image

Posted Image Posted Image Posted Image

Posted Image Posted Image Posted Image

Posted Image Posted Image Posted Image

Posted Image

Roland SC-55 Music Packs
It's Green (Duke3D BETA Track!) in FLAC, OGG, & MP3 with metadata loop tags
Duke3D, Doom, Descent, Hocus Pocus, and more...
Legacy of Grabbag Metal Medley
6

User is offline   Mark. 

  • Honored Donor
  • 2,495

#142

^ King's Quest 3 remake?

This post has been edited by Mark.: 26 April 2018 - 09:57 AM

0

User is online   MusicallyInspired 

  • 2,886

#143

I wouldn't say remake. I don't know how far I'm going with this. Just recreating areas for now. But yes, King's Quest 3. When I think of the old AGI Sierra games this is one of the screens that pops into my head the most. It has a lot of detail for a 160x200 image and it was just so fun to explore that mansion.

Roland SC-55 Music Packs
It's Green (Duke3D BETA Track!) in FLAC, OGG, & MP3 with metadata loop tags
Duke3D, Doom, Descent, Hocus Pocus, and more...
Legacy of Grabbag Metal Medley
0

User is offline   Mark. 

  • Honored Donor
  • 2,495

#144

I love those old point and click adventures. I'm in the middle of playing an HD ( kind of ) remake of KQ3. Thats why I recognized the opening screen right away.
1

User is online   MusicallyInspired 

  • 2,886

#145

View PostMark., on 26 April 2018 - 10:06 AM, said:

I love those old point and click adventures. I'm in the middle of playing an HD ( kind of ) remake of KQ3. Thats why I recognized the opening screen right away.


Which one? :) :) ;) There are two. One is somewhat special to me...

Roland SC-55 Music Packs
It's Green (Duke3D BETA Track!) in FLAC, OGG, & MP3 with metadata loop tags
Duke3D, Doom, Descent, Hocus Pocus, and more...
Legacy of Grabbag Metal Medley

This post has been edited by MusicallyInspired: 26 April 2018 - 10:10 AM

0

User is offline   Mark. 

  • Honored Donor
  • 2,495

#146

IIRC its called KQ3 Redux from AGD Interactive

This post has been edited by Mark.: 26 April 2018 - 10:12 AM

1

User is online   MusicallyInspired 

  • 2,886

#147

View PostMark., on 26 April 2018 - 10:11 AM, said:

IIRC its called KQ3 Redux from AGD Interactive


Check the credits of that game...

Roland SC-55 Music Packs
It's Green (Duke3D BETA Track!) in FLAC, OGG, & MP3 with metadata loop tags
Duke3D, Doom, Descent, Hocus Pocus, and more...
Legacy of Grabbag Metal Medley
1

User is offline   Mark. 

  • Honored Donor
  • 2,495

#148

Let me guess. You did some music for it? ;)

Just checked. Yes you did. Good job.

This post has been edited by Mark.: 26 April 2018 - 11:44 AM

1

User is offline   Photonic 

  • 1,238

#149

I've got a nice parent child animation system shaping up. Also have the proper faceplayer3d code now.

wall of text
Spoiler

0

User is online   MusicallyInspired 

  • 2,886

#150

What's Faceplayer 3D?

Roland SC-55 Music Packs
It's Green (Duke3D BETA Track!) in FLAC, OGG, & MP3 with metadata loop tags
Duke3D, Doom, Descent, Hocus Pocus, and more...
Legacy of Grabbag Metal Medley
0

Share this topic:


  • 6 Pages +
  • « First
  • 3
  • 4
  • 5
  • 6
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks are property of their respective owners. Instead of reading this text, you could be playing Ion Maiden! ;) © 2018 Voidpoint, LLC

Enter your sign in name and password


Sign in options