9 ms·
Making a Game Boy Game in 2017
- juliangoldsmith 8y agoI'll have to take a look at BGB. I've been using NO$GMB, but I don't think it's maintained any more. One thing I didn't see mentioned in the article are the Pan Docs. Those document basically everything about the Game Boy at a low level.
- ionforce 8y agoI find using <OLD TECHNOLOGY> in <MODERN_ERA> endlessly fascinating. I love stuff like this!
- sdegutis 8y agoJust the other day I was looking for a good NES IDE for my son who's interested in learning assembly and who has maxed out his PICO-8 skills. I think this would be a good way for kids to learn some niche skills like assembly that are still going to be needed in some careers but aren't as widespread as JavaScript or Python.
- mikepurvis 8y agoI feel like there's a lot of value in the whole "knowing how the sausage is actually made" thing. You'll still take collections and the garbage collector for granted 95% of the time, like everyone else, but at least you will have some sense what's going on under the hood if you've had to implement pieces of it manually somewhere along the line— and an actual working implementation, not just a toy one for some undergrad class.
- Waterluvian 8y agoHaving done no CS in school and jumping right into python and JS, learning how the sausage was made was immensely satisfying. I wrote a CHIP-8 emulator in Python and then a Game Boy emulator in Rust. None of those skills have been practically useful but were very educational.
- dangero 8y agoConfidence is immensely useful
- metasaval 8y agoUnrelated question: what resources did you use to write your CHIP-8 emulator? I've also been wanting to write one in Python for educational purposes, but haven't found any great resources yet in Python. Granted there are a few in C that I could try to translate over, but I'm curious to know what you used.
- Waterluvian 8y agoI looked at the Wikipedia page and a couple PDFs from Google front page. I stole a collection of games from someone else's project to use for testing. My goal was to get in the door so I picked a language I knew well and set some constraints: 1. Doesn't have to be fast. Just has to run. 2. Write opcodes as pure functions, passing in an array of memory and returning a new array of memory. This made it easy to test and debug. But also made it super slow. 3. DO NOT look at someone else's code. This forced me down a way slower path where I learned a whole lot more than I would have if I just reimplemented others' work.
- acomjean 8y ago>None of those skills have been practically useful Honestly you never know when something you are familiar with becomes important later. Something that was important to get it done may not be as important in later tasks. (My Operating Systems Class at university was greatly useful in my first job, not as much after) My dabbling in JS got me job programming timecard apps for blackberries and changed my work trajectory. This field changes so fast and you can't learn everything, so learning things you enjoy and help you get what you are working on now. That and data-structures and databases, you can never know enough about both.
- RodgerTheGreat 8y agoIt's a platform a good bit older than the NES, but you might have some fun with http://octo-ide.com http://octo-ide.com
- sdegutis 8y agoI found https://8bitworkshop.com https://8bitworkshop.com which seems to be just what we're looking for, but since it's a web app and we don't have internet at home, it's going to take some effort to get it working for him.
- ducttape12 8y agoCuriosity got me - why don't you have internet at home?
- sdegutis 8y agoIt's a huge time sink. We've gotten more done at home in the past 6 months since getting rid of TV and internet than we have in the past 6 years. And our family life is significantly more connected and alive than when we had TV and internet. I heartily recommend everyone try it for a couple months. No TV, no mobile data plan, no home internet, no radio. It's amazingly refreshing. Edit: another reason is that almost all social media is geared towards making you addicted to it and encourages hopelessness, and when you get rid of social media, not just deleting accounts but even to stop consuming it regularly, your attitude will just change for the better on a daily basis. Waking up will feel refreshing, not burdensome, like today is a new opportunity, not a new day of drudgery. Well, at least it will play a big part in this shift.
- tracerfett 8y agoI wish I could try this but I work from home and have recently taken on a side gig, all of which require internet.
- vpzom 8y agoso how are you, uh, posting on the internet right now?
- cbm-vic-20 8y agoThis guy has been streaming development of a NES game: https://www.twitch.tv/zorchenhimer https://www.twitch.tv/zorchenhimer
- AnIdiotOnTheNet 8y agoThe thing I love most about older computing technology is that it wasn't ridiculously over complicated yet. In order processors with fixed instruction sets, no MMUs, no caches, no 500 layers of abstraction between you and what you're actually trying to accomplish. You know, stuff you could form a solid mental model of and reason about. Part of me really wants to go back to that world, even if it does mean a huge loss of performance.
- chocolatebunny 8y agoThere are still some developers who work on microcontrollers and the like. Also a lot of the embedded world still has MMUs and caches but there's not a whole lot of software between you and hardware.
- AnIdiotOnTheNet 8y agoI have a few problems with that, though. For one, I don't really care about the vast majority of projects that kind of stuff is used for, and for another they often have closed proprietary toolchains.
- ab71e5 8y agoReally? Because it's used in so many fields there should be something interesting there one would think. Of the top of my head: Defense, agriculture, home automation, industrial automation, finance, automotive, oil&gas, space resarch, robotics. The list goes on! I think the proprietary toolchain stuff is also changing, but slowly.
- AnIdiotOnTheNet 8y ago> Defense, Ethically dubious, and I don't care about making money. > agriculture, I don't care about making money and I doubt there are not already much better solutions by people who, for instance, actually know something about agriculture. > home automation, Needless overengineering masturbation as far as I'm concerned. > industrial automation, finance, automotive, oil&gas, space resarch, robotics See above re: money, and products already made by people who know shit. Personal computing is what interests me, and most people doing personal projects with this stuff are making overengineered light blinkers or garage door openers or some other nonsense.
- kuu 8y agoQuite interesting!
- straws 8y agoPreviously: https://news.ycombinator.com/item?id=15884051 https://news.ycombinator.com/item?id=15884051
- ArmandGrillet 8y agoAnd in 2019: https://www.gbstudio.dev/ https://www.gbstudio.dev/
- chrismaltby 8y agoThe author of this article was really helpful chatting with me on Reddit while I was building GB Studio and still working it all out :-)
- calewis 8y agoThis is so well written and so cool! I love how it's on a real cartridge. I had no idea this would even be still possible. Amazing work!
- voqk 8y agoI bought this Game Boy Color Replacement LCD https://www.mw-embedded.com/product/gameboy-color-replacement-lcd-module/ https://www.mw-embedded.com/product/gameboy-color-replacemen... which gives the device a really nice backlight. Here's the 8-bit guy's video of the process: https://youtu.be/WG8loyh-kFw https://youtu.be/WG8loyh-kFw Another great GB development resource is https://github.com/gbdev/awesome-gbdev https://github.com/gbdev/awesome-gbdev
- jweir 8y agoA correction. We didn’t use graph paper for the art work. Maybe be very first artists did, but not any I know. The tools were pretty good. Deluxe Animator II and Deluxe Paint - both for MS DOS - is what I used for all my console games - Game Gear, Game Boy, SNES etc.
- tosh 8y agoWhich games were you working on? (<3 Game Gear)
- jweir 8y agoDouble Dragon for Virgin Games https://www.mobygames.com/game/double-dragon___ https://www.mobygames.com/game/double-dragon___ I don't think I did any art for it – as I recall I calculated sprite x,y offset to hand off to the programmer for the motion. Pretty happy to be doing it to - this was my first job out of high school.
- ghostbrainalpha 8y agoI loved the hell out of that game. Probably spent 100+ hours with Double Dragon.
- GelatinousSqure 8y agoDeluxe paint for the Amiga.... I still have a copy of that. They are the classic versions.
- IceWreck 8y ago> Despite a mere 4Mhz speed, all the Game Boy games are displayed in constant 60fps. Take that PS4 Pro and Xbox One X! My favorite line from the post.
- basementcat 8y agoThe Gameboy has the advantage of a smaller display with fewer pixels (with less colordepth) to update. 16 bit pointers are also (relatively) easier to push around than 32 or 64 bit pointers.
- ekimekim 8y agoI would wager that doesn't make up for how much slower the hardware is, though. The 4MHz value is the clock speed, but all instructions take a multiple of 4 clock cycles to accomplish, so you often talk about it as a 1MHz "instruction cycle" machine. The fastest memcpy implementation I've seen for it (not including in-hardware DMA features, which are only available for copying to OAM (sprite) RAM on the original gameboy) takes 4.5 cycles per byte (one 16-bit word every 9 cycles). That means that if you were trying to update every pixel on the screen (which doesn't actually work - the GB's screen pixels aren't memory mapped directly but generally specified via a combination of up to 384 unique 8x8 tiles, which are then arranged on a 20x18 tile grid), which would be 160 * 144 * 2 bits/pixel = 5760 bytes, it would take 25920 instruction cycles ~= 24.72ms, which comes out to approx 40.45 FPS. Of course, as I mentioned, the actual GB doesn't work like that, and has a Pixel Processing Unit that handles writing to screen every frame. While the PPU is writing to the screen, the CPU cannot access VRAM, which means that the CPU actually only gets what's called the v-blank period, which is only 1140 instruction cycles, which is only enough time to copy up to 254 bytes or so (I'm skipping over some detail here, like how you could squeeze a few extra bytes out by loading the first 4 or so bytes into registers before vblank begins, or how you can also (with very careful timing) write to VRAM during a ~60 cycle window on each line knowing as the h-blank and OAM search periods). In practice, games work despite these limitations because they generally only have to modify a small amount of the screen in any one frame. Scrolling is implemented in hardware, and you can write new data off screen then scroll into it so you can take multiple frames to write it if needed. This plus other tricks (for example, animating 50 copies of a common tile by editing the tile's pixel data, which affects every copy at once) let these games accomplish so much with so little. It's impossible to compare to a modern sytsem with a polygon-based GPU, they're entirely different things.
- mywittyname 8y agoFor those interested in classic game dev, the guys at the Computerphile YT channel did a series with a guy that wrote a Genesis game a few years back using an original dev kit on a mid-90s PC. https://www.youtube.com/watch?v=GH94fKtGr0M https://www.youtube.com/watch?v=GH94fKtGr0M
- azhenley 8y agoAfter reading the post a few days ago about the Playdate console and reading this post, it makes me wish there was a popular retro-style handheld console that I could develop for.
- sneakernets 8y agoHonestly, I can't recommend the GBASP enough. It's small, it has a lot of power for a handheld of that era (enough to pull off texture-mapped polygonal graphics at an acceptable frame rate) and the addressable ROM size is practically limitless, going all the way to 64 MB.
- azhenley 8y agoI guess I should add another requirement to my wish list: a modern app store so indie devs can sell their games :) I am considering teaching a university course where the students implement a NES or GB emulator though. Should be a blast!
- copperx 8y ago> I am considering teaching a university course where the students implement a NES or GB emulator though. Should be a blast! I was considering doing the same for my Machine Language class, but it seems that many games rely on the precise timing of the emulation to work. And, because the output was an anolog TV, there are a lot of tricks that need to be figured out. I thought that was a no-go for a course.
- tieze 8y agoyea, I posted with another suggestion on this thread, but the GBA itself is just such a dream machine. It's the sweet spot for retro programming in my mind. All the cool console features, streamlined hardware, simple interface. So good.
- tieze 8y agonot popular I guess; it's not even out yet, but the Pimoroni people are doing a GBA-like handheld kickstarter geared towards developing, called 32blit. Doesn't have all the cool bitmap, sprite, etc hardware I'm sure, but they try and give a pretty integrated environment. Also maybe geared a bit more towards beginners, but I really like the idea. And because it's modern hardware, you can just use all your standard tools. It's also got hardware debugging, looks like.
- orionblastar 8y agoMy Nephews stole my Gameboys by borrowing them and never returning them. I still got a DS my son owns. But I had the Classic Game Boy, Game Boy translucent case, Color Game Boy yellow shell, Game Boy Advance SP. All gone now. They are collector's items now worth a lot. I had an Atari Lynx but had to sell it because I needed the money. It was like the Game Boy but Atari and it had color graphics and slim cartridges. I think Free Pascal or some other language can make console games by cross compiling. Right now I have a Raspberry PI with RetroPI to play Gameboy games.
- ngcc_hk 8y agoThat is what learning to compute all about. Since day one. What is the driver of internet. Or pdp machine. To play game developed and maintained by us and fellow hackers. Stay hungry and hack.
- Lyrkan 8y agoI'm wondering if selling physical copies of the game doesn't come with legal issues... The "Nintendo" logo you see when booting a Game Boy comes from the cartridge and is checked against one stored in the console. If they don't match the whole thing stops, which means that you have to add (and distribute) a Nintendo logo to your game in order for it to work on real hardware.
- philistine 8y agoI have not tested this particular game on real hardware, but multiple games found ways around the console's logo checksum. It has a buggy implementation that can be circumvented, allowing you to never have the logo on your cartridge.
- jkoudys 8y agoGreat read! I was active in the gb dev scene in the late 90s (hmu if you remember gbdev99 or the bunghk contests), and it's amazing to see so many of the names and libraries built so long ago still come up today. The Game Boy is still one of my favourite platforms today; such a great example of what you can accomplish with very limited resources if you have enough creativity. We've seen some of the best games of our generation come out on a battery-powered device with a CPU that can't even multiply.
- Kipters 8y agoFor anyone interest, I recommend watching "The Ultimate Game Boy Talk" [0] from 33c3, lots of interesting details about how a Game Boy works, including the PPU [0]: https://www.youtube.com/watch?v=HyzD8pNlpwI https://www.youtube.com/watch?v=HyzD8pNlpwI