Death Star vs Asteroids

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

Death Star vs Asteroids

Post by JHPJHP »

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

Download Death Star vs Asteroids from My PureBasic Stuff

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

Announcements
PureBasic Interface to OpenCV
PureBasic Interface to WinDivert
PureBasic Interface to WinRAR
PureBasic Interface to 7-Zip
PureBasic Interface to ImDisk
Windows Services & Other Stuff
Invading Space Aliens
Death Star vs Asteroids
GIF Toolkit
LSB Image Steganography
Spider Web Drawing
Deform Image: MLS
Video Snipping Tool
Chromium Edge WebGadget
IAccessible Interface
Stitch Images: SIFT
OldSkool Fire Effect
Image Waves: LUT
YouTube Player & Downloader
MP4 Player & Downloader
Large Image Viewer
Barcode Generator
Google Translate Service
Embed JS into PureBasic
Geolocation: Google Maps
Book & Viewer & Magnify
Video for Windows: VfW
Alternate Console
Network Share Management

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

CONTROLS
- Left | Right Arrow Keys: Rotate Death Star
- Spacebar: Shoot Asteroids / Unpause Game / Skip Intro
- Enter Key: Pause Game / Unpause Game / Start New Game (only after Health = 000)
- H Key: Open Help Window

NOTES
- every 10000 points, 5 health points will be added to the Death Star
- the game will auto-pause if the window loses focus
- press the [ Ctrl ] key at anytime to return mouse control

NB*: The introduction requires the Engine3D binary. If the file is not included with the compiled source code, the introduction will be skipped.
JHPJHP wrote:A long time ago in a galaxy far,
far away...

Rebel Scum
on a mission to destroy
the Death Star, installed a
computer virus infecting the
ships main systems.

With a new
set of instructions, the
reprogrammed A.I. teleports the
Death Star to random galaxies, fixed
to materialize within their
asteroid fields.

Your only chance of
survival, after each jump use
the directional thrusters to rotate
the Death Star, blasting asteroids with
the modified superlaser, or give up
and accept ANNIHILATION...

Death Star
vs
Asteroids
Last edited by JHPJHP on Sat Oct 16, 2021 8:54 pm, edited 46 times in total.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
User avatar
JHPJHP
Addict
Addict
Posts: 1851
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.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
IdeasVacuum
Always Here
Always Here
Posts: 6387
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.
User avatar
JHPJHP
Addict
Addict
Posts: 1851
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

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
User avatar
JHPJHP
Addict
Addict
Posts: 1851
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.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
User avatar
Kwai chang caine
Addict
Addict
Posts: 4968
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
User avatar
JHPJHP
Addict
Addict
Posts: 1851
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).

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
davido
Addict
Addict
Posts: 1853
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
User avatar
JHPJHP
Addict
Addict
Posts: 1851
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.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
davido
Addict
Addict
Posts: 1853
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
User avatar
JHPJHP
Addict
Addict
Posts: 1851
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.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
User avatar
Kwai chang caine
Addict
Addict
Posts: 4968
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
User avatar
JHPJHP
Addict
Addict
Posts: 1851
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.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
User avatar
Kwai chang caine
Addict
Addict
Posts: 4968
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
User avatar
JHPJHP
Addict
Addict
Posts: 1851
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

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
Post Reply