Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Jul 2006
Offline Last Active Today, 12:11 AM

Posts I've Made

In Topic: UAC local app data methods in c#

15 December 2014 - 02:56 PM

Ah yes - if it works as win8 app then it's all good. Thanks. :)

In Topic: Managing spritesheets

22 November 2014 - 02:34 PM

Difference being on how the spritesheet is put together - like if I made the animation cycle so that each frame is spaced equally apart so the animation module can simply change the source rectangle each frame by some even amount -- then I will use a bit more space on the sheet than if all the source rects were packed tightly together(in which case I couldn't use the same technique and would therefore need precise locations for all the animation frames). I guess this wouldn't be an issue if all your animation frames were close to the same size, however if your character is doing really crazy things in each frame it may be easier to use a sprite sheet packer to assemble the sheet and rectangle definitions for you.

  For more compression (data compression) you could use a DXT type compression in video memory. I know in XNA it is just a matter of changing the properties of the texture in the content pipeline but I'm not sure how it is done otherwise. DXT is lossy so is good for background stuff but I don't know if I recommend it for characters that you will see in front of you all the time if a crisp vibrant image is important to you.

Good luck on your project :)

In Topic: Managing spritesheets

19 November 2014 - 09:55 PM

I'm agreeing with unbird - also I'd say it depends on how much animation data you end up with. Originally for animated characters, I used even rows for each animation (walk row, run row, jump row, etc... ) but I added tons and tons of animations and started hogging the video ram with numerous 4086x4086 sheets. I found a compressed atlas worked better. The only tricky part then is getting the program to recognize which rectangle sections belong to which animation. If you put each animation frame from your sheet on a separate layer in your image editor and use an export layers to files option (however you do it in your editor) - ie: layers: walk1, walk2, walk3, etc... then use a utility like: Sprite Sheet Packer or something similar which will export a space-saving sprite-sheet as well as a .txt file containing all the rectangles. You can parse the .txt file and use the corresponding names and numbers to automatically match up the animation frames to their place on the sheet and save a lot of video ram (and manual work).  

That being said, however, either approach is good for your purposes I think. Only would be necessary to do it that way if video-ram becomes a concern.

In Topic: Orthographic Projection, width/height

19 November 2014 - 12:07 AM

Maybe change this:

projection = Matrix.CreateOrthographic(Width,Height,near,far);

to something like this:

projection = Matrix.CreateOrthographicOffCenter(left,right,bottom,top,near,far);

Where left is 0, right is width, bottom is height and top is 0 and near could be say -2000 and far +2000 if you really wanted..

Also good to translate the projection -0.5 up and -0.5 left to get good pixel alignment (could just leave view as identity and use a world matrix to move scene)

In Topic: Magical mysterious impossible null reference exception

17 November 2014 - 09:46 AM

Oh snap. That was helpful. I found out it actually does copy from another somewhere else (accidentally) which doesn't contain a child list. It wasn't supposed to do that which is why I never thought to look there.