Log In  


Cart #51644 | 2018-04-15 | Code ▽ | Embed ▽ | No License
27

Here's a landscape / flight simulation engine that I have been playing with. I'm still figuring out how to turn this into a game, but at least it's functional now and runs at 30 fps.

It takes a few seconds to generate the map using simplex noise mapped onto a sphere.

Controls:
Arrow keys to turn and pitch up and down.
Z-key to accelerate

Notes:
There's a 3D shaded polygon engine built into this as well, but I'm not using it yet.

Thanks Anthony DiGirolamo for the simplex noise:
--https://www.lexaloffle.com/bbs/?pid=32443

--ElectricGryphon

27


Wow that's impressive, well done :)


So smooth!


This is my new favourite thing.
Now if you could squeeze that old voxel helicopter game Comanche in there, that would be great :D

EDIT: Fixed link :D


Your link is broken arashi, trying formatting it differently.
Boop


Wow, well done. Something reminds me of the old Virus game on Amiga. Probably not really like it, just reminds me.


Excellent! Magic Carpet! :D


Magic Carpet +1


Very cool


Wow, that's amazing stuff as always electricgryphon! :D


FLOORED, that looks so good!
Another Magic Carpet vote if you feel like it.


What about the CPU? Do you still have some power left?


Or it could be a black&white simple clone


I'm at about 91% CPU right now. But if I can't squeeze more out of the engine, I can always shave a 5-10 pixels off of the left and right, change the clipping or draw distance. I think there's room before things get too chunky and noticeably degraded.

Tokens 5676/8192
Chars 33154/65535
Compressed: 13472/15360

I don't think a simplified/demake magic carpet is out of the question.


@electricgryphon

I was looking through your code (you're shocked, I know) and saw this, and I'm wondering why you've got these extra parens in here:

function rotate_point(x,y,z)	
	return (x)*mat00+(y)*mat10+(z)*mat20,(x)*mat01+(y)*mat11+(z)*mat21,(x)*mat02+(y)*mat12+(z)*mat22
end

Is this maybe copypasta from a C/C++ macro or something? I can't think of any other reason to have parens around the params like that.

I can't remember if parens incur a cycle cost, but they definitely add a token for each pair.


Ha good question-- yeah probably from a copypasta experience--perhaps I had a + offset in the parens or something at one time. If it gets tight for space, I'll definitely have to do some scrubbing.

Let me know if you see any other opportunities.


Mightily impressive as usual... Speed is perhaps a bit high for the size of the map (it seems to take only a couple of seconds to traverse).


@electricgryphon

FYI--

I was curious how well it could perform, so I diddled this and that and got it down from 0.9 to about 0.75. I didn't do anything amazing, just looked for loop invariants in the inner loop and a couple of places where I could put globals in locals to shave off cycles, pico-8-specific tricks, that sort of thing.

(I did this because optimizing is something I do for fun.)

I don't think you'd want to work on it in this optimized state, though, as it became less flexible and tweakable, but I wanted you to know you could potentially get this extra 15-20% speed if you need it down the road. I'm sure you're capable of it yourself, so I won't bother telling you what to do. :) Just thought you'd like to know the headroom is there.

(I will say that the main speedup came from putting more of the color/brightness calcs inside of the 'if' where you decide whether or not the existing height of the current column exceeds the height of what you're about to draw.)


This is so beautiful and relaxing; I'd love to play this while listening to some vaporwave haha


WOW!!! So many things to get excited about and learn from!!


Love it beatiful! you make allot of great stuff continue that way, maybe one day well see a music studio and a animation suite lol maybe google maps?

is it possible for pico 8 to retrieve information from servers? picotube, youtube but pixelated lol.

Man u are really great!!!



[Please log in to post a comment]