A lot of people seem to think that Game Maker: Studio is incapable of properly handling external resources. Perhaps this idea was created by inexperienced GM:S users or it was due to the fact that Game Maker doesn't have any functions called "Import_My_Files()".
Step 1. Importing Sprites
There is a function called "sprite_add()", let's begin by using that. It will return a sprite index that can be used to draw the sprite later on. So try using this line:
spr = sprite_add("image.png",1,false,false,0,0);
It is important to note the removing the background and/or doing smoothing drastically increases the time it takes to import an image. I recommend removing the background in advance and just importing the image as is. It'll both look better and take less time to import.
Step 2. Cache Those Sprites
If you don't feel like spending forever carefully placing your sprites onto a surface, I recommend checking out this excellent collection of scripts that do that hard work for you! http://gmc.yoyogames.com/index.php?showtopic=669935
The way to do this on your own is to draw the sprites to a surface, then import that surface as a single sprite or background. From there you can call those sprites from their respected places that new texture page.
Why is all this important? Every time you have to draw an image from a different texture page, you sacrifice loads of performance. Try to draw 1,000 sprites from 2 separate texture pages back and forth compared to drawing 1,000 sprites from the same texture page. You'll see the difference.
Step 3. Realize The Potential Of External Resources
Allowing your game to use external resources will open new doors for you. Imagine being able to use the Game Maker: Studio runner and not face a compile time, EVER. Reducing the number of texture pages Game Maker has to compile at run-time speeds up the process by quite a bit. My game generally launches in under 2 seconds and I only have to wait for the game to compile texture pages for the parts of the game I want to test.
This website uses marketing and tracking technologies. Opting out of this will opt you out of all cookies, except for those needed to run the website. Note that some products may not work as well without tracking cookies.Opt Out of Cookies
This blog is written and maintained by