May I ask, why you started with it and not something a little bit more high level like Java or C++?
For some reason or another I've found C++ to have a much higher learning curve than assembly. Moving bits around registers can be tedious, but it's pretty straightforward and no-nonsense, but OO concepts I just find difficult to grasp and it just makes my head spin.
You probably don't have to worry about memory when it comes to the stats of enemies. How many enemies are going to be spawned at once?
Right now I'm playing with the idea of have invading hordes of enemies you eventually have to deal with. And so far I have their data structure mirror your own, they have their own stats, weapons, armor, etc. I like to have lots of in-fighting as well with the different races, so they'll probably have their own XP and character levels as well.
I don't think that you need to worry about whatever your collision detection is or how you're doing it (unless you're looping through all of the tiles in the area or something, since you really only need to check the tile you're going to).
I didn't know about tiles until I started reading this forum, I might consider implementing that. For now I actually have my mobs just plotted at random X,Y coords in the area and they pretty much have the freedom to walk onto any X,Y on the screen. Mobs are often misaligned when standing next to each other and next to doorways which is more problematic. My collision detection routine does loop through all the X,Y's in the area, and using their font width and height, tries to calculate if an X,Y is safe to venture onto.
As far as using too much memory I don't think it will be an issue, not with a Roguelike. I could be wrong. You only really need to track instances on that level, right? Things on other levels can just be saved and reloaded if you go back to that level.
You're probably right, if anything memory leaks are probably going to be my bigger concern than running out of memory
OR you can google the Nethack and Crawl wikis and be blown away by the number of items and monsters. At some point you want to figure out if you want a game with tons and tons of stuff or a game with a few things done very very well (like in Brogue).
Wow, lots of good stuff on the wiki, thanks for the heads up!
Greetings and welcome to the RogueTemple!
Thanks!
My guess is you use MASM and it is not your first programming language. You choose it because you want some challenge and a roguelike game seems like a neat thing to do in it.
Yes, I've played with asm before back in the days of DOS using Borland's TASM, more so than any other language so it didn't take long to pick up from where I left off. Coding with the windows API and with the boatload of macros available in MASM it almost feels like a high level language at this point!
Before I respond with my comments on data structures: my assembler of choice is Netwide Assembler (NASM). I view MASM as insufficient because it is limited to Microsoft. Most of my experience is with NASM. It should apply but be wary of subtle differences cropping up here and there.
I've heard NASM and FASM are good alternatives to MASM, could they all assemble from the same source code with little or no modification?
status code - 0:dead, 1:normal, 2:in_combat, 3:fatality
First two are sufficient. At least I haven't seen a roguelike using more than those two.
I have it coded this way for now, because normally my mob would just move in random directions. But that changes if the status code is in_combat, and if the target is not in range, he will try to move in your general direction to track you down.
Is this a good approach to have every mob and item in the game to have their own personal record/character sheet?
Probably not. PRIME has this. Every monster has its stats rolled and has skills. Most of that depth is neither used nor shown to the player so it is a potential complexity that is close to useless in the end. I would not bother with it unless you have specific plans how to take advantage of it.
I was thinking it may be more realistic if monsters had some individuality to them, ie their own stats, some would be stronger/faster than others, using their own variety of armor pieces and weapons and inventory.
Also after a lot of head banging and hair pulling I finally have my collision detection an pursuit code up and running somewhat, just wondering though are there standard algorithms for such things?
Ha, it is not going to get any easier in future. Respect for undertaking up such a difficult language to learn. Someone made a roguelike game in Prolog so maybe just maybe there will be one in assembly too thanks to you.
Assembly programming really seems have fallen by the wayside but there's lots of fun stuff that can still be done with it!
I think there is a place for assembly language even today, but it's not in game programming. Higher level language is better. You need to know a lot about programming to use assembly, otherwise you'll probably just waste your time.
For large scale projects, you're probably right on the money. But since I'm already somewhat familiar with asm, I decided to stick with that instead of trying to learn another language from scratch. Actually programming for Windows was almost like starting all over again but the windows api really took out a lot of the grunt work to get something up and running coding in asm.