XCOMRL

Artificial Unintelligence

by Kyzrati on 20110911 , under

"Unfortunately AI will be nonexistent, so you'll have to settle for blowing up terrain and static units." --Me, Yesterday

I lied.

I figure the ARRP release will be a lot more interesting if your enemies move and shoot at you, so today I went ahead and threw in a simple AI, as well as faction-limited perspective (cannot see non-visible enemies taking their turns, etc.).

Prepare to be blown away, unless you think your squad can fight off waves of aliens teleporting into the area. Of course, you can always steal their more advanced weapons and blow *them* away...

(I haven't made the scenario yet, but hopefully I can find enough time to finish everything by release day. Too bad this is going to be an unusually busy week...)
2 comments more...

Death by Proxy

by Kyzrati on 20110910 , under ,

You read the title...

You've played X-COM before...

You know exactly what I'm talking about...

Let's flex our new-found throwing muscles and put the hurt on an unsuspecting alien emerging from his craft...


(Not a great video, but maybe throwing the electro-flare and smoke grenade helps make up for it? :)

So as you can see, proximity grenades work, as do many other kinds of grenade explosions. Any item with an attached "throwing explosion" also has a "grenade use" setting. Besides the standard/expected PRIME and PROXIMITY settings, I added support for these:
  • IMPACT: Explodes immediately on impact if thrown (instead of waiting until the end of the turn like a normal grenade primed to 0).
  • VOLATILE: Like IMPACT, but will also explode if it falls and hits the ground.
  • REMOTE: Thrown/dropped and set off remotely/manually with a detonator. This is not yet fully supported, since there is no way to create detonators, but it seems like a frequently requested option in X-COM remakes, so it could eventually be added (not going to bother in the short-term, though).
None of these were in the original X-COM, but they could later be used to create interesting items.

In other news, I've decided to join this year's ARRP with X@COM! Everybody's doing it :) Seriously, if I wait until I'm far enough along to make the game semi-playable and good enough to get through my perfectionism filter, it could be many months away, and this being a project with a fairly clearly defined initial goal, it's not like I've got a ton of secrets to hide when it comes to gameplay. The unique components are a ways down the road, anyway.

I may as well let people try the game out early, so I'll be releasing occasional tech demos beginning September 18th, 2011. Tech demo releases probably won't be all that frequent (compared to playable releases, which will be updated quite often when they start coming), but I may as well throw something out there just to be a part of ARRP.

So what can you expect? It'll no doubt come with a big fat disclaimer, but hey, it's a sandbox tech demo, after all. Content-wise, you'll basically be getting the latest version I'm using to debug/code the game, so it'll include all the features you've read about in posts and seen in the videos. Unfortunately AI will be nonexistent, so you'll have to settle for blowing up terrain and static units. Anyone interested could, however, play with the data files (text) and create/modify just about any object... I'm still undecided on whether to leave debug output/interface features in the demo.

As usual, opinions are welcome!
3 comments more...

Take Me To Your Leader

by Kyzrati on 20110907 , under ,

Here's a quick video of guided weapons in action:


I was going to add grenade priming today, but the X-COM system seems like it may be incompatible with X@COM. For a breakdown of the original timing system, see here.

I like the original system. Despite not being intuitive and obvious at first, it's fair and works pretty well. The problem is, it only really works when you have two sides (X-COM + aliens), no more (civilians are ignored for grenade timing purposes). But X@COM supports an unlimited number of factions (teams on a given level) so you can potentially have more groups than just X-COM and aliens.

Not sure what to do about this yet. Checking grenade timers only at the beginning of a new round is obviously unfair, and using the thrower's turn as a reference may not be flexible (or fair) enough in some cases. I'll have to think on it some more, but thought I'd throw it out there to see what others think.

Maybe a faction's grenades can only go off at the beginning or end of their own turn. Thus priming to 0 will explode as soon as you end your turn, 1 will go off just before your next turn, 2 = after your next turn, 3 = beginning of the turn after that. Seems confusing, though really you don't prime for much other than 0 or 1, maybe 2...

The main thing this leaves out is the ability to have a grenade go off between other factions' turns
but that doesn't seem possible to work out, or even necessary actually. And maybe I've come up with the answer myself while writing this post :)
4 comments more...

What goes up must come down... and preferably explode

by Kyzrati on 20110906 , under ,


You can now toss things around. The throwing model pretty closely follows the X-COM strength/weight-based range system, with one major (and no doubt highly-anticipated) exception: you won't encounter problems caused by limited arcs.

The game will first try the "ideal" peak for your throw (according to distance) and plot a parabola through that. If the path is blocked, it will successively attempt worse and worse peaks until it finds an unobstructed one (if any). This flexibility isn't free, of course! The further away you are from the ideal peak, the lower your accuracy. So while you can theoretically try to throw your grenade like a fastball straight across the entire map, you're probably going to miss. And missing can be a big deal with a primed grenade, since the miss trajectory could send it bouncing off a nearby wall or ceiling to land not far away...

Here are some normal throws (the side view of course comes in very handy for checking your throwing trajectory):


A throw onto a roof:

A throw from a roof:


One exception to the friendly arcing system is the map ceiling, which unfortunately does limit your throws--fortunately throws from high positions to other high positions (which are the only ones really affected) aren't very frequent. You can still try your throw from building-top to building-top, but thrown objects cannot leave the map so you'll have to risk a pretty straight trajectory (the drawback is negligible if it's close, so don't worry about that). Throwing from a high position (even at the top of the map) to a lower one usually won't be affected much by the ceiling, since the peak will be quite low, generally even level with you.

(On a technical note, throwing makes no attempt to use actual physics or gravity modeling; it actually just picks a peak and two midpoints and draws up to four lines between them.)

Oh yeah, and thrown objects can crash through windows:
That probably wouldn't mean much if windows were simply holes, but in X@COM they're of course made of glass so you can enjoy shooting them out :)

Thrown items are integrated with the particle engine (they're actually particles themselves), so they can have special effects associated with them as well (smoke grenades trail smoke while flying through the air, electro-flares pulsate on their way to a target). I designed a few placeholder particle effects for throwing, but I'll wait 'til next time to put up a video together with a few of the other new additions.

The game is not, however, quite to the point where you can play hot potato with primed grenades--grenade priming is coming next, though currently any grenades that require no priming (i.e., smoke) will go off instantly.

Any item can now be attached to both/either/none of a "firing" explosion (usually for explosive ammo) and "throwing" explosion (usually for grenades), so it would be pretty easy to make interesting objects like alien bodies that explode when you throw them, or a kind of explosive ammo that can also be thrown to make it detonate... Imagine some super buff soldier grabbing a rocket and literally tossing it at a group of aliens :)


2 comments more...

See the Light

by Kyzrati on 20110831 , under ,

Quick addition: light-emitting items. It was only a few lines of code, since light sources were already attachable to any other object--it was just a matter of detecting and updating light-equipped items. Below is an unexciting shot of an electro-flare (seen top-center, on the ground, as a squad moves in on the area).

The last set of YouTube videos were pretty fuzzy, small, and unimpressive-looking, so I've made a new one that includes most of the same material, but in a larger format and zoomed. Check out the smoke-filled incendiary extravaganza below (you can use HD/fullscreen):

There's no sound yet, so I added some music instead. Not all that X-COMish, but it's the first thing I thought of. The game itself won't really feature much in the way of music--ambient sound/music at the most (like the original)--there'll be an emphasis on sound effects (with lots of interface sfx).

By popular request, here's a screenshot showing damage distribution from a large rocket, as impeded by brick walls:
(Okay, it was just Creepy who mentioned it, but seeing as how few people know about X@COM, he does make up a good percentage of the readership :)

I've also added a page containing the full changelog, which will be updated with every new version (whether internal or released). See the link at the top of the blog.

Probably going to work on parabolic trajectories next, to enable throwing and the potential for weapons like mortars (obviously not something to be included in the initial core game, but they could appear in a later mod).
4 comments more...

Conflagration Propagation

by Kyzrati on 20110828 , under ,

Ready to roast some aliens? The newest additions are all about various ways to turn up the heat.

First, explosions of any kind can now be attached to props and entities, so UFO power sources, cyberdiscs and more can now explode. How to do a suicide run on a UFO:


Taking out a cyberdisc (2x2 units aren't yet implemented, but it blows up just the same):


Incendiary weapons now create fire which ignites terrain and entities. Here's a rocket launcher firing incendiary rockets, after which you can see the fire spread a little (it would spread much more in a wheat field). Burned terrain will produce varying amounts of smoke/dust based on its composition (also occurs when destroyed or when props fall from heights and smash into the ground).


Although not as effective as incendiary ammo for the job, HE weapons may of course cause some small fires, too:


Fire is naturally useful as a makeshift light source:


Smoke grenades make a much denser, longer-lasting patch of smoke (throwing not yet implemented--this is shot from a weapon):


Smoke affects FOV (kinda the point):


And for the grand finale, lets burn that house to the ground, just because we can (and then blow it up afterwards, because that's fun, too :)


On a side note, even though the videos were already cropped down to nothing, YouTube still  felt compelled to compress them to nothing. Maybe next time I'll just record the entire window in HD instead. (I wish I could use screenshots instead, but the latest updates are best shown in videos...)

So here are the latest major additions:
  • Exploding Props & Entities
  • Effects of incendiary weapons/explosions
  • Fire burning/propagation and light emission
  • Entities catch fire and burn
  • Smoke results from fire and some weapon effects
  • Smoke affects FOV and stuns units
  • Materials can release varying degrees of smoke/dust when burned or destroyed

Current state of the near-term TODO list:
  • Light-emitting items
  • Variable animation speed
  • Throwing
  • Sound effects
  • 2x2 units
  • Reaction fire
4 comments more...

Console-Sized Quantum Mechanics

by Kyzrati on 20110821 , under

Talk about an unexpected diversion!

With explosion damage calculations out of the way, next up was figuring out how to best animate them. One moment I'm scratching out some possibilities, then I jot down an innocuous little note along the lines of "need a particle system?" and ended up resting on the idea.

Next time back at my desk I'm writing a fully-featured particle engine, and the next and the next...

Never written one of these things before so it was a somewhat slow start, but once the pieces started coming together it became obvious this was the way to go. Particle engines are awesome!

I've opted for the heavily parameterized single-class model. Overall it's a pretty versatile system:
  • Particles make use of a wide range of dynamic variables:
    • Age can be a constant, random, or dependent on distance from a point
    • Speed can be static, constant, random, or follow a linear or sine function
    • ASCII characters, if used, can be static, based on direction, or sourced from an animated list or a random set
    • Color blending options (foreground/background) are more or less the same list available in libtcod: 
      • Add
      • Subtract
      • Multiply
      • Scale
      • Linear Interpolation
      • Add Alpha
      • Screen
      • Color Dodge
      • Color Burn
      • Overlay
    • Any color can be dynamic, since particles are able to mix multiple colors based on their current age or speed using 10 or so kinds of linear/sine functions
    • Particles can also be emitters themselves, spawning other particles based on various triggers, rates, randomness, direction information, etc, so it's pretty easy to chain together complex effects
    • All these parameters are loaded from a text file, and attaching a particle effect to a weapon/item is as easy as writing its name in the item text file.

    Internally, projectiles and explosion results are now a kind of particle, since integrating them into the system seems like an obvious choice.

    Particle engines are pretty powerful, and I still don't know all the tricks to using this one, but in the coding process I designed several test effects and made a video where you can see them in action. Everything's kinda small at first, but it'll zoom in; and going fullscreen will help a lot since I recorded it in large format. (Note: This was my first-ever attempt at recording a video. Next time I'll try to keep the mic out of my mouth, promise!)

    9 comments more...