Colonel Justice's Recent Forum Activity

  • Cheers,

    finally a contribution from Schade Studios.

    I`ve been tinkering around with spritesheets lately and it comes down to the fact that Tiled Background really is an alternative if you need dynamically loading textures for all kinds of game assets. It is really flexible, especially if you want to charge up new gfx at runtime. On top of that, proper usage can save a whoppin' amount of V-RAM.

    Why?

    Let`s say, you use the ordinary sprite for animation of your game`s main character. The character sprite is most of the time around 70-80p in both width and height, that�s already a sh*t if you have let`s say 50 frames in total. Construct will reserve 3,2 MB of VRAM (128x128 for the next power of two size * 4 byte * 50 frames) at just to display this single character. Things can add up quickly if you have more of those characters at hand.

    With the proper technique, you can squeeze all 50 frames of 70x70s or whatever on one single 512x512 image, let`s say with 1 pixel margin and address them through construct. A 512x512 will use only 1 MB of V-RAM. In that example it would be a saving of around 2 MBs of V-RAM, that`s something like... well... PROFIT!!!111oneoneeleven.

    It comes at some cost, though, namely CPU time. Since we cannot use Construct`s built-in cycling through image banks, we must use our own routine to find the correct sprites on the sheet, animate them, and so on.

    No blatant advertising intended, but I found TexturePacker (code-and-web.de) to be the perfect tool to create Spritesheets. It also exports to various formats of Game Development frameworks. Unfortunately, Construct Classic doesn`t come with a routine for spritesheets, but what I did is that I used the general XML export of TexturePacker and wrote my own.

    Basically, TP does all the dirty work, you just have to provide the following:

    1. A folder containing your sprites with a proper enumeration in the filename (e.g. fire_1.png, fire_2.png and so on)

    2. After trimming and all that stuff, TP has to generate a power-of-two image out of all of your sprites, and a Generic XML.

    That XML contains the following:

    -Some, for our purposes, more ore less useless header stuff

    -And the meta data, it looks like:

    <Image Name="Crossbow 1" Height="70" Width="77" YPos="1658" XPos="871"/>

    Image Name=the original filename (useful for later reference)

    Height=Absolute Height of the sprite

    Width=Absolute width

    XPos=X Position of the sprite on the sheet

    YPos=Y position

    That`s the basics. TP is also able to output the original frame size of the single images, allowing pixel-perfect size the sprite later on and offsetting it from the original size, so the animation boundaries don`t cause the sprite to jerk around whilst being animated.

    I will get to that tomorrow, it`s pretty late already.

    I have created a basic example on how to load a sprite sheet and address it in order to animate a game character with it.

    Grab it HERE.

    Props, slops and comments welcome ;)

    Cheers

    The Colonel

  • Rejoice, it works! Thanks, Tom :)

  • Well, there is this demo Arsonide releasedhttp://dl.dropbox.com/u/1032313/GWEN_DEMO.zip which incoorperates many of the plugin's features, but yet not all. Especially the inventory functions would be very nice to understand ;)

  • OMG! Be still and take my money!!!111one

    :D

    One question before I hit the buy-button: Do you ship the plugin with some sort of documentation of it`s functions?

  • Doesn`t work for me, unfortunately. Issue is that I'`m only logged in on the portal level, but not in the forum. Everytime I want to log in to the forum, I have to resend a new password.

    I can use this until I log out, then I have to do it again. When I change my password, the change is being accepted, however, resulting in the original state -> portal login works, forum doesn`t. It just appears that I`m Guest.

    Cheers,

    Colonel

  • Yeah man! Looking really forward to it, as I promise myself that my map editor GUI would make good use of it.

  • Probably one of, if not the best visuals achieved with Construct Classic so far. Keep it coming! :D

    -The Colonel

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Teasing, teasing...

    <img src="http://www.schade-blog.de/schade-studios/the_rotten/UFD-Wallpaper.png" border="0" />

  • ...

    That looks slick! Reminds me of the good old days of super nintendo :)

    lucid: Indeed it's planned to be a commercial relase. I've been tinkering around with it since a couple of years now, time to reap the rewards! ;)

  • Subscribe to Construct videos now

    Cheers ;)

  • Great, thanks for all the effort! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Hi! Yes, it is possible. For 2D, the sky is really the limit. I suppose light like this is done in a composition of several sprites carrying the right shaders.

    Construct already comes with a variety of shaders that should suit the purpose. I would start toying around with the Multiply Plus shader and check what results I get.

    Cheers,

    the Colonel

Colonel Justice's avatar

Colonel Justice

Member since 16 Mar, 2011

Twitter
Colonel Justice has 10 followers

Trophy Case

  • 13-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies