Code optimization: sprites and drawing

edited December 2016 in Programming Questions

Hello,

I am planning to write a test game in which 20-30 spaceships will be battling each other, and I am looking into different ways of implementing animation. 2D

1) which is better (which will slow the code down less)? to load a sprite sheet (preload pictures) or to use ellipses and lines and that stuff to emulate animations

2) if I use special conditions to draw on the screen only those parts which are visible (obviously only some part of the map is invisible to the player) will it save any tangible amount of resources?

I am thinking about using Processing and, in parallel, java script - p5.js. Do the answers differ for these two programming languages?

Sign In or Register to comment.