The Daily Click ::. Forums ::. Klik Coding Help ::. Omgz Spritesheets DUDE
 

Post Reply  Post Oekaki 
 

Posted By Message

Chloe Sagal

under the influence of FUN

Registered
  19/02/2009
Points
  607

Orange
18th October, 2013 at 18/10/2013 09:20:31 -

I posted this on the Clickteam forums already, but meh, safety in numbers.

Well, as the title suggests, I'm working with spritesheets. I could easily just load into the editor, but the customization won't be there. I have a few options at my disposal,

Load Frame: Great, but not exactly spritesheets. Which isn't an issue, but with many frames comes a lot of loading time.

Active Picture: Seems like it would work, I currently use this for the level editor I've built, but it seems like you can only select a portion of the image with the create backdrop function. It's either a huge oversight or I'm just not using it correctly.

Text Blitter: Neat. But doesn't let you scale the image. Lame.

Surface Object: Someone mentioned it, but, sadly I can't test this out, as it seems like Looki's site is no longer around.

Animated Picture: This works swimmingly. Buuuuuuut... can't change the colors.

So, I can either go with increased load times with Load Frame, Very choppy movements with Active Picture, Scaling my images out of runtime with Text Blitter, a never ending quest for the fabled Surface Object which may or may not have anything to do with what I need it to be done with, or having to shell out a new image for a simple color change with Animated Picture.

Surely there has to be a solution to this conundrum!

I appreciate any assistance I can get!

 
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal

nivram



Registered
  20/07/2006
Points
  171
19th October, 2013 at 19/10/2013 17:41:56 -

I posted the surface object Extension in the MMF owners lounge.

Marv

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm

Chloe Sagal

under the influence of FUN

Registered
  19/02/2009
Points
  607

Orange
19th October, 2013 at 19/10/2013 19:46:12 -

Ha, suppose it's time to register those products. Thanks a ton! Hopefully it works cleaner than this text Blitter, which is the option I went with. It's working okay so far, the sizing is a pain (luckly I can automate the process of exporting scaled sprites in photoshop, it's just the extra unnecessary date) and it's very picky with recoloring. I'm also afraid that it might be too much for the program to handle once it's working in game.

Animated picture was pretty good, the issue was that you are only allowed to use like 6 of them before the subsequent ones stopped working.

So it's either this, cross my fingers with the text blitter/Load Frame, or just shove all of them in and remove all the customization.

Thanks again!

 
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal

The_Antisony

At least I'm not Circy

Registered
  01/07/2002
Points
  1341

VIP MemberStarSnow
12th November, 2013 at 12/11/2013 14:53:34 -

Eh... if you think a couple of active picture objects makes your framerate choppy, just wait until you get into using the surface object. My desktop slows to a crawl every time I've tried using it, so I eventually end up stuck with the active picture object anyway.

 
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?

The_Antisony

At least I'm not Circy

Registered
  01/07/2002
Points
  1341

VIP MemberStarSnow
18th November, 2013 at 18/11/2013 18:08:57 -

Oh, if you want to muck around with the Surface object, I have the extension plus the backup of the example file. I had a project I was working on about a year ago that got put on hold which used the surface object as a tile pallete for a level editor I never finished. I can zip-up the lot and chuck it at'cha.

 
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?

looki



Registered
  18/06/2008
Points
  4
18th November, 2013 at 18/11/2013 19:26:10 -

Chloe,

The Surface Object is also temporarily available here until the server issues are sorted out - https://dl.dropboxusercontent.com/u/80112437/Surface.zip

I'm actually working on an update for it now. I've slightly reorganized the menus to be more user friendly etc. and improved some of the code. More infos to come... however the extension is pretty advanced, it can do a *lot* of things and might be a bit difficult to figure out. It's an all-purpose bitmap manipulation extension, after all. The examples can be obtained from here https://dl.dropboxusercontent.com/u/80112437/Surface%20Examples.zip Bear in mind I made them when Surface came out - since then, I've updated Surface quite a bit and it doesn't cover ALL of its functionality. Plus, I was like 15 when I made the examples - please don't expect top notch quality. Having said all this, I'm not sure if Surface is the best extension for this. Each instance of a Surface object has a unique bitmap (or several) - that means they don't share memory. Animated Picture however was designed for this exact purpose. Maybe you could just modify the images with Surface and then save them temporarily and use them in Animated Picture?

Anyway, GrimFusion, I'd love to hear your input on why you think the Surface Object is slow - I've never really experienced bad performance (compared to other MMF solutions with the same result) with it - it still needs some optimizations for HWA, though. Unfortunately, I cannot fully port it to HWA - the SDK doesn't expose a lot of Direct3D functionality and even if it did, implementing all those bitmap operations would take ages. Please send me an example of bad performace or so, I'd try my best to improve it.

EDIT: Just realized GF dug out this thread - I hope my post is still relevant somehow!

Edited by looki

 
n/a

The_Antisony

At least I'm not Circy

Registered
  01/07/2002
Points
  1341

VIP MemberStarSnow
18th November, 2013 at 18/11/2013 23:52:27 -

Whoops. Sorry for necro'ing. I'd actually be interested in checking out your examples or any tutorials you've got, Looki.
The URL you posted '404's, though. Examples not found. I've been famboozled!

 
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?

looki



Registered
  18/06/2008
Points
  4
19th November, 2013 at 19/11/2013 03:36:53 -

Ah god dammit my dropbox was full.

Hope this works http://we.tl/hUl2NDMXyN

 
n/a

Liquixcat

Administrator
Lazy Coder

Registered
  08/12/2002
Points
  201

VIP MemberLikes TDCKitty
19th November, 2013 at 19/11/2013 12:43:48 -

Get an Avatar Looki, you like like Spam you lame-o.

 
thinking is like pong, it's easy, but you miss sometimes.

The_Antisony

At least I'm not Circy

Registered
  01/07/2002
Points
  1341

VIP MemberStarSnow
21st November, 2013 at 21/11/2013 08:30:26 -

Thanks a lot, Looki. Kinda glad I necro'ed the thread now.

 
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
21st November, 2013 at 21/11/2013 13:40:18 -

I know it's an old thread, but just thought I'd add that using a pixel shader would be one option. You could easily create a shader that loads a spritesheet file as an image parameter, and then allows you to specify which individual frame to load from it using another parameter.
There are limitations to that method - the big one being that pixel shaders do not affect an object's collision mask.

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
21st November, 2013 at 21/11/2013 16:48:03 -

That is a big issue. I wouldn't do it for that reason alone.
However the Animated Picture Object didn't support fine collisions originally either.

I think someone should message the creator of the Animated Picture Object and request pallet swapping be added.

 
n/a

Chloe Sagal

under the influence of FUN

Registered
  19/02/2009
Points
  607

Orange
21st November, 2013 at 21/11/2013 23:35:42 -

Oh gee, didn't realize this topic decided to restart.

Anyways, what I ended up doing I feel is kind of cool. I have a sprite that is made up of close to about 20 different customizable parts. Using the surface object and text blitter, I was able to reduce the sprites to function with 4 text blitter objects. I could reduce the amount to just a single text blitter, however to reduce the amount of required frames per sprite sheet, the body, arms and head are separated.

Basically, one surface object loads one sheet of an object, colors and resizes it, then pastes it to another surface object, then repeats until all the objects are loaded onto that specific part. Then that saved image is loaded into the text blitter object.

And now that I've typed all that out, that's exactly what looki suggested >.<

Works great, the only issue is that there is a slight clip of load time. I'm not sure if that's on the surface objects end or if it's on the end of the text blitter. Or if my computer is just dying. I would swap out the text blitter for the animated picture object, but the whole breaking after 6 or so instances scared me off from relying on it.

@Sketchy and UM
My sprites don't use collision, I use a separate object anyways.

 
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal

Fifth

Quadruped

Registered
  07/05/2003
Points
  5818

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
22nd November, 2013 at 22/11/2013 01:00:28 -

That sounds pretty neat! I'd love to see your ultimate solution in action; external resource loading in MMF is kind of a fun topic, and I like seeing all the different approaches people take.

 
Go Moon!
   

Post Reply



 



Advertisement

Worth A Click