View unanswered posts | View active topics It is currently Thu Dec 26, 2024 7:58 am



Reply to topic  [ 7 posts ] 
 Spritesheets 
Author Message
User avatar

Joined: Mon Mar 16, 2009 10:50 pm
Posts: 2175
Location: Neverwhere
Reply with quote
Post 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.


Fri Jul 06, 2012 4:51 am
Profile

Joined: Fri Dec 30, 2011 3:33 am
Posts: 276
Reply with quote
Post 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
Profile
User avatar

Joined: Thu Jan 07, 2010 1:54 am
Posts: 99
Location: St. Elsewhere
Reply with quote
Post 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:


Fri Jul 06, 2012 6:08 am
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post 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
Profile WWW

Joined: Fri Dec 30, 2011 3:33 am
Posts: 276
Reply with quote
Post 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...


Fri Jul 06, 2012 9:43 am
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post 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
Profile WWW

Joined: Wed Feb 11, 2009 11:01 pm
Posts: 28
Reply with quote
Post 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).


Sat Jul 07, 2012 3:02 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users


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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.514s | 13 Queries | GZIP : Off ]