• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Graphics How do you handle: adding large volumes of graphics

CMAllen

Member
I'm sure you've been there. You've done it (or watched it done in a group setting). But how do you handle the monotony of importing graphic assets into your project, getting them all set up for use in your game, repeating the same actions over, and over, and over, and over again for hundreds (or thousands, or tens of thousands) of assets? What do you do to make the process less...tedious, mind-numbing, soul-sucking, etc, etc.

I ask because I'm staring down roughly 10k images to add to my project, and that prospect has me cringing on the inside.
 
E

elementbound

Guest
May I ask what do you need 10k images for? I don't have much experience with huge projects, but this seems a bit of an overkill.
Then again, you could possibly automate it by writing XML files for GMS yourself and adding them to the project.
 

CMAllen

Member
May I ask what do you need 10k images for? I don't have much experience with huge projects, but this seems a bit of an overkill.
Then again, you could possibly automate it by writing XML files for GMS yourself and adding them to the project.
Either way, you're still going to have to generate all the information the project needs to bring in and use all those assets.

As for your question -- characters. 8 different angles, multiple different animations sets. A simple enemy actor has 200 frames. I've also got a customizable hero character (and not nearly as much as I first imagined, because that reality eventually hit home) with multiple different pieces following all the same setup. I've generated at least 100mb of character artwork, and I'm still only just getting started.
 
CLICK AND DRAG METHOD

Click and drag from a folder into GameMaker Studio. It gets to be a pain with sprite sheets, because you can't properly drag & drop them in, because when you do that, GameMaker feels its all 1 image rather than a sheet. My artist would tweak one little thing with a sprite sheet that had hundreds of images. Examples would be oh this run cycle looks better, . It got annoying fast.

YOUR OWN SPRITE SHEET SLICER IN GAME

To compensate for the time it takes to properly import a sprite sheet, I ended up making a sprite sheet cutter via code.

It takes a normal sprite sheet, cuts it up to my specifications and saves the smaller sprites to file so it only needs to be done once when the game starts. Its maybe 10 - 20 lines of code if I remember correct. Its been 6 months since I had to do it. Then if I don't want users to deal with the one time wait, I dump all the chopped sprite sheets as external files into the game. Then you run the risk of someone stealing them, but its also a way to allow for basic mod support if people can change out the images.

Once you have a standardized system of say width of sprite, height of sprite, number of images of the sprite and name of sprite it gets much quicker. The catch is you don't have thing sitting in your assets and it all needs to be done via code.

The game below uses the method to cut up sprite sheets. There are 4 enemies each with say 8+ colors all on one sheet that gets sliced up. There are maybe 32 players all on one sheet.



* edit * Before I forget only do it once and remember that when a GameMaker game resets, the variables do not reset so you can have duplicates of your files which would increase the game's memory / RAM usage.
 
Last edited:

mhermann

Member
I can see the number of sprites getting large for fighting games. I am just starting to develop a 2d wrestling game. I have the problem of loading a lot of sprites. I want to be able to allow end users to add there own wrestler sprites. I am thinking that I will have 100 character objects. All the moves and code will be done. They just get to pick the moves and load the sprites they want to use. So I will need to look at sprite sheets opposed to individual sprites. I will look at creating that slicer.
 
A

Anomaly

Guest
If you're rendering those iso characters in blender, I've used a script to generate the resource files so that when the rendering completes, you just drag the sprite resource files in for all 8 directions: http://gmc.yoyogames.com/index.php?showtopic=657241&view=&hl=&fromsearch=1
Just have to say that THAT is pretty cool there.

Also, couldn't there be a keyboard shortcut for selecting a sprite and generating a new object that uses that sprite?
Instead of making the sprite, making the object scrolling down... Making new object...assigning sprite...
Could be done with preset prefixes?
....would save allot of time imo.
 
T

teamrocketboyz

Guest
I'm really new to this but in referance to this

"Click and drag from a folder into GameMaker Studio. It gets to be a pain with sprite sheets, because you can't properly drag & drop them in, because when you do that, GameMaker feels its all 1 image rather than a sheet"

If your sprite sheet is called fighter.PNG and features 30 sprites. I'm sure you can rename the sprite sheet to fighter_30.PNG (30 been the number of sprites in the image) and gamemaker will automatically cut the sprite sheet into 30 frames.
 
Last edited by a moderator:

CMAllen

Member
I'm really new to this but in referance to this

"Click and drag from a folder into GameMaker Studio. It gets to be a pain with sprite sheets, because you can't properly drag & drop them in, because when you do that, GameMaker feels its all 1 image rather than a sheet"

If your sprite sheet is called fighter.PNG and features 30 sprites. I'm sure you can rename the sprite sheet to fighter_30.PNG (30 been the number of sprites in the image) and gamemaker will automatically cut the sprite sheet into 30 frames.
I believe so, but it needs to be in strip format (all one row). Multi-row sprite strips have to be handled manually. And that doesn't help much when you've got many hundreds of sprites to add. Which...I still do >.<
 
Top