Hello World

by Kyzrati on 20111031 , under

Proper X@COM development has been put on hold while I get busy reinventing the wheel.

After weeks of debating the issue with myself, I've decided to write a complete game engine from scratch rather than continue with libtcod. I originally intended to write a new libtcod framework that would replace Umbra and make coding X@COM a lot easier, but finally convinced myself that with just a little extra work I could write my own engine right on top of SDL, one that would be both simpler and much easier to modify to fit my own needs. Libtcod is a really cool library, but since I already have my own rather large collection of game classes (on which X@COM is based), I was only using a tiny fraction of libtcod's features in the first place (namely the console display).

After a little bit of planning (probably too little), Rogue Engine X was born this weekend. Here's a shot of "REX" in action--very impressive stuff, really...

Okay, maybe not so impressive. Right now it can't do much of anything except load a bitmapped font and draw one full-color console window. The color support is essentially the same as libtcod, although with a slightly different HSV pattern for the default colors.

REX features (eventually):
  • Based on SDL
  • Fully object-oriented (C++)
  • 32-bit color console
  • Command-driven input processing
  • Sound/music support
  • Access to archived resources through PhysFS

I already warned that X@COM's alpha debut is quite a ways off (two months, maybe?), so taking a detour to crank this out doesn't really change that. Consider this taking several steps backward in order to make huge leaps forward!
8 comments more...

R4: "Area 51"

by Kyzrati on 20111021 , under

After much hardware-induced delay, a new release is ready for the ASCII-loving, alien-hating commanders out there to test their skill (and/or luck) on.

In addition to the many new features mentioned in the previous post, R4 adds a new scenario and scoring system to tide you over until the first alpha release, which probably won't be available until the end of the year! Most of the core mechanics are complete (the rest will come in alpha), and huge changes will be taking place over the next couple months as I build a libTCOD framework from scratch to handle the kinds of things I want X@COM to be able to do. I'll occasionally post progress updates when there's something to show.

As for the new scenario: Fight alongside soldiers defending an Area 51 base against an alien assault, and be prepared for some surprises. To play, run Area51.bat. The environment is non-random, but enemies are mostly randomized. Once the remake is complete, later versions could optionally include similar handcrafted scenarios, though of much better quality and properly balanced.

There are a lot of enemies, so definitely try out this new feature: You can now press/hold the 'e' key to highlight known threats. So at the beginning of a turn when you've suddenly been engulfed in total chaos (very likely to happen in Area 51, believe me), highlight the threats to quickly get an idea of what you're up against. (Threats are highlighted no matter what level they're on.) The visual effect is currently handled with the projectile particle engine, so flashing indicators may not appear in their entirety for units at the edge of your FOV (or at all for known units outside FOV); there will eventually be a separate 2D particle engine for map/interface effects that can properly handle highlighting and all kinds of other nifty indicators.

As usual, see the changelog for a comprehensive list of what you get with R4.

You can still play the original completely randomized ARRP demo; in fact, it's still the default. Remember that the original scenario will be a fairly different experience now that reaction fire is implemented.

As requested, there is now a scoring system (applies to all modes). The game will eventually replace this temporary implementation with a detailed and extensive scoring/records system, as well as medals for soldiers and achievements you can earn as commander. Here's the result of my test run on Area 51:
There are more unlisted ways to score points, but I didn't earn those. If you have a particularly good run (or even win!), when you see the mission end screen press your PrtScn button and a screenshot will be saved in your game directory. Maybe you could show it off in the X@COM Bay 12 thread (link on right).

That's it. No more media for you. Not doing any in-game screenshots or video for this release, at least not just yet, since I don't want to spoil the fun.

Now go! Defend Area 51!
6 comments more...


by Kyzrati on 20111015 , under ,

Be prepared for a totally different experience when you play the next release: True X-COM mechanics are finally here.

Actions now trigger reaction fire (opportunity fire) from enemies that have spare TU. The system is almost identical to the original, though a few of the small quirks were removed to keep it as straightforward as possible--there aren't any strange exceptions to the way it works.

Melee reactions/counterstrikes are also possible. Out of ammo when that sectoid rounds the corner and starts firing at you point blank? As long as you've got the time left you'll just whack him with your rifle, or whatever you happen to be holding. Heck, find a sword and intentionally have your ninja-reflex soldier wait around corners for unsuspecting aliens--the heads will roll!

About the mechanics: I can't recall whether X-COM units actually turns around as part of reaction fire to shoot aliens after being hit in the back (probably because you rarely survive hits from behind by alien weaponry, anyway...). Either way, that behavior is a per-unit setting in the data files, so it's easily changed. For now I have X-COM *not* turning around.

You can reserve TU for any major action (snap / burst / aimed / melee / throw), and also intentionally deplete a unit's TU with a single command so you don't have to worry about those freaking reactive snap shots with a rocket launcher (unless you want them, of course).

Check out the video below for the ultimate showdown between X-COM and aliens. This battle is 100% based on opportunity fire! Reaction fire on this scope wouldn't normally happen in the game, but I added a third "overwatch" faction which triggers the exchange and tweaked their TU so they won't interrupt the battle; meanwhile, all the other units have full TU and are just staring at each other until someone moves... (HD + fullscreen strongly recommended, otherwise it can be hard to see what's going on)

Explosions are now simultaneously animated from the side, as seen here:

Parabolic projectile trajectories are also possible now. This feature was implemented primarily for the celatid spit, which is apparently the only projectile in the game which does that, but now any projectile can be designed to follow a parabolic trajectory, so you can add mortars etc. Be sure to kill celatids from a distance--or be killed (they've got the deadliest projectile in the game). There's now a max range setting for projectiles, also implemented for celatids, since parabolas don't inherently limit range like they did in the original. You don't want them spitting that stuff at you across the map! All other projectiles currently have unlimited range, of course.

In other news, those alien saboteurs (see 2x2 post) sure are persistent. My motherboard malfunctioned yet again. Lost a PCI slot and BIOS decided it wanted to try to overclock the CPU without my permission. Thought I was going to have to build a new rig to replace this 5-year-old dev machine, but after a cleaning and rearrangement of parts it's chugging along, again. Point is, fooling around with dying hardware ate up enough of my spare time that I probably won't get to push a new release this weekend.

All the new systems are debugged and ready to play, but I want to add a scoring system and new environment/scenario for the next (and last) pre-alpha release: Area 51.

6 comments more...

R3: "Sheer Terror"

by Kyzrati on 20111009 , under ,

The number of new features has hit critical mass, so time for another release. See the files page for a link.

As detailed in the last post, large units have been added. You get a tank this time, too. Admittedly not an impressive one, but anything will help against your new enemies, the alien "terror units." For now only large terror units are included; normal-sized thralls will come in a future version.

Terrain smashing is now implemented. Talk about putting the gravity system to the test... Giant units plowing through buildings, heavily-armored X-Com units dropping through weak house roofs in style, tanks mowing down fences... Everything went smoothly except the house filled with stuff getting bulldozed by a house-sized alien--he really helped me fix all the rare bugs :)

Now you can jump through windows without bothering to shoot them out first! By default, "smash movement" is *not* active--you can toggle it on a per-unit basis using the 'h' key. (This is so that the pathfinder knows what kind of path to take.)

Stronger units can smash almost anything, while most rookie soldiers can't get through much more than glass, shrubbery, and other weak obstacles, though stronger soldiers can eventually push through fences, thick hedges and weak walls, or even smash chairs and some other furniture as they move. Later on, some armor and equipped weapons will probably improve a soldier's ability to smash things. Sledgehammer, anyone?

Essential for large units, built-in weapon modules are now operational. The system is very expandable and can later be used to enable units to accept multiple modules, even non-weapon modules with special effects.

Melee attacks (m/M) are now possible, too. In fact, you can use any item to perform a melee attack. Farm level? Grab a pitch fork and stab the little bastards! (Warning: May not work on big bastards.) I divided melee damage into three types: bludgeoning, slashing, and piercing (others can be used or more added easily). Melee attacks can of course do non-melee kinds of damage, like the stun rod.

Bludgeoning damage may also knock targets backward depending on relative strength and item mass. Whack an alien right through a window and have him fall to his death! Or, if you're strong enough, push him right through a wall...

Melee attacks do not currently harm terrain (as in the original), though that can easily be changed by modifying the materials.xt file.

Knockbacks and terrain smashing are both optional (though in the demo there's no button to toggle them); those and the many other optional settings will eventually be accessible through a config file.

About the new demo:
  • Most of the large units are what you'd expect from X-COM: UFO Defense, but I did throw in the chance of one 3x3 unit. Here's hoping you don't get mauled by a Mega Reaper. (Murphy's Law says you will.) And if you see some toppled houses and trampled hedges while you're scouting around... well, let's just say you're probably not safe :)
  • Explosives are quite effective against large units since *all* sections take damage separately.
  • For those who have previously checked out the bunker, there's a couple new toys inside :)
  • See the changelog for a full list of changes (some commands have changed)

I also put together a quick demo video showing large units. To speed things up, I'm controlling the aliens in a mock battle. In retrospect, there should've been more wanton destruction :)

There will probably only be one more tech demo release soon (reaction fire), then a rather long gap before the first alpha version.

Now what are you waiting for?! Go stun yourself an alien!

2 comments more...

2 x 2 = A Lot of Work

by Kyzrati on 20111002 , under ,

It took one heck of a mega-refactor, but... they're finally here.

First time spending this much time on any one part of X@COM (even the particle engine only took a little over a day); had to parse a big chunk of the code since large units touch on a little bit of nearly everything--display, body item mechanics, FOV/LOF, pathfinding... Those weren't actually much of a pain, though. Implementing the effects of gravity on these guys was the annoying part--proper displacement by falling objects, bumping into each other while tumbling through the air, etc... In the end it was definitely worth it (not to mention necessary for any self-respecting X-COM remake!).

First sighting: Reaper!

So in the next release you'll be able to stomp--oops, I mean get stomped by--some large units. Don't worry, you'll have tank support! Too bad we all know X-COM tanks tend to suck. I suppose I'll be generous and give you a well-armed rocket tank or something like that, but it won't save you...

Not from...

Building collapses, from the smoke and rubble emerges a huge shadowy figure.

Soldier: "Um, command, I think we've encountered a new species."

[Radio silence]

Command: "Do you have a visual?"

Dust settles.

Soldier: "Oh my god... We're going to need a lot more rockets..."

...or, just one giant rocket:

Hell yeah!

That's a bit excessive though, you won't see anything quite that big in the demo.

But anyway, as you can see, unit sizes are actually arbitrary--they can be any dimension you like, even taller than one cell! Why not, the code is the same regardless of size. Not necessary for vanilla X-COM, but could lead to some interesting mods :)

Since it's somewhat related to large units, next up is terrain smashing: Any units with strength exceeding the integrity of a terrain material can smash right through it (for a TU cost). So soldiers can jump through windows, tanks and strong aliens can push down walls, and massive units could walk right through buildings. Obviously like anything else not X-COM, this will be an optional setting you can turn off in case you *don't* enjoy jumping through windows or surprising aliens by driving your tank through the side of a house.

After that is tank/natural weapons. That'll be a quick addition, then I can get the next release out.

In other news: ALIENS HACK X@COM!

They must've found out about X@COM and are afraid us Earthlings are developing a training program to devise ways to repel their imminent invasion!

Okay, what really happened is the ASCII mapping code was a bit off and turned the help screen into some alien language. Under the new mapping scheme, a virtually unlimited number of tiny images can be added to the resources and attached to any terrain, unit, etc. This was necessary to make it possible to draw the 2x2 units using special characters. Until now I was relying on hacks to get the unit triangles, but now they and the normal ASCII characters are easy to work with, even from the text files.
7 comments more...