New answers tagged

1

Yes, GM:S already does multi-threading programming on its own. Being a development framework, it would be a pain in the neck if it didn't so. Instead of creating several objects with different sprite_indexes to create a seamless field of fur, you may want to draw them on a Surface first, and then draw it into your room. What are Surfaces? Surfaces are a ...


2

In Game Maker, every object has a lot of built-in variables. Creating an object for every piece of fur may be a waste of resources. You could create a single object, that would store the basic variables for every piece of fur (sprite_index, position, etc.) and then in it's draw event draw them all at once. EDIT : as you want to interact with the fur bits, ...


1

You can construct an efficient test of whether a point lies within an axis-aligned rectangle with well-understood algorithms. Try this answer.


0

I can guarantee you that one extra vector projection per frame for 300 units will not slow down your game. You could probably run thousands and thousands of these without noticing a performance dip. Your issue is elsewhere. To find out where you will need to do some profiling. Thankfully this is really easy since Unity 5.0 as you now have access to the ...


0

You can find many articles and repos online related to this topic. User dgkanatsios on GitHub created his MatchThreeGame and included an article on his site in which he explains how to make such a game in Unity step by step. As well, did rembound with his Match-3-Game-HTML5 which was developed in JavaScript and run in a browser. Although you're working with ...


0

Stacks would actually, in all likelihood, be easier (and faster, so I've heard) than an array. Also, it's got really useful tools like clear which is great when you just want to negate the entire link. Well, it would be if simply clearing the internal link was all you needed to mark everything as "not linked". You'd probably still want to go 1 by 1 and by ...


2

You shouldn't have a hierarchy. One reason component-based approaches are popular right now is because it's easy use them to separate the association of a component with an entity (the "hierarchy") with the actual concrete storage of the components such that the storage can be contiguous and cache-friendly for processing. Ideally, you'd have a renderable ...


1

Another strategical rule of Tetris you didn't mention is that it is crucial to avoid closing up holes. || Bad move! \/ ## ## ### ##### # ### ###### # ### ####### # <-Creates a closed up hole on this row. ########### # Place it somewhere on top instead! When there is no way around it, it's better to create the hole in a row ...


1

Your own suggestion sounds exactly what I would do. Note that you are not limited to store just ints or strings in an array. Make an array of objects: Basically you create a game cell object that holds information you would need like position, type and so on. This cell object is then added to the 1D array: linkedcells[i] = instance_create(x,y,obj_cell) ...


1

PlayerEndOfFrame is where your work shows up when you run a Unity coroutine and increment it by using the command "yield return new WaitForEndOfFrame();" In this case the coroutine you are running is instantiating a lot of memory and doing a lot of work every frame. It is also worth noting that by using WaitForEndOfFrame here you are running your coroutine ...



Top 50 recent answers are included