Improved StarFox game

I saw @Kiwiphoenix364 make a small Starfox demo and I though I wanted to try my hand at making Starfox in Makecode Arcade. Similar to KiwiPheonix’s, it is of course not “real 3D,” it just has the appearance of being three-dimensional.

Use arrow keys to move and press A to shoot(shoots a useless laser)

It isn’t really a game right now, just some physics. I was going to add some music using the ArcadeMIDI extension, but I couldn’t get much to sound good, so I took it out.

9 Likes

really great gives ideas for making a version of slope I could make

Hmm, I think I can make something like this using raycasting. I don’t think I’ve seen anything like that before.

Anyways, good job! The simulated physics is pretty cool and the collision for the arches is really neat. :grin:

1 Like

NEW UPDATE: I made the gound way better, added tilting, and more camera movement!

Also, i think the link to the first version is broken, and it will send you to this version, but it might just be my computer.

It runs at about 200fps on my computer, can somebody try how fast it runs on hardware?

I have the next update ready, but I am still fixing some bugs. Update 2 will have enemy turrets that shoot at you, a score system, bonuses for going through arches, extra lives, and some minor changes.

4 Likes

I tried running this in hardware (xtron pro) and it was decently fast. It regurarly drops down to 6 fps though, even 4 at some times but it’s not that noticable.

NEW UPDATE: added all of the things I promised in my last post.

Now you actually have to use your laser cannons.
You get an extra life every 5000 points

Ideas for next update:

  • enemy starships
  • mountains in background
  • different kinds of obstacles
  • an actual level layout instead of the obstacles being random
  • the lasers to look more like the ones in the actual game

Please be sure to give me feedback and ideas for me to improve my game!

4 Likes

There is a way that I can compress it to run faster on hardware. This means doing things like making the ground renderer have less lines, and making the assets be smaller. I’m hoping it will run on hardware at at least 15fps, so you can experience the movement more.

1 Like

Hey, @kwx, is your current 3d engine capable of doing something like this? I am interested in making my game using “real” 3d instead of my “fake” 3d. I think a simpler 3d engine with no shading might be more ideal for having it be more colorful, similar to the one used in the link above. I would love to learn how to make my own models using your code :smiley:.

It’s generally possible, but performance is likely to get bad on hardware as graphics get more complicated. Check out Carrier 3D (unfinished work in progress) which has logic for drawing a horizon line, this could be extended to draw the ground in multiple sections.

As far as making models is concerned, that currently isn’t very well documented but you can take a look at the source code, for example the carrier model in “Carrier 3D” (see link above), or the enemy ship in Space Rocks Revenge: [Announcement] MakeCode Arcade Mini Game Jam #4 - Outer Space Jam - #37 by kwx .

In short, you’d need XYZ vertex coordinates for all the corners (I use graph paper for this), make polygon faces by connecting the vertices, and then assemble the model from them. That last bit gets a bit complicated since my renderer doesn’t handle depth automatically, so the models need to be defined as a binary space partition (BSP) tree. Basically, you need to use planes to slice the model into parts, and do that recursively until you’re left with convex parts that the render can handle correctly.

I’ve not had much luck finding a good online explanation for this use of BSP trees (most demos seem to use Java applets which aren’t exactly well supported these days), but https://www.youtube.com/watch?v=YT8ya4H-Z8Q looks helpful as an introduction.

2 Likes

Thanks for the info @kwx!
I have a question:
Do you have a project that is basically the raw 3d code? Kind of like your 3d graphics test but updated with the 8 grays 8 colors, the updated engine used for Carrier 3d and Space Rocks Revenge, and cleaner code? This would be useful for me to test out models and see how they look in Makecode Arcade.

See 3D graphics test - #18 by kwx for some context, and the post following that for a cube example. Like I said there, I think it would be difficult to turn this into a general purpose 3D engine. The code is finicky to use due to performance constraints and full of leaky abstractions.

3 Likes