You might consider logging the average FPS over the last 10 seconds. If the FPS drops below 45 frames, forcibly switch the option "System > Fullscreen quality > Low." This is a compromise: you reduce image quality to maintain high performance.
You might have "heavy ticks." For example, you run a function that processing longer than 0.016 second. This can cause FPS drops even with low CPUUtilisation.
Another case is a "heavy frame." This happens when there are too many objects on the screen that overlap, and your video card can't render the frame in 0.016 of a second.
I just played your game and it was a lot of fun!
Thank you ;)
Great! Nice game. I'd like to know how you made the trail of the projectiles.
I used a third-party behavior to create a trail. This is the only third-party behavior used in the project. An alternative way to create a trail would be using a mesh grid. However, this approach requires a very strong understanding of geometry.
Develop games in your browser. Powerful, performant & highly capable.
I published a playable (beta) release on Scirra Arcade:
construct.net/en/free-online-games/tiny-tanks-big-boss-70902/play
Hello everyone! I've created the template for an inventory and crafting system.
I've used a visual dictionary editor for storing recipes. The dictionary key is the item ID (the animation frame of the item sprite), and the dictionary value is the recipe itself.
Try it on Arcade
Download c3p
I don't understand why in this case there's a freeze for a few seconds:
I expected that enabling the "asynchronous" option would allow the function to run in parallel with the main thread. Similar to how the "Find path" action works with the "Pathfinding" behavior. That is, the action starts the pathfinding process in parallel with the main thread, which avoids performance loss.
What should I do if I need to create a heavy function that can run for several seconds and I don't want to get the game process frozen for that time while the function is running?
I've added weapons upgrade tree for each tank. To unlock weapon, players need to gather materials for crafting.
Battle Gameplay video
youtu.be/2BTjdoxi78w
> Is there a way to pick the last destroyed instance of an object? For example, in one tick I destroy several instances and I need to pick the instance that was destroyed last. > > Is there any equivalent to "System > Pick last created", only for destroyed objects? Hi. You can destroy in an enumeration loop. Then the last one will name the smallest IID or the largest depending on the loop settings.
> Is there a way to pick the last destroyed instance of an object? For example, in one tick I destroy several instances and I need to pick the instance that was destroyed last.
>
> Is there any equivalent to "System > Pick last created", only for destroyed objects?
Hi.
You can destroy in an enumeration loop. Then the last one will name the smallest IID or the largest depending on the loop settings.
Thank you!
One idea will be to keep track manually. Here is one example: It will Pick and destroy all the black sprites and show who was the last one destroyed. https://www.dropbox.com/scl/fi/c3tp5wgwqhlmqpgst6fns/Pick-Last-Destroyed1.c3p?rlkey=3cklxpd1fmm8kww7icj6ntnng&dl=0
One idea will be to keep track manually.
Here is one example:
It will Pick and destroy all the black sprites and show who was the last one destroyed.
https://www.dropbox.com/scl/fi/c3tp5wgwqhlmqpgst6fns/Pick-Last-Destroyed1.c3p?rlkey=3cklxpd1fmm8kww7icj6ntnng&dl=0
Thanks! It seems like using a global variable is the only working way to pick the last destroyed object.
I need a trigger that allows picking the last destroyed instance of an object. There's an option where upon destroying an object, the expression "Sprite.Count = 1" is checked. However, there might be a situation where several objects are destroyed in one tick. In that case, the On destroyed event with the expression "Sprite.Count = 1" won't trigger.
The "Destroy" action it is just a request to destroy the object. The object becomes destroyed only after the event sheet processing is finished (only on the next tick).
For example, if you destroy objects, the "Object Count" expression will still consider the objects existing until the end of the current tick.
Is there a way to pick the last destroyed instance of an object? For example, in one tick I destroy several instances and I need to pick the instance that was destroyed last.
Is there any equivalent to "System > Pick last created", only for destroyed objects?
You can use a Dictionary object, which you will save in LocalStorage as Dictionary.AsJSON.
Next, save the state of your boxes in this dictionary. The key name for the dictionary is "Box."&Box.IID.
The key value for the dictionary is Box.AsJSON.
I added an inventory with items:
- Items can be installed on the tank to get stat bonuses.
- Items come in different rarities.
- Items of the same rarity and type can be combined to level them up.
- Unneeded items can be sold.