Pure BASIC Game

Advanced game related topics
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Pure BASIC Game

Post by Steve Elliott2 »

Well I haven't used Pure BASIC in a while, but took a look once again and decided to write a game using it.

Here's a screen shot, early days but I have a sprite moving about smoothly and the graphics are complete and ready to be added to the game. Zoom to 100% to get a better perspective. It's running at 1920 x 1080 @ 2850 FPS.

https://www.dropbox.com/s/jz7kv37q93dai ... s.png?dl=0
Last edited by Steve Elliott2 on Tue Jun 23, 2015 6:38 pm, edited 2 times in total.
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: Pure BASIC Game

Post by Steve Elliott2 »

Sorry guys. So many views, but I've just started coding the game.
User avatar
Bananenfreak
Enthusiast
Enthusiast
Posts: 519
Joined: Mon Apr 15, 2013 12:22 pm

Re: Pure BASIC Game

Post by Bananenfreak »

Graphics look nice. What will it be?
Image
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: Pure BASIC Game

Post by Steve Elliott2 »

Thanks. It'll be a Crossfire meets Bomberman type of game.
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: Pure BASIC Game

Post by Steve Elliott2 »

Added sound and music...

No support for ogg guys?
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: Pure BASIC Game

Post by Samuel »

Are you using Purebasic's LoadSound() because it should support OGG files.
If you are just don't forget to use UseOGGSoundDecoder() sometime before you load any OGG files.
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: Pure BASIC Game

Post by Steve Elliott2 »

Ah, ok - thanks...But UseOGGSoundDecoder() and LoadMusic() results in just a noise...Anybody got some code to load ogg files that works? Or perhaps Audacity is not converting WAV to OGG correctly.
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: Pure BASIC Game

Post by Samuel »

I'm not really familiar with the OGG format so someone else might more of a help.

Can you play the OGG file in a media player of some sort excluding Audacity and Purebasic.
If you can then I'd say Purebasic is the problem if not then maybe it's Audacity messing something up.

Also are there any options when creating one? Maybe only certain types of OGG files (like older/different formats) will run with Purebasic.

That's about all I can think of.
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: Pure BASIC Game

Post by Steve Elliott2 »

No probs...Well it's a massive compression file size over WAV, so it's important.

Yes, only Pure BASIC won't play the file correctly.
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: Pure BASIC Game

Post by heartbone »

Steve Elliott2 wrote:It'll be a Crossfire meets Bomberman type of game.
Excellent. I enjoyed Crossfire on the 8-bit Atari.
Steve Elliott2 wrote:Ah, ok - thanks...But UseOGGSoundDecoder() and LoadMusic() results in just a noise...Anybody got some code to load ogg files that works? Or perhaps Audacity is not converting WAV to OGG correctly.
It's just that you'll need to use the Sound and not Music commands to play the Ogg Vorbis files.
Keep it BASIC.
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: Pure BASIC Game

Post by Steve Elliott2 »

It'll be a Crossfire meets Bomberman type of game.

Excellent. I enjoyed Crossfire on the 8-bit Atari.
Thanks, it is a fun little game. Although I never played the original (I know somebody who also made a remake).
It's just that you'll need to use the Sound and not Music commands to play the Ogg Vorbis files.
Great stuff! Works perfectly now.
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: Pure BASIC Game

Post by Steve Elliott2 »

Putting my routines into a Framework, to make producing games quicker and easier for pb users...
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: Pure BASIC Game

Post by Steve Elliott2 »

And hopefully new pb users!

pb clearly has hidden depths - keep at it Fred and co! :)
Grunz
User
User
Posts: 59
Joined: Sat Nov 12, 2011 7:21 pm

Re: Pure BASIC Game

Post by Grunz »

You might be trying to play ogg music with PlayMusic()... this will only play mod files.
You need to use LoadSound() and PlaySound() for ogg files.
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: Pure BASIC Game

Post by Steve Elliott2 »

Yes, thanks Grunz. I've already realised that now.
Post Reply