Data Realms Fan Forums
http://45.55.195.193/

Spritesheets
http://45.55.195.193/viewtopic.php?f=4&t=31407
Page 1 of 1

Author:  Contrary [ Fri Jul 06, 2012 4:51 am ]
Post subject:  Spritesheets

I'll be the first to admit I know next to nothing about programming, but something I see commonly in games is to have art assets on spritesheets. This is, from what I hear, in order to make the game run smoother. Rather than constantly reloading new art assets it shifts the position on the spritesheet. Why does Cortex Command use individual images for every single frame rather than sheets? I ask because I have been messing around trying to make some stuff, and it's reminded me how tedious modding is in CC, doubly painful for how important modding is to the game. It would be many magnitudes easier if at the very least, all frames of a limb were held on one image.

Author:  xenoargh [ Fri Jul 06, 2012 5:23 am ]
Post subject:  Re: Spritesheets

That's an interesting question. Perhaps the engine builds atlases from all of the sprites at runtime, like a lot of engines do, so whether it's in one bitmap or five in the files is irrelevant :-)

It's not terribly hard to deal with the spritesheets, though; you can just look at the ratios of the angles and set up the guide pixels very easily. Look at all of the Vanilla stuff, and the ratios are all pretty much the same. You can change the total size, but not the tween ratios or the angle. So, it has to have the shoulder and the wrist in the same positions, in terms of the angles, as every other AHuman; how you handle that graphically is another thing entirely. IIRC somebody did a tentacle-actor mod and while it was a bit gimpy it could probably be done in a polished way.

Since pretty much every actor's fairly hardcoded in terms of skeletal IK and the engine's going to pick one of the bitmaps according to the length of the distance between the arm's parent and the hand atom (which is mainly determined by the stance requirements of the HeldItem that's in the hand right now), then rotate it, you can't really do a lot of things you'd expect to do if there was an arm, lower arm and wrist.

Note that the hand just expects a bitmap, because it's going to be wherever that line segment is, period and then rotated to the vector the item needs to be at, which is partially controlled by the item's own stance offsets. So basically we don't get much control at all.

Why it was done like that was probably to keep the number of MOIDs used per AHuman as low as possible, since they're such a big performance hog.

I still wish they hadn't bothered with four MOIDs for legs though, which I really think is a waste, and had instead used those MOIDs to make arms have all three joints, though. I'd rather see full sim there, where it's most useful for flexibility's sake, and have legs use simple state machine animations, which would require more content but be a lot faster. But obviously that's not going to happen at this late date :-)

Author:  CCS [ Fri Jul 06, 2012 6:08 am ]
Post subject:  Re: Spritesheets

If you look at the Sprite Dump latter pages, you'll see modders arrange their assets as spritesheets. But I know this is not the core of your question.

Answer: CC doesn't read the sheets to animate the motion...

Edit: Explanation ninja'd by the above post :wink:

Author:  TheLastBanana [ Fri Jul 06, 2012 8:33 am ]
Post subject:  Re: Spritesheets

xenoargh wrote:
I still wish they hadn't bothered with four MOIDs for legs though, which I really think is a waste, and had instead used those MOIDs to make arms have all three joints, though. I'd rather see full sim there, where it's most useful for flexibility's sake, and have legs use simple state machine animations, which would require more content but be a lot faster. But obviously that's not going to happen at this late date :-)

The feet and legs are significantly larger than the arms for most actors, so it makes sense to have it in two pieces (both of which animate separately). I'm not sure what having three joints in the arm would be useful for. Care to explain?

Author:  xenoargh [ Fri Jul 06, 2012 9:43 am ]
Post subject:  Re: Spritesheets

Quote:
I'm not sure what having three joints in the arm would be useful for. Care to explain?
Well... if and only if we had control over joint constraints, then...

Author:  TheLastBanana [ Fri Jul 06, 2012 8:14 pm ]
Post subject:  Re: Spritesheets

That could be done without more arm joints. We'd just need variables to define which way the joint rotates, how far it can rotate, the angles the arm can rotate between, et cetera. Either way, the kind of stuff you're suggesting will likely be showing up in the next game. At this point, as you've mentioned, it's far too late to implement it into Cortex Command.

Author:  Zuriki [ Sat Jul 07, 2012 3:02 am ]
Post subject:  Re: Spritesheets

Would be nice to have more MOIDs... frequently my games go over the limit (just using vanilla campaign and auto-build can send them over the limit).

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/