Live data from Hacker News

How I failed to make a game: Raycasting on the GBA

mcejp.github.io

11–20 of 36 posts

Re: How I failed to make a game: Raycasting on the GBA

#11
> What didn’t work

> Content. Brace for an obvious statement: it is one thing to imagine a grand, Daggerfall-scale game in your head, and a completely different thing to actually start building the pieces that make it up.

This is what always kills it for me. It's not so much that there aren't good off-the-shelf content packs, its that unique gameplay ideas with unique visualizations don't have ready made assets. Even for a simple game like pong, if you want to do something graphically unique with it (make the paddle shake, charge up, or have a power bar embedded in it that fills up whatever), then you better be prepared to become an artist or find someone who will be your game's artist.

And also like the article points out, the latter is fine if you're looking to commercialize it, but it doesn't seem like there are many artists offering their skills for free games made casually in a developer's spare time. It seems there's a critical threshold of game development "seriousness" that needs to be committed to by all involved to make it worth the time and effort of others.

Re: How I failed to make a game: Raycasting on the GBA

#12
Tangentially related, I've been extremely impressed following 3DSage's work. I've only dipped my toe into GBA programming ("hello world"-level stuff), and the fact that they built a real-time 3D level editor is mind-blowing to me.

https://www.youtube.com/watch?v=msM_oYqUMT0

Re: How I failed to make a game: Raycasting on the GBA

#13
post #9

Shockingly enough it is actually possible to do decent ray casting and much more on the GBA despite the incredibly minimal compute budget. Joshua Barretto has been working on a GBA port of Super Mario 64 with entire 3D levels, characters, and movements. In my opinion just incredible work: https://youtu.be/9mUsgJ-HiDM

The one that blew my mind as a kid was Need for speed underground:

https://youtu.be/36U2xN-196c?si=T7xSCeKxss_at3S0

Re: How I failed to make a game: Raycasting on the GBA

#14
From my perspective, this is a great outcome for a game-making attempt. There's no shortage of fun games coming out lately - far more than I have time to play. But these days they're largely made by amateur non-programmer indie devs tooling around in Unity or similar, and have no technical merit despite being very fun. What I'm lacking these days are fun technical accomplishments to read about in the gaming space, like a GBA raycaster.

No offense meant to the author at all, but I probably wouldn't have played this game even if it were fleshed out and finished. Very glad I got to read about some of the technical decisions that went into making it and poke through the code though.

Re: How I failed to make a game: Raycasting on the GBA

#15
This reminds me of playing Ecks vs. Sever on the GBA. A raycasted 2.5d doomlike game based on a crappy movie. It was pretty impressive for a GBA game, and it ran well, never stuttering. It had some pretty cool levels, I remember one where you fight through a hotel using IR night vision. It also had a sequel which added a guided missile launcher and some crazy Robocop ED-209 type enemies. As I recall both had multiplayer deathmatch but good luck finding a friend who also had the game and a link cable.

One thing I took full advantage of as a kid was that both games had some cheesy behavior with the sniper rifle scope implementation.

In the first game, while zoomed in with the scope you could use the D-pad to move your view a few clicks left/right/up/down to refine your aim. However, this was not really turning you, it acted more like you were a ghost side-stepping and poking his head up and down. So, you could crouch behind a box, scope in on the box, then D-pad up to look over it and shoot an enemy mob who still couldn't see your character and wouldn't engage you. Or stand just slightly behind a corner, scope in, and D-pad right to shoot around it.

The last level of the first game involves fighting a boss character who has a powerful weapon and a ton of HP, and is surrounded by his infinitely-respawning goons. There's no way kid me would've beaten it without abusing this trick, which reduces the challenge to avoiding his attacks while fighting enough lower-tier enemies to obtain their precious sniper rifle ammo.

In the second game, the D-pad moves a crosshair around a fixed viewport rather than shifting the whole viewport around. So the trick doesn't work exactly the same way. If you zoomed in staring at some obstacle right in front of you, you couldn't move the viewport to see around it like you could before.

However... when you zoomed in, it worked like you were a ghost moving forward in space, instead of narrowing your FOV from your original vantage point. So you'd instead stand about 10 feet back from a corner, zoom in past the edge, and voila: you were able to see more around the corner just as if you'd walked up next to it. Sure enough, you could slide the crosshair over and snipe the enemies now visible in your viewport despite your player character still being safely 10 feet back around the corner.

Good times. They were still great GBA games even with this exploit, it just made the (scarce) sniper rifle ammo even more valuable to the player.

Re: How I failed to make a game: Raycasting on the GBA

#16
Not sure if you care at this point, given that you stopped working on project, but there's a better way to find the ray direction for each column than using sin/cos for every one, which will also get rid of the slightly warped look:

Calculate the two vectors from the camera at the very left and right of the screen (using your fov angles and sin/cos, that's fine). Then, to find the ray direction vectors for each column, interpolate linearly between your left and right direction vectors, and possibly normalize the resulting vectors if your ray walking algorithm requires it.

This will create a perspective that integrates tightly with sprites that you 3D project the usual way, and lines will stay straight lines.

Re: How I failed to make a game: Raycasting on the GBA

#17
post #9

Shockingly enough it is actually possible to do decent ray casting and much more on the GBA despite the incredibly minimal compute budget. Joshua Barretto has been working on a GBA port of Super Mario 64 with entire 3D levels, characters, and movements. In my opinion just incredible work: https://youtu.be/9mUsgJ-HiDM

The one that blew my mind as a kid was Need for speed underground: https://youtu.be/36U2xN-196c?si=T7xSCeKxss_at3S0

I distinctly remember Spider-Man 2 on GBA having a 3D overworld. It was my first introduction to the concept of "low framerate" in a videogame haha. Incredible what people were capable of doing with the hardware back then.

Re: How I failed to make a game: Raycasting on the GBA

#18
Might be of interest to those of you that ended up here: PS1 Tomb Raider ported to the GBA, Sega 32X and other platform with the OpenLara project

https://www.youtube.com/watch?v=igEUjEci-eg

They even made a web demo. I've been replaying the whole game with my GoG.com Tomb Raider copy.

http://xproger.info/projects/OpenLara/

Re: How I failed to make a game: Raycasting on the GBA

#19
post #9

Shockingly enough it is actually possible to do decent ray casting and much more on the GBA despite the incredibly minimal compute budget. Joshua Barretto has been working on a GBA port of Super Mario 64 with entire 3D levels, characters, and movements. In my opinion just incredible work: https://youtu.be/9mUsgJ-HiDM

There was actually a fully 3d platformer released for the system during it's production run, Asterix & Obelix XXL: https://www.youtube.com/watch?v=b0pknb4ghUA
Post reply on HN