Step into cyberspace with cutting-edge 3D vector graphics. Battle tanks with your triangular pew-pew cannon. Explode into a number of polygons.
This is an homage to Specter VR, which came packaged with my Macintosh Performa back in the day.
https://www.mobygames.com/game/spectre
Features:
-60 fps
-Motion blur effects
-Blue/Red 3D glasses mode (it actually works)
-Multiple camera modes
-An attempt at writing title music
Issues:
Gameplay is a bit, well, simple. Basically drive around shooting and being shot at.
--Electric Gryphon
Yes!
Anaglyph 3d is my favorite gimmick!
(If anyone ever made a game with anaglyph and a light gun I'd never do anything else.)
Without digging through the whole code, How are you blending the two channels?
Oh, I see, You're flickering frames at 60fps. I wonder if this will work on PocketCHIP.
Trying it out here on the web player, there might be a bug where after you die it drops back down to 30fps, because the stereographics gets really jittery after I die and go back to the main menu.
Hi apLundell,
I think I have a memory leak to hunt down / objects that are not getting deleted at game over. Time to snoop around...
3D glasses light gun game you say? Hmmm... I wonder if my Desert Lead game would work at 60 fps.
Update: Fixed the memory leak. Framerate shouldn't drop between games.
I see that you are using a lot the for x in all(set) construct.
My benchmark indicates it is mucho slower than for i=1,#set do...end
Any reason you are sticking to this construct?
For info, my dynamic list pattern is the following:
local set={c=0} function set:add(elt) self.c+=1 self[self.c]=elt end function self:apply(fn) local n=self.c self.c=0 -- virtually clear dataset for i=1,n do local elt=self[i] if fn(elt) then self.c+=1 self[self.c]=elt end end end |
It's really faster to repack the list then it is to to use in/all?
In places where I needed to optimize speed, I have mostly switched to: "for i=1, #set do"
But I'll still use the: "for item in all(list) do" construct initially because it reads more clearly, and it handles deletions dynamically out of the box. (I'll keep your snippet in mind though if I need the boost.)
I see that you are using a lot the for x in all(set) construct.
My benchmark indicates it is mucho slower than for i=1,#set do...end
@freds72 - This is good to know! I've been using the for..all() to save on tokens but in cases where token space is available, great to know the other loop syntax is faster.
Sorry to continue derailing the thread on particle pattern, but here a crude benchmark for 128 particles:
- mode 1: my "reuse" collection pattern :)
- mode 2: standard add/del pattern
- mode 3: memory backed collection (0x4300)
Results: my pattern wins :), close second add/del (but slightly unstable cpu usage), last memory (disapointed!)
Complementary screenshots (just because) and code:
Electricgryphon: now that I know a pico-8 god laid his eyes on my code, I can die a happy man :)
"Bench" code:
Yes. Not perfectly, but yes.
I tried it with Red/Cyan glasses. The 3d effect was ok. There was some ghosting though. Playing for too long might give you a headache.
It might work better with Red/Green glasses, but those are harder to find, I don't happen to have any on hand.
The depth effect itself is a bit subtle. The difference between near and far objects isn't too extreme. I usually prefer subtle 3d over crazy in-your-face 3d effects, but I think I would have exaggerated this one a little more.
Short version : It works well enough to be a fun gimmick. But don't throw away your Virtual Boy just yet.
Yeah Red/Green glasses are hard to find these days as the accepted new standard is cyan/red. (Even Minecraft's Anaglyph mode uses the C/R option.)
But there is hope!
Wherever you shop and whatever kind you get though, You'll find the plastic or metal ones are far superior to the crappy cardboard 'tossaway' ones. Those use cellophane which is not durable, And gets dirty and crinkles easier.
Not meaning to distract, Just anaglyph is awesome. Also be interesting to see this effect used with the "Poculous chip" mod in mind.
And if anyone has an old set of 'active shutter' style glasses and a CHIP a fun project could be timing the refreshes to flash red and cyan filters at the right hz to work with those too through the gpio pins and some tricky timing with the DRAW function. I used to have the Sega set and let me tell you, Zaxxon was a whole other beast playing with those on. X3
[Please log in to post a comment]