Death Star vs Asteroids

Developed or developing a new product in PureBasic? Tell the world about it.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Death Star Vs Asteroids

Post by JHPJHP »

Hi fellow forum members,

This is another retro-style game developed in boredom, still unfinished, but playable.

The first level is slow, designed to get the player used to the controls, but the subsequent levels quickly get crazy.

Minimum work required to complete the game include an opening and ending screen, the ability to pause, ...

Hope you enjoy :!:

NB*: Applied minor updates to Invading Space Aliens.
Last edited by JHPJHP on Sun Mar 20, 2022 6:11 am, edited 1 time in total.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Death Star Vs Asteroids

Post by IdeasVacuum »

oh oh "but the subsequent levels quickly get crazy" - I struggled with the 'fast' speed of Invading Space Aliens. :mrgreen:
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Death Star Vs Asteroids

Post by JHPJHP »

Hi IdeasVacuum,
IdeasVacuum wrote:I struggled with the 'fast' speed of Invading Space Aliens.
I heard the same critique from a few family members this weekend...

While I was creating the game, I played it so much that I am now able to reach level 10; I was finally better then my younger brother at a video game :twisted:

-------------------------------------------------------------

Updated:
- added the ability to pause the game
- switched out a couple images
- optimized and improved parts of the code
- squashed some bugs
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Death Star Vs Asteroids

Post by JHPJHP »

Updated:
- revised game play, reducing chaos
- added a new transition effect between levels
- applied some minor improvements

CONTROLS
- Left | Right Arrow Keys: Rotate Death Star
- Spacebar: Shoot Asteroids / Unpause Game
- Enter Key: Pause Game / Unpause Game

NB*: The game will auto-pause if the window loses focus.
Last edited by JHPJHP on Fri Oct 27, 2017 12:04 pm, edited 1 time in total.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Death Star Vs Asteroids

Post by Kwai chang caine »

Hello JHPJHP :D
I don't understand, i run your code and nothing is happened :shock:
Perhaps my configuration ? W7 X86 v5.61 X86 :|
ImageThe happiness is a road...
Not a destination
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Death Star Vs Asteroids

Post by JHPJHP »

Hi Kwai chang caine,

Thank you for trying the code and reporting the problem.

I have narrowed it down to the Function RegisterFontFile...

... For the tests I have performed, if Microsoft Word was running before the font file was registered, the program would "freeze" at command-line 41.
- closing Word released the process and allowed the program to continue

Test Environment:
- Windows 10 64 bit
- PureBasic x32 / x64
- Microsoft Office 2016

NOTE: This is also a problem for Invading Space Aliens.

NB*: There may be other Microsoft products that cause this problem (i.e. Outlook using Word as an email editor).
Last edited by JHPJHP on Sun Mar 20, 2022 6:11 am, edited 1 time in total.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Death Star Vs Asteroids

Post by davido »

@JHPJHP,
Another great game. Thank you for sharing. :D
Looks great on my PC (Windows 10 x64), even though Office 365 is installed, it works perfectly.

Also looks great on the Mac. There is one problem though:
The DeathStar moves once the arrow button is up.
It moves up the screen vertically when the Left-Arrow button is lifted, down the screen vertically on lifting the Right-Arrow button.
Shots still emanate from the place where the DeathStar should be.

Oh, I should add that the DeathStar returns to its correct position when an arrow key is depressed.
While the arrow key is down the DeathStar rotates....
It is even possible to shoot under these conditions. :)
DE AA EB
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Death Star Vs Asteroids

Post by JHPJHP »

Hi davido,

Thank you for the positive comments, and for the OSX information.

-------------------------------------------

Updated:
- fixed the OSX problem reported by davido
- worked-around the Windows problem reported by Kwai chang caine
- applied some minor enhancements

NB*: Also updated Invading Space Aliens; better compatibility in OSX, squashed some bugs.
Last edited by JHPJHP on Sun Mar 20, 2022 6:11 am, edited 1 time in total.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Death Star Vs Asteroids

Post by davido »

Hi JHPJHP,
Works perfectly now, thank you. :D

As a matter of interest, did you actually check this on a Mac or did you just know it would work?
DE AA EB
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Death Star Vs Asteroids

Post by JHPJHP »

Hi davido,

Thank you for letting me know that the fix worked for you.
davido wrote:As a matter of interest, did you actually check this on a Mac or did you just know it would work?
I only did a few tests in OSX, but none in Linux, so it was good to hear that it worked outside of my environment.

-------------------------------------------------------------

Updated:
- added an introduction based on code written by DK_PETER
- included the IsIDE() Macro writen by skywalk
- optimized and improved parts of the code

The introduction requires the Engine3D binary. If the file is not included with the compiled source code, the introduction will be skipped, but the game will still play.

NOTES:
- the introduction can be skipped using the Spacebar
- press the Enter Key to start a new game (only after Health = 000)

NB*: 5 asteroid hits after Health = 000 the Death Star explodes, followed by a new sound effect.
Last edited by JHPJHP on Sat Jan 06, 2018 6:58 pm, edited 1 time in total.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Death Star Vs Asteroids

Post by Kwai chang caine »

Waaaoooouuuhhh !!!!
SPLENDID !!! like in the movies :shock:
Image

It is my boss who will be content when i say to him "Since I tell you boss, that is programming !!" :mrgreen:

Thanks a lot to have modify your code, this time that work very well :D
I say now "BeatIt" when i see all this asteroid :lol:

Image

Thanks a lot JHPJHP for all your amazing sharing codes since all this years !!! 8) 8)
ImageThe happiness is a road...
Not a destination
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Death Star Vs Asteroids

Post by JHPJHP »

Hi Kwai chang caine,

I am glad it worked for you.

Thank you for the great post; I really enjoyed the dancing Darth Vader.

The opening "movie" effect is mostly thanks to the code written by DK_PETER.

----------------------------------------------

Applied a small update; modified the sprite layers so that the Energy Pulse, Score Board, etc. are better displayed.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Death Star Vs Asteroids

Post by Kwai chang caine »

Enormous this effect, DK_Peter and ApplePI is the champion of 3D effect :shock:
You and all this magicians of the pixels, are really the best ambassadors of our PB of love 8)
ImageThe happiness is a road...
Not a destination
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Death Star Vs Asteroids

Post by JHPJHP »

Hi Kwai chang caine,

Thank you again for your kind words.

I agree, this forum has some talented programmers; every day is an education.

-----------------------------------------------

Updated:
- squashed a bug
- modified game play difficulty
- updated the scoreboard Max Bullet
- changed the text in the opening intro
Locked