QUOTE(Tullamarine @ Mar 27 2023, 12:33 AM)
Is it a must a simple game like space invader to use timer?
Can I use indefinite loop, and then call subroutine to draw, to detect collision, to check key in every cycle / loop?
It might be slow if without timer, to handle manually, but I haven't put them into practice. Still not decisive whether to create space invader first, or continue studying disassembler project....
Thank you @narf03 and @iammyself for sharing your experience, and thanks @flashang for the links (The Galaxy shooter is not mobile friendly :=).
Both methods are working, you may choose the suitable one.
Using timer when :
* Strict time control, e.g. Object from point A move to point B is X seconds aka Y timer count.
* "Simple" calculation which can be done within one timer cycle.
Using indefinite loop is more suitable for :
* Non-time critical requirements, e.g. turn based game, chess, card.
* Complex calculation which may not able to complete within limited of time, e.g. chess calculation.
You might need to try than can get the "best practice". This post has been edited by flashang: Mar 27 2023, 09:28 PM