TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

133 点作者 mcejp7 个月前

13 条评论

eig7 个月前
Shockingly enough it is actually possible to do decent ray casting and much more on the GBA despite the incredibly minimal compute budget.<p>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:<p><a href="https:&#x2F;&#x2F;youtu.be&#x2F;9mUsgJ-HiDM" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;9mUsgJ-HiDM</a>
评论 #41874526 未加载
评论 #41873137 未加载
评论 #41878607 未加载
评论 #41878407 未加载
评论 #41883577 未加载
nsxwolf7 个月前
It&#x27;s funny to me when people apologize for not being artists when they&#x27;ve produced actually nice looking art. It&#x27;s like a host saying &quot;excuse the mess&quot; when entering their nearly immaculate home.<p>I wish I had kept some of my game development experiments because then I could show you what actual bad art looks like!
评论 #41871785 未加载
评论 #41871725 未加载
评论 #41876356 未加载
hrydgard7 个月前
Not sure if you care at this point, given that you stopped working on project, but there&#x27;s a better way to find the ray direction for each column than using sin&#x2F;cos for every one, which will also get rid of the slightly warped look:<p>Calculate the two vectors from the camera at the very left and right of the screen (using your fov angles and sin&#x2F;cos, that&#x27;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.<p>This will create a perspective that integrates tightly with sprites that you 3D project the usual way, and lines will stay straight lines.
评论 #41882619 未加载
评论 #41877231 未加载
marci7 个月前
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<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=igEUjEci-eg" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=igEUjEci-eg</a><p>They even made a web demo. I&#x27;ve been replaying the whole game with my GoG.com Tomb Raider copy.<p><a href="http:&#x2F;&#x2F;xproger.info&#x2F;projects&#x2F;OpenLara&#x2F;" rel="nofollow">http:&#x2F;&#x2F;xproger.info&#x2F;projects&#x2F;OpenLara&#x2F;</a>
RankingMember7 个月前
&gt; Don’t get stuck on assets. Make a quick placeholder when necessary<p>Need this tattooed in my ADHD brain. Assets are such a rabbithole
timenotwasted7 个月前
As someone who has tried and failed at many points throughout the years at building a game I couldn&#x27;t agree more with &quot;Build a game, not a game engine&quot; it&#x27;s hard not to get sucked into the game engine black hole though.
评论 #41872257 未加载
Shawnecy7 个月前
&gt; What didn’t work<p>&gt; 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.<p>This is what always kills it for me. It&#x27;s not so much that there aren&#x27;t good off-the-shelf content packs, its that unique gameplay ideas with unique visualizations don&#x27;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&#x27;s artist.<p>And also like the article points out, the latter is fine if you&#x27;re looking to commercialize it, but it doesn&#x27;t seem like there are many artists offering their skills for free games made casually in a developer&#x27;s spare time. It seems there&#x27;s a critical threshold of game development &quot;seriousness&quot; that needs to be committed to by all involved to make it worth the time and effort of others.
favorited7 个月前
Tangentially related, I&#x27;ve been extremely impressed following 3DSage&#x27;s work. I&#x27;ve only dipped my toe into GBA programming (&quot;hello world&quot;-level stuff), and the fact that they built a real-time 3D level editor is mind-blowing to me.<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=msM_oYqUMT0" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=msM_oYqUMT0</a>
评论 #41878204 未加载
Kapura7 个月前
The takeaway that &quot;content&quot; can be the hard part in making a game is why I think its so important to make games with teams. There are some folks out there who will produce art the way an engineer produces code; all they need is to be empowered.<p>The best games are developed as a technical-artistic partnership, with both sides pushing and enabling the other.
bhaney7 个月前
From my perspective, this is a great outcome for a game-making attempt. There&#x27;s no shortage of fun games coming out lately - far more than I have time to play. But these days they&#x27;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&#x27;m lacking these days are fun technical accomplishments to read about in the gaming space, like a GBA raycaster.<p>No offense meant to the author at all, but I probably wouldn&#x27;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.
rspeele7 个月前
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.<p>One thing I took full advantage of as a kid was that both games had some cheesy behavior with the sniper rifle scope implementation.<p>In the first game, while zoomed in with the scope you could use the D-pad to move your view a few clicks left&#x2F;right&#x2F;up&#x2F;down to refine your aim. However, this was not really <i>turning</i> 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&#x27;t see your character and wouldn&#x27;t engage you. Or stand just slightly behind a corner, scope in, and D-pad right to shoot around it.<p>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&#x27;s no way kid me would&#x27;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.<p>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&#x27;t work exactly the same way. If you zoomed in staring at some obstacle right in front of you, you couldn&#x27;t move the viewport to see around it like you could before.<p>However... when you zoomed in, it worked like you were a ghost <i>moving forward</i> in space, instead of narrowing your FOV from your original vantage point. So you&#x27;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&#x27;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.<p>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.
tightbookkeeper7 个月前
&gt; generate a C++ header with the compiled data<p>So many human years have been wasted trying to avoid this simple solution.
Tyr427 个月前
TONC is amazing. I learned so much from it.