I decided that as CoD wasn’t going to be on the scale I had envisioned, I would, against all common sense, change the UI from ncurses to something more graphical like SFML I have never used SFML before.
So that went about as well as you would expect. One good thing is that I discovered my architecture is sound. All I had to do is change the render and input systems to use SFML and the Appearance component to use a sprite instead of an ASCII character. (There would be a screenshot here but I can’t seem to upload it to WordPress for some reason I am too tired to figure out right now. Maybe tomorrow.) Fixing the bugs caused due to my lack of experience with the library took a lot of time but I got it done in the end.
Nevertheless, on a scale of 0 to 10 where 0 is resounding failure and 10 is smashing success I’d have to give the game in its current state a 4 and therefore I’m considering it a fail. The game is basically playable (albeit very boring) it has the essential features of a roguelike such as procedural generation, character progression (barely), and permadeath but I did not achieve my personal goals and it will need some cleanup before I dare show the code to the outside world.
I’m getting pretty tired of writing these posts where I only say I did nothing but real life keeps intruding. Today I did not so much as even look at the code. If I sprint during the weekend I may still be able to make a playable game but I will have to drastically curtail my ambitions in order to do it.
Another day where sadly I was not able to devote as much time as I wanted. However I do have a dungeon level with rooms and corridors and doors and an @ that moves in it.
One design issue is that came up is should everything be an entity? If every floor and wall tile is to become a separate entity that is an extra 4800 per level assuming an 80 x 60 grid. As each one will have to have an Appearance and Position component at the minimum, that’s going to need an extra kazillion bytes of RAM. (Calculation is an estimate.) I ran out of time to think about how that’s going to work. In the mean time doors are entitities with an Opens component along with Position and Appearance. And Sir @salot is one with Moves, and Inputs components alongside Position and Appearance. (Some of my components are named as verbs and some as nouns. They ought to be one or the other for consistency.) There are three systems at the moment. Create for creating the dungeon, Input, and Render.
No sooner had I written my last post when I found the cause of my C++ problem. Isn’t that always the way? I went to sleep thinking I could finish up today. Unfortunately, today was really hectic in real life so I have only been able to devote an hour to the game. But atleast now I have a fully functional Component-Entity-System architecture set up so tomorrow I will be able to start developing the actual game.
The title of my latest attempt is “Casket of Deplorables.” My goal this year is to understand how to use an Entity-Component-System architecture and hopefully get a playable game out of it. Unfortunately my first day has been spent wrestling with C++ (I’m also trying to explore the newest features of C++14 at the same time.)
I have been a bit remiss about blogging the past few days but I’m happy to report that TGWPWTDN successfully completed the 7DRL challenge.
Here is a screenshot:
Altogether I spent about 50 hours out of the possible 168 and I have ~2500 lines of C++ to show for it. They implement moving, fighting, taking and dropping, wielding and unwielding, not to mention quaffing, traps, doors, potions, weapons, armor, and 15 types of monsters some with special powers. The end result is a somewahat playable game.
My big regret is that I was not able to implement FOV. I had some code from roguebasin which I had previously used successfully but this time it was giving me strange c++ errors and I was running out of time so I had to give it up. This means you can see the whole maze which makes it easier to plan moves. Even with this misfeature, TGWPWTDN is rather unbalanced. There are far too many traps and no way to detect them. There are too many doors as well or atleast the door creation algorithm needs to be tweaked as you can sometimes get a series of doors one after the other (my record is 5!) As you have to batter down doors if you don’t have a key which rapidly depletes stamina this is not good.
So in the future I will be fixing these problems and adding more features. I want more items including magical items (scrolls, staves etc.) More variety in monsters including AI and movement perhaps. Character classes or skills. Some sense of time (race against the clock, hunger etc.?) Oh and better graphics. Compared to some of the other beautiful entries, my game looks like crap. I want to look into libtcod or noteye or maybe go the whole hog and make a GUI. After all one of the objectives of the Procedural Death Jam was to use OGA graphical assets.
Anyway here is the link to the source on github. Check it out and let me know what you think.
Not much to report today, just more infrastructure work on monsters and items. It should start paying off tomorrow.