Main Menu

Recent posts

#61
General Discussion / Re: Vectrex32 not recognized a...
Last post by Vectrex32 - August 19, 2020, 11:31:15 AM
OK, I just tried this on a MacBook Air (2017) running High Sierra (10.13.6) and the Vectrex32 drive shows up fine on the Mac.

My wife has a couple of other Macs (one older, one newer). What are you running?

Have you tried a different cable and a different USB port?

- Bob
#62
News and Updates / Firmware upgrade: version 1.26
Last post by Vectrex32 - August 18, 2020, 09:35:31 PM
There's a new version of the Vectrex32 firmware available, version 1.26. You can download the firmware here.

There is a single bug fix, to the Val() function.

- Bob
#63
General Discussion / Re: Vectrex32 not recognized a...
Last post by Vectrex32 - August 18, 2020, 08:41:28 AM
I know this has worked in the past, but as a PC user, I don't test it regularly.

My wife is a Mac user (it's a mixed marriage) so I'll try it on her system. But I'm away from home right now, so it will be a day or two.

Of course, if we can't get this working for you, you can return it for a full refund.

- Bob
#64
General Discussion / Vectrex32 not recognized as st...
Last post by Ianoid - August 18, 2020, 12:08:40 AM

Yes, I use MacOS. Has anyone else had this issue? It doesn't show up at all in finder or Disk Utility.

Thanks,

ian
#65
Game Swap / Re: VxTron32 release 1.0
Last post by jaymzjulian - August 10, 2020, 01:31:24 AM
Release 1.2
-------------

Changes:
* Settings are saved into vxtron_settings.dat , so you don't have to remember them every game
* A bug was fixed in the AY player timing where it would wait unnecessarily for 10 ticks in a couple of edge cases - this should prevent a couple of frame rate drops only noticable to me ;)

Beyond that, nothing is interesting in this release - I found the player bug while finishing up my new game (running very late due to personal life reasons - yay - but should be finished in the next week or two!), and thought i'd add the settings save at the same time.

EDIT: the file is attached to the first post, so people don't get the old version by mistake! - the versions are at:

https://duckandkitty.com/vxtron32_1.2.zip
https://duckandkitty.com/vxtron32_1.1.zip

Since i can't leave both attached due to forum size limits ;)
#66
Code Swap / Re: Lit/Culled 3d objects
Last post by Vectrex32 - August 06, 2020, 11:30:29 AM
Thank you!
#67
Code Swap / Lit/Culled 3d objects
Last post by jaymzjulian - August 06, 2020, 11:25:11 AM
So I was playingh aroundw ith ways to reduce my draw load, and I kind of fell back to some experiements I did a while ago about culling - the problem at the time being, gsbasic isn't fast enough to really do what I needed without me running out of cycles.

But then I had the idea to use kmeans clustering to quantize the normals to a smaller number - 6, in the case of the demo presented here - and do the culling and lighting on larger sets of polys instead.  Shockingly, this actually works out.  So the procedure ends up being:

a) Generate a set of lines and normals via "some mechanism" (I have a couple of mechanisms for this, one of which involves blender, and one of which involves generating the normals from the lines assuming the objects are vaugely built arounda center)
b) Reduce these set of normals to clusters - I'm using python's sklearn.cluster.KMeans for that!
c) in gsbasic, use vectorrotate and friends to transform the normal set - of course, you need to do the world translate/rotate as well - i.e. consider the camera!  But that's well within the realms of achievable now....

So you end up with an array of objects which happen to mesh together.  There is a couple of serious downsides this this technique, mind you:

a) because the objects aren't linked anymore, there is extra ReturnToOrigin() calls!  indeed, drawing this tree returns to origin 6 times..... we can't easily avoid this, because even if we did relative pen movement things, we don't know if part of the obhect will be drawn until the math is done!
b) things do look better if your object is made of polys rather than lines at the outset, however then you have double-draw issues.  Blender is actually really good at creating normals that don't suffer this, mind you.... essentially if you have "smooth" point normals (as are genearted by the smooth object modifier), it works out well, whereas if you have "flat" surface normals, it doens't work out so well unless you double draw edges, defeating the point of what we're trying to do here.  Of course, there is no reason NOT to smooth your normals when the object isn't filled, so..... it actually doens't matter as much as you'd think... (after all, there is no fill, hence no gouroud shading/phong shading to deal with!)


So you end up with the attached demo.  I did also attach the python I use to generate that set - it's inputs are kind of very specific, though, it's absolutely not yet a generic tool, but i figured the technique was at least worth sharing!
#68
News and Updates / Firmware upgrade: version 1.25
Last post by Vectrex32 - July 30, 2020, 08:57:05 PM
There's a new version of the Vectrex32 firmware available, version 1.25. You can download the firmware here.

There are new features and bug fixes. See the release notes here.

- Bob
#69
Code Swap / Re: Cubic interpolation
Last post by Vectrex32 - July 09, 2020, 05:12:30 PM
Quote from: jaymzjulian on July 09, 2020, 04:39:55 PM
Everyone needs to interpolate, right?

If there are three guys, and the guy on the left needs to interpolate, and the gut on the right needs to interpolate, can we interpolate that the guy in the middle needs to interpolate?
#70
Code Swap / Cubic interpolation
Last post by jaymzjulian - July 09, 2020, 04:39:55 PM
Everyone needs to interpolate, right?  I use this for pathing:


function cubic_interpolate(a,b,c,d,t)
  ia = -a / 2.0 + (3.0*b) / 2.0 - (3.0*c) / 2.0 + d / 2.0
  ib = a - (5.0*b) / 2.0 + 2.0*c - d / 2.0
  ic = -a / 2.0 + c / 2.0
  id = b
  return ia*t*t*t + ib*t*t + ic*t + id
endfunction


or a faster version:

function fast_cubic(a,b,c,d,t)
  return (-a / 2.0 + (3.0*b) / 2.0 - (3.0*c) / 2.0 + d / 2.0)*t*t*t + (a - (5.0*b) / 2.0 + 2.0*c - d / 2.0)*t*t + (-a / 2.0 + c / 2.0)*t + b
endfunction


fast point in a 2d dot array via inlining:
(doing 512 of these takes 360 ticks, vs 628 ticks if you call functions instead!)

      a = land[((sy-1) & (dot_horizon-1))+1, ((sx-1) & (dot_horizon-1))+1]
      b = land[((sy) & (dot_horizon-1))+1, ((sx-1) & (dot_horizon-1))+1]
      c = land[((sy+1) & (dot_horizon-1))+1, ((sx-1) & (dot_horizon-1))+1]
      d = land[((sy+2) & (dot_horizon-1))+1, ((sx-1) & (dot_horizon-1))+1]
      ya = (-a / 2.0 + (3.0*b) / 2.0 - (3.0*c) / 2.0 + d / 2.0)*yoffset*yoffset*yoffset + (a - (5.0*b) / 2.0 + 2.0*c - d / 2.0)*yoffset*yoffset + (-a / 2.0 + c / 2.0)*yoffset + b

      a = land[((sy-1) & (dot_horizon-1))+1, ((sx) & (dot_horizon-1))+1]
      b = land[((sy) & (dot_horizon-1))+1, ((sx) & (dot_horizon-1))+1]
      c = land[((sy+1) & (dot_horizon-1))+1, ((sx) & (dot_horizon-1))+1]
      d = land[((sy+2) & (dot_horizon-1))+1, ((sx) & (dot_horizon-1))+1]
      yb = (-a / 2.0 + (3.0*b) / 2.0 - (3.0*c) / 2.0 + d / 2.0)*yoffset*yoffset*yoffset + (a - (5.0*b) / 2.0 + 2.0*c - d / 2.0)*yoffset*yoffset + (-a / 2.0 + c / 2.0)*yoffset + b

      a = land[((sy-1) & (dot_horizon-1))+1, ((sx+1) & (dot_horizon-1))+1]
      b = land[((sy) & (dot_horizon-1))+1, ((sx+1) & (dot_horizon-1))+1]
      c = land[((sy+1) & (dot_horizon-1))+1, ((sx+1) & (dot_horizon-1))+1]
      d = land[((sy+2) & (dot_horizon-1))+1, ((sx+1) & (dot_horizon-1))+1]
      yc = (-a / 2.0 + (3.0*b) / 2.0 - (3.0*c) / 2.0 + d / 2.0)*yoffset*yoffset*yoffset + (a - (5.0*b) / 2.0 + 2.0*c - d / 2.0)*yoffset*yoffset + (-a / 2.0 + c / 2.0)*yoffset + b

      a = land[((sy-1) & (dot_horizon-1))+1, ((sx+2) & (dot_horizon-1))+1]
      b = land[((sy) & (dot_horizon-1))+1, ((sx+2) & (dot_horizon-1))+1]
      c = land[((sy+1) & (dot_horizon-1))+1, ((sx+2) & (dot_horizon-1))+1]
      d = land[((sy+2) & (dot_horizon-1))+1, ((sx+2) & (dot_horizon-1))+1]
      yd = (-a / 2.0 + (3.0*b) / 2.0 - (3.0*c) / 2.0 + d / 2.0)*yoffset*yoffset*yoffset + (a - (5.0*b) / 2.0 + 2.0*c - d / 2.0)*yoffset*yoffset + (-a / 2.0 + c / 2.0)*yoffset + b

      return (-ya / 2.0 + (3.0*yb) / 2.0 - (3.0*yc) / 2.0 + yd / 2.0)*xoffset*xoffset*xoffset + (ya - (5.0*yb) / 2.0 + 2.0*yc - yd / 2.0)*xoffset*xoffset + (-ya / 2.0 + yc / 2.0)*xoffset + yb