Death Star vs Asteroids

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
flaith
Enthusiast
Enthusiast
Posts: 704
Joined: Mon Apr 25, 2005 9:28 pm
Location: $300:20 58 FC 60 - Rennes
Contact:

Re: Death Star Vs Asteroids

Post by flaith »

@JHPJHP
Thanks for sharing, really fun/hard enough game :)
“Fear is a reaction. Courage is a decision.” - WC
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Death Star Vs Asteroids

Post by JHPJHP »

Hi flaith,

Thank you for your post.

Setting a difficulty-balance for each level was one of the more time consuming aspects to creating the game, especially with such a basic concept; same with Invading Space Aliens.

NB*: A couple hours after your post, I squashed a couple more bugs.
Last edited by JHPJHP on Sun Mar 20, 2022 6:12 am, edited 1 time in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Death Star Vs Asteroids

Post by JHPJHP »

Update rolled back.
Last edited by JHPJHP on Sat Oct 28, 2017 5:19 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,

This latest version does not work on my Mac.
It opens with a black screen and promptly crashes.
This is probably for the reasons mentioned by Kukulkan in the post below:


http://www.purebasic.fr/english/viewtop ... 14#p514014
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 about the error in OSX.

I knew not to use a Window/Gadget in a thread, but thought that OpenWindowedScreen may have been an exception. It seemed to work fine in Windows; probably just a fluke.

I believe I have rolled everything back, but I am still unsure about OSX. When I try to run the example, I get an error at OpenWindowedScreen with InitEngine3D. If I remove InitEngine3D the example works fine, but I lose the introduction.

If you get a chance, please let me know your results from OSX using the current version. Thank you.

NB*: Invading Space Aliens has also been rolled back.
Last edited by JHPJHP on Sun Mar 20, 2022 6:12 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,
This version opens on page which is frozen.
Sometimes displaying: Game Over or Paused or page just showing stars background.
Sound track is running.
Pressing Return key has no effect.
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,

Can you please try the following...
- fails for me in OSX: https://www.purebasic.com/documentation ... ecube.html
- PureBasic 5.61 (x64) :: macOS Sierra version 10.12.6

Fails for me in OSX:
- OpenWindowedScreen: [ERROR] Program aborted. (by external library)

Code: Select all

If OpenWindow(0, 0, 0, 800, 600, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  InitEngine3D() : InitSprite()

  If OpenWindowedScreen(WindowID(0), 0, 0, 800, 600)
    
  EndIf
EndIf
Works in OSX (removed InitEngine3D):

Code: Select all

If OpenWindow(0, 0, 0, 800, 600, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  InitSprite()

  If OpenWindowedScreen(WindowID(0), 0, 0, 800, 600)
    
  EndIf
EndIf
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,
My Mac system: wrote: Model Name: MacBook Pro
Model Identifier: MacBookPro12,1
Processor Name: Intel Core i7
System Version: OS X 10.10.5 (14F2511)
Kernel Version: Darwin 14.5.0

PureBasic 5.61 x64
JHPJHP wrote: Can you please try the following...
- fails for me in OSX: https://www.purebasic.com/documentation ... ecube.html
- PureBasic 5.61 (x64) :: macOS Sierra version 10.12.6
This works on my system and is no different to that on Windows 10 x64

I also ran the two code snippets; both gave the same results:
Flash of screen opening and closing - no errors.
Last edited by davido on Sat Oct 28, 2017 7:35 pm, edited 1 time in total.
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 again for testing the provided code.

I tried uninstalling PureBasic and XCode, then reinstalling both, but I could not get 3D to work in OSX.

Because I am unable to test the Introduction code, I disabled it for the OSX platform.

NB*: The game was updated and should run fine now, but it was a little annoying having to disable the scrolling Star Wars effect for OSX.
Last edited by JHPJHP on Sat Jan 06, 2018 7:02 pm, edited 2 times in total.
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: Death Star Vs Asteroids

Post by walbus »

Code fails on my machine - OS 10.12
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Death Star Vs Asteroids

Post by JHPJHP »

Hi walbus,

Thank you for posting your findings.

I found another area of code that needed disabling in OSX, but it would not have effected game play, only causing an error when exiting the application.

I hope that this fixes the problem.
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: Death Star Vs Asteroids

Post by walbus »

Yep, many things are strange
A test on 10.13 after upgrading OS fails also
But, i like your Old School Games...
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,
I downloaded the Zip before you replied to walbus.
When I got round to testing it on my Mac, it worked ok. I did notice that it did not exit cleanly.
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 guys,

Thank you both for your responses.

Without a working OSX platform, I am just spinning my wheels; I am moving onto the next thing.

Cheers!
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,
A wise move.
Thank you, very much for producing two great games. :D
DE AA EB
Locked