I’m currently working on a rogue-like for the DS. It’s a bit tricky, especially since i’m going against all advice regarding learning c++. I’ve tried learning on a pc first, but when i try to compile and get a few errors, i lose motivation and get sidetracked by dwarf fortress or something. But when i get compile errors when i’m making something for the DS, it’s exciting, like a challenge. So i’m learning both at the same time. And i don’t have internet at my dev machine, so looking something up is a bit of a hassle. Anyway…
My first attempt was using pure iprintf statements, and lots of them. Cearn made a few suggestions, one was to stop iprintf-ing each element and make a large string and print the whole thing at once, or better yet, to use graphics, since the DS is a graphics machine. I considered the first option, since part of the reason i’m going with a rogue-like in the first place is to avoid messing with graphics yet. But i decided that he his right, and i’ve been fiddling with the graphics. That was a bit of a hurdle, but i think i’ve got a decent start on that.
Now i’m stuck on some of the mechanics. When i was just using print consoles for everything, i had my checks for walls and other monsters working, but now that i’m back on track with graphics, i’m having trouble with those checks. I need to examine my code a bit more. I’m going to try to work on it some more before asking for help on the forums, i think i can get it. I do have scrolling working now, that’s fun. Some fine tuning could happen there, but i like it.
So i’m looking into bitfields for my tile info with flags for blocking movement, line of sight, is it a door?, is it open?, is it stairs? up or down? explored?… I think once i get a more solid map system in place the checks for walls should be easier.
Also having trouble with the message system, but that’s not a big deal yet. I’m putting everything together on the top screen for now and using the bottom for spitting out variables, eventually i would like to get a solid message system in place, but that will probably be the last thing i tackle before i get to save file i/o. Currently going by the “making a rogue-like in 15 steps” article from roguebasin.
I’m in a bit of a hurry right now, but i’ll come back later with some links and some sample code. Thanks for reading!