When I decided to try to go for an entry in the 2016 compo, I already knew a lot about 6502 and the NES hardware, but I've never coded even a basic game in practice. This combined with a very tight time limit (I essentially started a week before the submission deadline) made my code very dumb. Here's some practical issues I came into when making Brick Breaker for the 2016 Nesdev Competition:
Managing PPU VRAM writes: everybody knows you can't write to video outside VBlank, so how do you orchestrate PPU writes in the NMI handler? A *very* naive way of doing this and a beginner's trap is to have the PPU write handler think too damn much. Try to be smart and all the branching will make your per-frame output of data ridiculously slow.
if anyone can handle the cringe: https://github.com/AleffCorrea/BrickBre ... er/ppu.asm
Simplicity is key, gotta go fast! The NES Stripe RLE format is in the wiki and basically what you should be doing in your videogames. After making Brick Breaker I started another project and since I wasn't extremely time constrained I had time to think of something similar and in my first attempt I could push more than 70 bytes through the PPU no problem, ample resources to scroll and update a scoreboard.
Writing tiles AND attributes: this is truly annoying and to be able to meet the deadline I carefully set up the nametable for the game's main playfield to have the correct attributes where I'd dynamically load the game's maps. So it ended up being kinda like a color acetate overlay for the game: the top half had a pinkish palette, the bottom half had a greenish one, and the player area had a blue palette. My attribute table remains static until you go back to the title screen again, so even the "Continue" and ending text screens are written with that color scheme in mind. Definitely dumb, but I can see beginners mostly avoiding to deal with attributes, especially if they're having problems with the first item (ppu write management).
I think these are the two main issues for those that already went through the basic concepts like game/video decoupling and whatnot.
Most Common Problems for Beginners
Moderator: Moderators
Re: Most Common Problems for Beginners
This is a block of text that can be added to posts you make. There is a 255 character limit.
- gravelstudios
- Posts: 159
- Joined: Mon Mar 13, 2017 5:21 pm
- Contact:
Re: Most Common Problems for Beginners
I would say for me, the biggest issue I spent a huge amount of time constantly working on was reducing lag. Working on your first really big, complex game, it's very easy to write bloated inefficient code that runs too slow. That's OK when you're just getting the basic structure in place, but when fine tuning things, I was constantly going back over the code looking for any way possible to speed things up.
Bus conflicts between DMC and other stuff also caused me some confusion.
Bus conflicts between DMC and other stuff also caused me some confusion.