|
Post by aurel on Mar 19, 2020 0:23:52 GMT -6
There are 3 type of asteroid games:
1.ship in a center of screen and just rotate
2.ship rotate and moving arround screen
3.ship not rotate and moving left-right like in ordinary top-down shooter.
|
|
|
Post by johnno56 on Mar 19, 2020 2:46:10 GMT -6
My Attack3 game uses the third option. Much simpler to code. Move left and right (wrap is optional) and shoot. Target move left and or right and wrap the screen. When shot, new target created with random left or right direction random speed. Keep score. You would think that by applying similar principles of game #3, to make a game #2, wouldn't be that hard... (insert "wrong buzzer" sound here...)
Game #2: Left and right to rotate the ship. Up arrow to move in the direction the ship is facing. (optional "friction" to "slow" the ship) Space to shoot. Now, doesn't that sound so simple? This is where I am up to. All that I can do and have done.
Let's introduce asteroids shall we? Four possible directions to enter the screen. (beyond the boundary of each edge) Large rocks moving at various speeds (possibly rotating as they move - optional). Detect collision (between two 'circular' shapes - bullet and rock) then remove rock and in its place, create two smaller rocks, moving away at different angles until they themselves are destroyed. Then a new large rock is generated. Whilst at the same time checking for a collision between rocks (large and small) and the ship. Terminate game or continue until the current "wave" of asteroids are destroyed. Continue playing until all player lives are depleted. Oh. Let's not forget the scoring system (high score table - optional). I forgot the sound effects again... I'm always forgetting something... I hate getting old.
It sounds so much simpler when typing it out... Did I miss anything? So much brain strain and so little time to finish...
Three coffees today and no further along. Change of direction. I'm going to look for an asteroid-type listing to learn how the asteroid 'system' works. (Generation. Movement. Destruction. Smaller rocks etc)
|
|
|
Post by kennn on Mar 19, 2020 2:55:33 GMT -6
johnno56,As I have said before, I have no idea on how to code Asteroids, Okay, we are hoping that aurel can show you the URL of the source code as soon as possible. aurel,There are 3 type of asteroid games: However, johnno56 may not be familar with the development of these three kinds of games. The best solution is that johnno56 can download the source code of the Oxygen Basic asteroid game to analyse directly. Do you know the URL?
|
|
|
Post by kennn on Mar 19, 2020 4:03:50 GMT -6
johnno56,1. The following source codes will help you considerably. 7 asteroid games and the other 70 space games are on the following webpage. The languages used are QBasic or QuickBasic. I believe that you will easily learn from these source codes. Is it possible for you to write the first level within a short period of time? qb45.org/files.php?cat=62. Since now only you are familiar with a whole game development in RCBasic, I suggest that the graphics of the entry are done by aurel. aurel,1. Since there are many QBasic and QuickBasic source codes on the above webpage, the Oxygen Basic source code is not needed at the moment. 2. By the way, you look like a creative person. Any good comment on the comments from johnno56 on the entry's gameplay in johnno56's post?
|
|
|
Post by aurel on Mar 19, 2020 5:10:40 GMT -6
Ok johnno i agree 3 is the simpliest and can be modified to good small shooter i simply cannot found all that old files ,it looks that mr.JohnSpikowski removed it from o2 forum such a jerk... In fact all this things about simple game programming maybe help me to add gfx function to my new interpreter would be nice to have loadSprite,moveSprite,destroySprite ..etc functions. Just to let you know i alredy have one small shooter but just with one level..hehe
|
|
|
Post by aurel on Mar 19, 2020 14:10:49 GMT -6
OK boys I have some time today(holy-day here) and i do some modification to old peter wirbelauer program with sprite and pure GDI windows native graphic functions,program use window size 640x480 but you can resize it looks like a real game,,heh he in fact is just a demo in o2 compiler( sorry i don't know how to translate this to rcBasic in attachment is demo exe so you can try how work,it should work on linux to with wine because is GDI. UFOsoftscroll.zip (11.74 KB)
|
|
|
Post by aurel on Mar 19, 2020 14:11:46 GMT -6
Here is a screenshot:
|
|
|
Post by johnno56 on Mar 19, 2020 14:56:26 GMT -6
Thanks, Aurel. Much appreciated.
I downloaded O2 some time ago (just to see if it could run through Wine) and compiling did not go as planned... Oh well. But the IDE works just fine.
Opened the IDE and loaded your UFO program. If I get some time, I will try to convert it to RC, no promises... lol
Again. Thank you for the program...
|
|
|
Post by johnno56 on Mar 19, 2020 16:57:24 GMT -6
Aurel,
Conversion was pretty much straight forward.
A few things... POKE seems to be similar to PSET? Could not do the background AND the stars. The background is drawn first, then the stars, then the player. All that cycles through so quickly, the tiny little stars, are basically never seen. Loaded a fixed background instead.
The map[] array and the bx variable are never used. Smoothing movement is made redundant because RC uses DrawImage_Blit().
Events not required FlipBuffer - I think does something similar to RC's update() WaitFPS - I think ensures that the program will run at the same speed on all machines. I have a Deltatime function if you need it (from tbird)
Other than that it is basically a, move animated ship to the screen limits... I can make the player "wrap around" if you like.
J
ps: I slightly modified the 'ship' (enlarged a little and removed the spacing between frames)
|
|
|
Post by kennn on Mar 19, 2020 22:13:01 GMT -6
johnno56,I downloaded ufo.zip and the source code can be run on my computer(Windows OS)! It is the first level of this entry. Suggestion: should not use 4:3 ratio because nearly all monitors are 16:9(1920x1080 or 1366x768). So I enourage you to use 960x540(16:9) and not to use 640x480(4:3). Furthermore, use WINDOWPOS_CENTERED,WINDOWPOS_CENTERED. Better than top left corner. aurel,Ok johnno i agree 3 is the simpliest..... Very good idea. "simpliest" means that the whole entry can be finished as soon as possible. All your opinions are welcome!!!!!!
|
|
|
Post by aurel on Mar 20, 2020 0:52:00 GMT -6
Look..that suggestion is wrong,you don't read my post ...I said you can resize window? do you tried?
|
|
|
Post by johnno56 on Mar 20, 2020 3:21:45 GMT -6
Ok. Ufo is a conversion of Aurel's o2 program to demonstrate conversion to RC. I'm still researching....
|
|
|
Post by aurel on Mar 20, 2020 4:05:49 GMT -6
Johnno I am just made a demo to see what i can use and built into my interpreter and i don't want to use any external dll than use native win api functions which are part of any windows os. Game loop is a main part of any game and as such it is almost the same in any approach you use.
|
|
|
Post by kennn on Mar 20, 2020 4:18:52 GMT -6
aurel,Oxygen Basic version <--- no johnno56's version <--- yes Sorry, as I remember, window cannot be resized in program made in RCBasic. Perhaps I am wrong. On the other hand, the window of johnno56's version cannot be resized. johnno56,Ok. Ufo is a conversion of Aurel's o2 program to demonstrate conversion to RC. I'm still researching.... The translation should be a hard mission. Our current target should be the level one. If the development of the level one is completed, the development of the other levels will be easier.
|
|
|
Post by aurel on Mar 20, 2020 5:16:12 GMT -6
kenn
may i ask you why not ,is that hard to you to unpack zip content and run given exe file. Don't worry I scanned it with Kaspersky. And about what kind of level you talking ..you don't have even 50% of level 1. if you have then show us!
|
|