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.
Fri Jul 06, 2012 4:51 am
xenoargh
Joined: Fri Dec 30, 2011 3:33 am Posts: 276
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
Fri Jul 06, 2012 5:23 am
CCS
Joined: Thu Jan 07, 2010 1:54 am Posts: 99 Location: St. Elsewhere
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
Fri Jul 06, 2012 6:08 am
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
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?
Fri Jul 06, 2012 8:33 am
xenoargh
Joined: Fri Dec 30, 2011 3:33 am Posts: 276
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...
...a lot of styles of arm animation would open up with another axis of motion added to the sim. I hear you on the legs; I also am aware that MOIDs are anything but free, so there aren't any good choices on that.
The problem with the two-joint design's pretty fundamental; if we want really convincing gorilla-type arms, arms with reversed joints, etc. it'd be nice if the weapons were moving the hand offsets but there was an elbow that we could lock if it reached a constraint and force the shoulder to rotate, instead of being limited to a very human range of motions and more importantly, distances. That said, I haven't tried to make any really crazy ape-man arms with the elbows really offset a lot yet or praying-mantis style arms, so IDK whether I can convincingly fake it or not.
IDK, I guess what I'm saying here (and please forgive me for meandering a bit, it's really late) is that one of the things about this engine is that under the hood, we're much more limited to the human / ACrab form and the forces being applied to the joints that must be defined than a lot of people, even a lot of the modders, really appreciate. That, and it's really hard to see what's up, short of writing some major Lua to draw stuff and give you input about forces and show the joint positions. I thought about doing that for people to use when developing characters; it'd be incredibly useful to merely be shown an overlay view of the skeleton while trying to get a walkpath built, for example.
I think it'd be really nice to have deeper access to Actors and be able to develop joints, constraints, etc., so that if we want to build, say, a wheeled thing, we can define the wheels as non-constrained joints attached to rotationally-constrained but not length-constrained joints with a constant recovery force (i.e., simple springs), develop a character with the full set of animations instead of having to work around the canned stuff with Lua, etc. IDK how hard it would be to make that data more accessible to Lua and push it out to a table that would serve as a template, but it'd be a big deal if it could be done, in terms of modding.
IIRC the last time I was here, people implied that we could just use the generic Actor class as the basis for that kind of thing, but I didn't find it amenable, because it's missing so much basic stuff, like being able to get into the AHuman Pie Menus, using AHuman function calls and moreover having to build the joint system and collision detection is reinventing the wheel.
There needs to be a good balance, where core stuff like GUI is still there and we can swap equipment, but do fundamental work on the joints and constraints and animations, not merely a walkpath. I think it would be really cool if we could define which Pie menu basis to use, too, so that you can have an ACrab with AHuman Pie, AHuman with ARocket Pie, etc.
Fri Jul 06, 2012 9:43 am
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
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.
Fri Jul 06, 2012 8:14 pm
Zuriki
Joined: Wed Feb 11, 2009 11:01 pm Posts: 28
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).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum