Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 How difficult it is to create a game like this?

views
     
TSFlierMate4
post Mar 5 2023, 03:41 PM, updated 2y ago

Getting Started
**
Validating
90 posts

Joined: Jan 2023
A alien space ship shooting game, someone did it using BASIC language, no game engine.

How easy or how difficult it is to create a game like this? Anyone attempted it before? Please share.

user posted image


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


TSFlierMate4
post Mar 5 2023, 07:18 PM

Getting Started
**
Validating
90 posts

Joined: Jan 2023
I found a game competition on:
https://www.syntaxbomb.com/game-coding-competitions/

It gives away 100 pounds for winner. Not sure if it has something to do with Blitz2D and Blitz3D SDK. I am still new there.
narf03
post Mar 12 2023, 12:54 AM

Look at all my stars!!
*******
Senior Member
4,545 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


About 1 day with game engine I think.

There are many things that u can't see like high score, menu, level difficulties,vetc.
iammyself
post Mar 16 2023, 03:06 PM

Getting Started
**
Junior Member
238 posts

Joined: May 2011
I did something similar many years ago. I did not use a game engine but I remember using some kind of graphics library.

I'm typing this entirely from memory so take it with a grain of salt.

But the core of a simple game engine is the rendering loop -- basically an infinite for loop. There's tick-based loop and frame-based loop.
One of them is easier to implement -- can't remember which one.

At every iteration, you pass some time info to the objects and the physics engine, as well as update score counter and read user input.

The objects are the aliens and the player. They have properties like coordinates and HP and speed and direction.

For the physics engine, it's for collision detection. If the player shoots a bullet and that bullet object touches the alien, that's collision is going to deduce enemy HP / destroy it.

Once the HP gets to zero for the alien, the alien sprite is removed from screen, and the score is updated.

I only did a toy project though. It's not a productive way to make real games.


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
Tullamarine
post Mar 27 2023, 12:33 AM

Getting Started
**
Validating
163 posts

Joined: Apr 2020
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 :=).
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
Tullamarine
post Apr 18 2023, 06:20 PM

Getting Started
**
Validating
163 posts

Joined: Apr 2020
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.
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


Tullamarine
post Apr 20 2023, 03:33 PM

Getting Started
**
Validating
163 posts

Joined: Apr 2020
QUOTE(flashang @ Apr 18 2023, 11:33 PM)
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
*
Thank you (and @angch), for telling me about the Bresenham's Line Algorithm.

Your geeksforgeeks website requires an account to continue, so I use the example code in Wikipedia.

If I use plotLine, I can only draw horizontal line and diagonal line from upper left to lower right.
This is my own code with example screenshot.
user posted image

However, a fellow coder revealed to me plotLine is only half of the algorithm, have to use plotLineLow and plotLineHigh to meet all cases, like vertical line and diagonal line from lower left to upper right.

I am glad to learn about this. Thanks!

P/S: Attached is example source code and DOS EXE to test the limited use of plotLine function.

This post has been edited by Tullamarine: Apr 20 2023, 03:36 PM
kitsunegeisha
post Apr 20 2023, 03:36 PM

Getting Started
**
Junior Member
213 posts

Joined: Mar 2022
using html also can...i done 1 game like space impact using html

This post has been edited by kitsunegeisha: Apr 20 2023, 03:37 PM
donald88
post Apr 20 2023, 03:41 PM

Casual
***
Junior Member
357 posts

Joined: Sep 2008


can try ChatGPT.

Tullamarine
post May 2 2023, 11:37 PM

Getting Started
**
Validating
163 posts

Joined: Apr 2020
QUOTE(kitsunegeisha @ Apr 20 2023, 03:36 PM)
using html also can...i done 1 game like space impact using html
*
I think you mean JavaScript....

QUOTE(donald88 @ Apr 20 2023, 03:41 PM)
can try ChatGPT.
» Click to show Spoiler - click again to hide... «

*
Nice, wholesome video, he is a game director at Blizzard Entertainment.

This post has been edited by Tullamarine: May 6 2023, 11:27 PM
aeric80
post May 24 2023, 03:50 PM

Getting Started
**
Junior Member
120 posts

Joined: Jun 2011
From: Kuala Lumpur


QUOTE(FlierMate4 @ Mar 5 2023, 03:41 PM)
A alien space ship shooting game, someone did it using BASIC language, no game engine.

How easy or how difficult it is to create a game like this? Anyone attempted it before? Please share.

user posted image
*
What programming language do you want to use to create this game? Is it for Windows platform?
Take a look at this example created using B4X, with syntax similar to BASIC
Games [XUI2D] Space Invaders #1
user posted image

This post has been edited by aeric80: May 24 2023, 03:50 PM
yukkit1026 P
post May 25 2023, 03:26 PM

New Member
*
Probation
24 posts

Joined: Jun 2022


https: //yukkit1026.github.io/Dino.git.io/
Not the best but was my pure effort lmao. I know it suck too. Took me 2 weeks to finish it with newbie knowledge towards js. My fyp
FlierMate
post May 27 2023, 08:21 PM

On my way
****
Validating
543 posts

Joined: Nov 2020
QUOTE(aeric80 @ May 24 2023, 03:50 PM)
What programming language do you want to use to create this game? Is it for Windows platform?
Take a look at this example created using B4X, with syntax similar to BASIC
Games [XUI2D] Space Invaders #1
user posted image
*
Thanks, I took a look, its resources were taken from a Python project (also a similar game), but haven't fully look into details.
Judging from the screenshot, it looks complex than I thought. Yes, I plan for Windows platform, but mine will be console screen mode, and there will be only one game level.

QUOTE(yukkit1026 @ May 25 2023, 03:26 PM)
https: //yukkit1026.github.io/Dino.git.io/
Not the best but was my pure effort lmao. I know it suck too. Took me 2 weeks to finish it with newbie knowledge towards js. My fyp
*
Nice FYP.
user posted image

I help to paste links:

Game: https://yukkit1026.github.io/Dino.git.io/
Source Code: https://github.com/yukkit1026/Dino.git.io

It is playable, but must press Up arrow multiple times. If the bird can occur at the same screen as cactus, then it will be more challenging.

Wish you a bright future ahead.
SUSTanahGagal
post May 27 2023, 08:54 PM

Getting Started
**
Junior Member
146 posts

Joined: May 2022

Ayam did similar game using QBasic in Form 5
ifourtos
post May 27 2023, 08:59 PM

Regular
******
Senior Member
1,884 posts

Joined: Feb 2012



2 hours, construct
FlierMate
post Jun 3 2023, 11:55 PM

On my way
****
Validating
543 posts

Joined: Nov 2020
........

This post has been edited by FlierMate: Jun 5 2023, 08:10 PM

2 Pages  1 2 >Top
 

Change to:
| Lo-Fi Version
0.0157sec    0.35    5 queries    GZIP Disabled
Time is now: 29th March 2024 - 05:22 PM