I started a somewhat annoying project yesterday on a whim.
A friend and I were going through some of my old games and he wanted to see me play Exile. It's been just over 3 years now since I made it, and I actually managed to dig up the original release, and found its source code.After playing through the game (and actually sucking at it, since the developer immunity wore off in the 3 years since I've played it), I came to two conclusions: - I need to finish this, just because. - I need to clean up the damned code.I technically already have a "cleaned" version of the code in the form of whatever-version-number I'm up to of the Exile Engine. But here's the problem: It works a lot better but isn't compatible with the original game's data.I've tried several times before now to 'upgrade' the original game to the new engine, as well as write backwards-compatibility for the old data into the new engine, but I tend to burn out far too quickly (There are a ton of tools I have to make, converters, redesign maps and AI, etc). So I decided yesterday to instead use the horrible code I already have, and just "complete" the game. Part of that completion includes making it Linux compatible. Because there isn't any excuse for developers to not make their games Linux compatible. Yesterday, while playing the game I started to come up with a list of small ideas that'll drastically improve the flow and feel of the game. If any of you remember Exile and have an idea, please add it :PHere's what I have so far:Mechanics - Reduce all attack cooldowns drastically - Increase movement speed to Doomier levels - Fix the maps that have holes in them - Make spells use charges or regents instead of mana pool. - Replenish player health between levels (Past me was a douche.) - Replace XP system with permanent upgrades for ATK, STR and SPD - Make inventory easier to use (Items mapped to hotkeys, like old Build games)Features - Re-enable Minimap feature. Yeah, there was one in the original game. It wasn't bound to anything. - New map geometry (Basically, I want diagonals) - New lighting (Based on Exile Engine 1.5.whatever, shader based) - More items (Key types, healing, buffs, treasure, etc) - More enemies - Fix facepalming grunt enemies - Crossbow (Will pull it from Exile "2"'s build) - Better hands (Again, Exile 2) - Conversion unit for TilEd (So I can replace crappy GridMap and its lag) - Static items and wall decals (Already kinda in-code, just not used) - More spells of varying levels. - New Bosses - New levels, better level design (And themed levels).Sounds like a lot, but I already have a lot of the resources (Art, sound, music) I need for these.Frankly, that's all the easy stuff. The big challenge is…Porting and Cleaning the code Here's where the annoyance factors into things. To be blunt, Exile's code is a mess. All of the player code, including stuff that shouldn't be in the player code, is all in one file named "player.h".There's problem two: Almost everything is header based, except for what isn't. What isn't? Hell if I know, my directory structure is crap.Oh, and I have no dedicated logger or config handler. One third of my logging is done with printf, another with std::cout, and the last third with Win32's MessageBox.To be fair to 2012 Mega, I was under a lot of pressure at the time of the competition (RPG4D 2012). I had just started a new job in retail (Water shop), was building my first 3D-ish game, not to mention my first full game in C++… and yeah. Deadlines and work. I did a lot of weekend/midnight rushes, and as one friend of mine put it when I showed him a Gist of some of the files, it looks like it was written by somebody with Schizophrenia. Anyway, on the cleanup side, I have to deal with a few big things: - I don't use SFML 1.2, so I need to port it to SFML 2.x. Big problem here is that between 1.x and 2.x, they changed the casing from Something.LikeThis to Something.likeThis. Not to mention that a lot of static methods were removed and replaced with new methods (Notably, sf::Input was replaced with sf::Keyboard, sf::Mouse and sf::Joystick). Mostly naming changes, and changes to texture handling. - OpenGL needs to be bumped up from fixed-pipeline to at least GL 2.1. I used to be pretty much an asshat about this (With apologies to sirxemic, to whom most of the asshattery was directed). Now I can't do without my shaders. Billboards become a million times easier. Of course, this is a slightly lower priority modification; if it's gonna take too long, I'm going to cut it until later. I want to keep momentum up. - Headers need to be re-arranged, split into implementation files, and renamed. I tend to follow Quake/Doom naming conventions with prefixes now (g_, ent_, u_, etc).- Repetitive code needs to be put into utility functions, and small optimizations need to be made regarding things like index calculations (Basically, I should get a pointer to something once on creation if possible and leave it during the lifespan of the object, which I'm not doing at the moment. Calls to AssetManager::getImage() are killing things performance-wise).- Remove all the crappy reliance on Win32's Message Boxes, as well as use of io.h, which isn't available on Linux. I use it once in the level loader to find the size of the map files. Technically, map files should be read in streams instead of blocks; they identify for themselves exactly how many bytes of data there will be just by virtue of being a grid-based system.The Linux side of things is relatively easy once I manage to get around all the other issues I've created for myself. The music engine, currently relying on GME, needs to be recompiled for Linux, as well as my "math" library. More like a psuedo-math library. No wonder my collisions were so bad.I started a bit of work on it this morning while at the shop. GCC started to spit out a near endless stream of errors. And as if to laugh, there was a //TODO in the main file labeled "Clean everything up later". Thanks past-me. Now I know they never invent a time machine, or I'd have already experienced a smack upside the head with a Clue-by-Four a few years ago for being snarky.Oh, and if you've never played Exile =3
Exile was intended to be a Hexen/Heretic inspired game. It started out as idle fiddling with a few blocks after I'd "given up" on RPG4D 2012:And somehow turned into this in about 45 days:You can get it from this site, here:http://www.64digits.com/games/index.php?cmd=view_game&id=5598I'd still appreciate bug reports from the fully-patched version of the game, and any suggestions for enhancements. :D
Making an engine in C++ is one of my addictions; I keep on getting stuck working on the engine, tweaking features and such that I'll probably never use. :P
That's why I'm intentionally going back to the "simple" version of the engine and working from there.Speaking of creating engines, this guy has been doing a pretty long live-coding series where he creates a game in C++ from scratch (No libraries), and explains how to do it. Kinda like a tutorial and a lecture in one.Yeah, he's updating regularly. It's soothing to watch somebody who knows what they're doing. Loads of interesting things he covers (To me at least).
Ahhhh I've also been thinking on remaking my RPG comp entry for some time…