![]() If you have a series of sprites and backgrounds that only appear in a single level/room, then make a group for them, etc. Here you can create the texture groups groups that you need - for example, if you have some graphics that only appear in the Main Menu, create a group for them. To start with, you should open the Texture Group Editor from the Tools menu at the top of the IDE. How to avoid this? Well, you can create Texture Groups for your game and then flush and pre-fetch the unused graphics from texture memory at the start of the room, meaning that only those graphics you are going to actually use are held in memory. This means that for GameMaker Studio 2 to draw them on the screen, it may have to perform texture swaps to get the correct sprite from the correct page, which is not a problem when it's only a couple of pages, but when they are spread out over of a lot of pages, this continuous swapping can cause lag and stutter. Now, when you have created many graphics for your game they may start to take up more than one texture page and you can have them spread out over several different ones. A texture page is simply a single image with all the game graphics spread out in such a way that they can be "pulled" from it at run time to draw on the screen. GameMaker Studio 2 stores all your game graphics on Texture Pages. ![]() Below you can find some tips on how to achieve this. One of the most common causes of slow-down and stuttering in a game is the graphics pipeline, so you want to make sure that you draw everything in the most efficient way possible. however there are a few general "rules of thumb" that can be followed in all projects which will help you to get the most from GameMaker. Unfortunately there is no easy answer to this! Each game is different and how you code them will vary depending on your own needs for the project. Repeat those steps with objPriest and objWarrior, using their respective weapons and you are done.One of the most frequently asked questions about making games with GameMaker Studio 2, is how to optimise them so that they run as efficiently as possible. Now add another "VAR Drop Action", name it weapon and set it's value to objFireball.Īs last step, set the parent of this object to objPlayerParent. ( If you want to do this in code, you will have to use event_inherited() ).Īlright, so now that has been taken care of. What this actually does, is that it calls the parents event of the same type. Click the button where it says "Call Event". On the right side, open the tab where it says "Control". But we need those, otherwise our scripts won't work. In our case, we created 2 variables in the parent's "Create Event". This is actually quite useful, but also a source for errors. If you have the same event in your parent and your child object, then the child overrides the parent's event. We are already using this event in our objPlayerParent, does this not cause problems? The answer is: Yes, it will, if we don't do something about it. ![]() So the idea is, that the Mage shoots Fireballs, the Warrior throws bricks in ya face and the Priest is gonna burn you with stars. ![]() If you have set up your objects like I did, you should have three objects: Remember back when we added this code for shooting and I said this will make our game crash right now? We gonna take care of this right now and it is really, really easy. Simple, but effective and intuitive feedback for the player to see what he is actually doing. So you could copy the sprites we use, add some glow around them and when the player hovers over them, you replace the rendered sprite with the glowing one. Game Maker's Sprite Editor also has the ability to add some glow around images. If you don't know how to make tooltips, look at my other guide for more information:Īnother way would be to render some text below the dudes that simply displays something when you hover the mouse over the sprite. It is a simple way of giving the player information what a button or a selection does. There are 2 ways of creating feedback here. If you make a selection of any kind, it is always good to give the player some feedback. This is an optional part, but I feel the need to point it out.
0 Comments
Leave a Reply. |