GLBasic forum

Main forum => Beta Tests => Topic started by: Bursar on 2010-Sep-13

Title: Glowing Rocks from Outer Space
Post by: Bursar on 2010-Sep-13
So it's a rubbishy title, but what did you expect from an Asteroids clone? ;)

Couple of screenshots attached so you can see what it looks like. Download linkage (3MB) is here (http://tymargames.co.uk/wp-content/uploads/2010/09/GlowingRocks.zip)

Source code now available: http://tymargames.co.uk/wp-content/uploads/2010/09/GlowingRocksSource.zip

Makes use of MrTAToads vector code and PeeJays bitmap font routine - thanks guys, the game looks much because of that :)

[attachment deleted by admin]
Title: Re: Glowing Rocks from Outer Space
Post by: Kitty Hello on 2010-Sep-13
Very nice. The rotation feels a bit too slow, but apart from that - excellent.

Make it rotate on gravity and push an iPhone version :P

Excellent use of GLBasic techniques, too. I saw you using ini files.
Title: Re: Glowing Rocks from Outer Space
Post by: Bursar on 2010-Sep-13
Yeah, the rotation speed was also mention when I posted on RR, so I'll up that a bit. I've been asked for the source code, so when I've made a few changes and tidied it up, I'll put that up here as well.
Title: Re: Glowing Rocks from Outer Space
Post by: Wampus on 2010-Sep-14
I prefer it to the original, which is great praise for a remake.  =D
Title: Re: Glowing Rocks from Outer Space
Post by: matchy on 2010-Sep-14
Love it!  :good: :coke:

This needs to be on the iPad.
Title: Re: Glowing Rocks from Outer Space
Post by: Cliff3D on 2010-Sep-14
As computers get more and more powerful, I find that there are a few "old favourites" from my childhood that are still worth purchasing (over, and over, and over again!) because their gameplay is simply enjoyable enough that, even with dated graphics and sound, they are a valuable asset on my new computer.

Asteroids (along with PacMan, BattleZone, and very few others) is a great example of a game that I get over and over again - played in the arcades, bought as "Meteroids" for the BBC Micro, bought as part of the "Microsoft Arcade" for Windows 3.x (and still works under Windows XP today, although window size is an issue on modern graphics cards) and various "81 games for £10" type packs from Atari and the likes.

So - Asteroids is known to be one of my all-time favourite games, on all platforms - and while I agree that ship rotation could be sped up a bit, I love your version just from a quick play. Excellent job, sir :D
Title: Re: Glowing Rocks from Outer Space
Post by: Bursar on 2010-Sep-14
 :happy: Thanks guys :)

I downloaded GLB about 3 weeks ago, and spent a few hours most evenings working on it, so it just shows how easy GLB is to get to grips with.

I think I might well buy it now :)
Title: Re: Glowing Rocks from Outer Space
Post by: Ian Price on 2010-Sep-14
That's rather nice that is. probably one of the best Asteroids remakes I've ever played. :)
Title: Re: Glowing Rocks from Outer Space
Post by: Hatonastick on 2010-Sep-15
Brilliant, but what else would I expect from one of the RR crew. :)
Title: Re: Glowing Rocks from Outer Space
Post by: Wampus on 2010-Sep-15
Just a thought Bursar - Retro vector games seem to be popular on the iPhone and iPad. I noticed a game called Tractor Beam on iTunes last night doing well and it looks rather dull compared to the smooth gleaming pretties of your asteroids clone.



Glowing Rocks from Outer Space is an excellent name for a game IMO.  :) However, in regard to the clip I just posted never, ever, ever call a design company/collective Manufacturing Content.  :noggin:
Title: Re: Glowing Rocks from Outer Space
Post by: Bursar on 2010-Sep-15
Thanks for the praise, but there won't be an iThing version. I don't own any Apple products, mainly for the abonimations that are QuickTime and iTunes. I also don't intend to pay £650 for a Mac Mini, when a PC of the same spec would only cost about half as much. But that's enough of my anti-Apple rant :)
Title: Re: Glowing Rocks from Outer Space
Post by: Bursar on 2010-Sep-16
OK, new version now available. If you have already downloaded the game, you can just replace the .exe file with the one in the new ZIP file so that it will retain your high scores. The link to download the complete game has been updated with the new version.

The changes are:
Increased player rotation speed
Increased safe radius check when spawning player
Altered first ufo spawning timer to give a little longer before it appears
New rocks only spawn when the ufo isn't on the screen
Medium and small rocks slightly shrunk in size
Small ufo slightly shrunk in size
Friction slightly reduced so player drifts for longer
Holding down the fire key at game over no long whizzes through the hi-score initial entry screen and starts a new game
Pressing Esc during the game brings up a pause menu rather than exiting the game

Let me know what you think, and if it needs any more tweaks :)

If there's nothing really left to change, I'll post the source code in a few days.
Title: Re: Glowing Rocks from Outer Space
Post by: Cliff3D on 2010-Sep-17
New download?
Title: Re: Glowing Rocks from Outer Space
Post by: Bursar on 2010-Sep-17
Sorry, might not have been clear. The files have been updated, so the link in the first post will get you the updated version, but here's the link again: http://tymargames.co.uk/wp-content/uploads/2010/09/GlowingRocks.zip

I haven't changed the ZIP name. In future I'll add a v1.1 or something onto the end :)
Title: Re: Glowing Rocks from Outer Space
Post by: Cliff3D on 2010-Sep-17
Ah thanks! I was put off by the (old) date being in the download link. Running to fetch it now!
Title: Re: Glowing Rocks from Outer Space
Post by: Cliff3D on 2010-Sep-17
Well, the updated version plays very nicely here :D

All I want now is BattleZone (supporting 2 joysticks on a gamepad for individual tread control) and maybe a glowy-ghostly version of Pacman :D
Title: Re: Glowing Rocks from Outer Space
Post by: Cliff3D on 2010-Sep-18
Hmmm - I wouldn't want to delay release of the source code one iota, but I wonder - could the small UFO be a touch smaller?
Title: Re: Glowing Rocks from Outer Space
Post by: Bursar on 2010-Sep-19
I've put the source code up: http://tymargames.co.uk/wp-content/uploads/2010/09/GlowingRocksSource.zip

I'd be interested in any feedback on the code, particuarly as I'm new to GLB.
Title: Re: Glowing Rocks from Outer Space
Post by: Cliff3D on 2010-Sep-23
I'm afraid I haven't looked at the code (I'm a newbie to GLBasic anyway) but I've voted for the app in the showroom anyway :)
Title: Re: Glowing Rocks from Outer Space
Post by: Kitty Hello on 2010-Sep-23
Some comments on the code - it's mostly nickpicking - nothing serious. Your code shows you're an experienced programmer.

-functions that return nothing or true/false should be integer: FUNCTION foo%:
-why not using the DELETE inside the FOR loop but set a bMustBeDeleted Flag?
-the "player.state$" and such might be better to be an integer and constants instead of strings (especially for small platoforms), but again, that's all no big deal. The code is great!
Title: Re: Glowing Rocks from Outer Space
Post by: Bursar on 2010-Sep-23
Thanks :)

Quotefunctions that return nothing or true/false should be integer: FUNCTION foo%:
Useful to know - that's just my inexperience with the language. Took me long enough to get used to putting the colon on the end of the function name instead of brackets :)

Quotewhy not using the DELETE inside the FOR loop but set a bMustBeDeleted Flag?
Because using delete causes the loop to go straight to back the top and ignore anything else below it. Again, it might just be my inexperience with GLB, and I'll be able to avoid it in future.

Quotethe "player.state$" and such might be better to be an integer and constants instead of strings
Agreed, but then you have to remember 1= "menu", 2= "game" and so-on. Strings just make the code easier to read.

QuoteThe code is great!
Thanks  :enc:
Title: Re: Glowing Rocks from Outer Space
Post by: Slydog on 2010-Sep-23
QuoteAgreed, but then you have to remember 1= "menu", 2= "game" and so-on. Strings just make the code easier to read.

You're right, using numbers in code is hard to read.  But using constants makes it clear again, such as:
Code (glbasic) Select
CONSTANT STATE_MENU = 1
CONSTANT STATE_GAME = 2

SELECT player.state
CASE STATE_MENU
...
CASE STATE_GAME
...
ENDSELECT


Am I crazy, or is the 'CONSTANT' command not listed in the help file?
I was checking if you can use '%' in a constant definition, such as "CONSTANT STATE_MENU% = 1".
It doesn't give me an error, so I assume so.  It may also infer the type by the fact that is has no decimal places.
Title: Re: Glowing Rocks from Outer Space
Post by: Kitty Hello on 2010-Sep-23
right. And put the DELETE at the end of the day, where you CONTINUE anyway.
Title: Re: Glowing Rocks from Outer Space
Post by: Bursar on 2010-Sep-23
Quote from: Slydog on 2010-Sep-23
QuoteAgreed, but then you have to remember 1= "menu", 2= "game" and so-on. Strings just make the code easier to read.

You're right, using numbers in code is hard to read.  But using constants makes it clear again, such as:
Code (glbasic) Select
CONSTANT STATE_MENU = 1
CONSTANT STATE_GAME = 2

SELECT player.state
CASE STATE_MENU
...
CASE STATE_GAME
...
ENDSELECT


Am I crazy, or is the 'CONSTANT' command not listed in the help file?
I was checking if you can use '%' in a constant definition, such as "CONSTANT STATE_MENU% = 1".
It doesn't give me an error, so I assume so.  It may also infer the type by the fact that is has no decimal places.

Using the above code makes my game lock up and produces the 'not responding error'. If I replace the use of the constants with actual numbers in the CASE statements, it works. Is this a bug?

Causes lockup:
Code (glbasic) Select

CONSTANT STATE_MENU = 1
state = STATE_MENU

SELECT state
CASE STATE_MENU
...
ENDSELECT


Works ok:
Code (glbasic) Select

CONSTANT STATE_MENU = 1
state = STATE_MENU

SELECT state
CASE 1
...
ENDSELECT
Title: Re: Glowing Rocks from Outer Space
Post by: Slydog on 2010-Sep-24
Is your 'state' variable declared as an integer?  As in:
Code (glbasic) Select
LOCAL state%

Other than that, that's the right way of using 'SELECT' with constants.

[Edit]
Or, if that's your entire code, then try:
Code (glbasic) Select
state% = STATE_MENU
Title: Re: Glowing Rocks from Outer Space
Post by: Millerszone on 2010-Sep-24
Great game. Asteroids is my all time favorite arcade game and this one is even better!

Thanks for posting the code, I can learn a lot from it.
Title: Re: Glowing Rocks from Outer Space
Post by: MrTAToad on 2010-Sep-26
Glad you found the TVector routine useful!