16
Tiny Arcade & Pocket Arcade / Re: Creating sprites dynamically (on run time). Is it possible?
« on: July 20, 2018, 01:37:23 PM »
Hi John,
I believe that instantiating each individual sprite (characters or bullets) and keeping them off screen is probably the best way to go. I'm imagining this to be a platformer game similar to Contra or something of the sort, so what you may want to do (referencing our game development tutorial found at https://tinycircuits.com/blogs/learn/how-to-develop-a-game-for-the-tinyarcade-new) is create different spriteList arrays and allow the drawBuffer function to be passed this array depending on the level of the game. Each array would then include the bullets, characters, and enemies for the specific level that the player is on. As sprites are needed they can be moved on screen. I'd imagine you want multiples of bullets and enemies using the same sprites so those will have to be created separately in the arrays.
I hope this helps answer your question. If you have more, feel free to reach out!
Thanks,
-Hunter
I believe that instantiating each individual sprite (characters or bullets) and keeping them off screen is probably the best way to go. I'm imagining this to be a platformer game similar to Contra or something of the sort, so what you may want to do (referencing our game development tutorial found at https://tinycircuits.com/blogs/learn/how-to-develop-a-game-for-the-tinyarcade-new) is create different spriteList arrays and allow the drawBuffer function to be passed this array depending on the level of the game. Each array would then include the bullets, characters, and enemies for the specific level that the player is on. As sprites are needed they can be moved on screen. I'd imagine you want multiples of bullets and enemies using the same sprites so those will have to be created separately in the arrays.
I hope this helps answer your question. If you have more, feel free to reach out!
Thanks,
-Hunter