I want to be able to make a sprite / bitmap get bigger or smaller on screen. How would you recommend making that happen? Is there a good code example for it anywhere? I obviously can’t be the first person who wants to do this.
Im working on a Wolfenstein 3D style game. Already got white walls and black floor/ceiling where you can walk around the environment. Now I want to add enemies next
The arduboy lib doesn’t have any support for this.
It’s a non-trivial process to do this. There are numerous ways to implement this.
One of the simplest ways would be nearest neighbor with integer scaling.
You will need to implement it yourself with drawing code for the display.
Also you have to keep in mind that you only have 2.5 kb of ram available and one fullscreen image (128x64) already eats up 1kb.
An AVL tree is just a type of binary tree that can be used to store and quickly parse information, O(log(n)) for access, sort etc. It’s merely a container that can be used to store any information for quick retrieval. And it occupies a small memory footprint, IE you should be able to store more world information in an AVL tree and access it faster than most other methods. You can store points, or heights, or a key to a sprite etc.
Say you had a long list of entities to sort through and had to decide which a player could see first. If the entities were stored in a binary tree like an AVL tree, that was sorted, then you could quickly walk the tree and pull the enemies a player can see for drawing without much overhead.