Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 How difficult it is to create a game like this?

views
     
flashang
post Mar 5 2023, 04:51 PM

Casual
***
Junior Member
341 posts

Joined: Aug 2021


Very easy.

Galaxy Shooter on Scratch
https://scratch.mit.edu/projects/658003394/

smile.gif


flashang
post Mar 16 2023, 11:17 PM

Casual
***
Junior Member
341 posts

Joined: Aug 2021


May be this game is very simple,
many tutorial use it.

Space Invaders
http://appinventor.mit.edu/explore/ai2/space-invaders.html

Part 1 - Scratch Space Invaders Tutorial - YouTube
https://www.youtube.com/watch?v=1E4b9EwI4lA

smile.gif



This post has been edited by flashang: Mar 16 2023, 11:28 PM
flashang
post Mar 27 2023, 09:25 PM

Casual
***
Junior Member
341 posts

Joined: Aug 2021


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.

IMHO,

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".

smile.gif



This post has been edited by flashang: Mar 27 2023, 09:28 PM
flashang
post Apr 18 2023, 11:33 PM

Casual
***
Junior Member
341 posts

Joined: Aug 2021


QUOTE(Tullamarine @ Apr 18 2023, 06:20 PM)
My new question: How to draw a diagonal line using draw pixel function?

Unlike drawing horizontal line and vertical line, I can increment the x and y. But for diagonal line that connect corner to corner in a rectangle, how to know when to adjust x and y simultaneously? I think it requires math calculation.
*
You may look for the famous "Bresenham’s Line Generation Algorithm" :

Bresenham’s Line Generation Algorithm - GeeksforGeeks
https://www.geeksforgeeks.org/bresenhams-li...tion-algorithm/

smile.gif


flashang
post Jun 18 2023, 11:13 AM

Casual
***
Junior Member
341 posts

Joined: Aug 2021


QUOTE(Taikor.Taikun @ Jun 17 2023, 09:43 AM)
School teach QBasic or self learn?
*
Most of the school already drop vb (qb much earlier), change to teach python.

By the way, is it time to drop VB and migrate to python ?

Microsoft: 'We Do Not Plan to Evolve Visual Basic as a Language' -- Visual Studio Magazine
https://visualstudiomagazine.com/articles/2...b-in-net-5.aspx

hmm.gif


flashang
post Jun 18 2023, 03:25 PM

Casual
***
Junior Member
341 posts

Joined: Aug 2021


QUOTE(Taikor.Taikun @ Jun 18 2023, 12:54 PM)
School here means primary n secondary school. Im curious our public schools teach programming to srudents. Im not aware of that. It's good. We should teach basic stuff in schools like scratch, small basic... even retaining qbbasic, vb, pascal
*
As what other countries have done,
Scratch, Python, c / c++, html css js.

smile.gif



 

Change to:
| Lo-Fi Version
0.0119sec    0.40    6 queries    GZIP Disabled
Time is now: 29th March 2024 - 07:08 PM