Star Fighter Max - full BMax code and media

BlitzMax Forums/BlitzMax Beginners Area/Star Fighter Max - full BMax code and media

Neuro(Posted 2005) [#1]
Not sure if this is a good place to post this, but if anyone is interested in making a shootem-up game in BlitzMax, heres the full source code and media to download (2.41 mb) : http://www.blitzbasic.com/Community/posts.php?topic=52907

Source code contains tons of comments in which I wrote to help ensure I sorta understand what the hell I was doing....hope its a of a little help to someone...
BTW, it was successfully tested to also compile on the Mac version of Bmax, but havent tested on a Linux system yet.


deps(Posted 2005) [#2]
Looks nice, except that the stars should move behind the earth, imo. :)

Also, the game crashed when I died:
Runtime Error: Attempt to access field or method of Null object
DrawImage [$BMXPATH/mod/brl.mod/max2d.mod/max2d.bmx;519;2]
Draw [/Users/peter/Desktop/StarFighterMax/StarFighterMax.bmx;73;7]
HandleBullets [/Users/peter/Desktop/StarFighterMax/StarFighterMax.bmx;818;3]
RunGame [/Users/peter/Desktop/StarFighterMax/StarFighterMax.bmx;505;2]
Transition [/Users/peter/Desktop/StarFighterMax/StarFighterMax.bmx;618;6]
doTitle [/Users/peter/Desktop/StarFighterMax/handle_menu.bmx;329;20]
StarFighterMax [/Users/peter/Desktop/StarFighterMax/StarFighterMax.bmx;407;4]


I really liked the explosion sound when enemies was destroyed.


ImaginaryHuman(Posted 2005) [#3]
This is a pretty good game, thanks for sharing it! Nice to see it run perfectly smooth on my computer. (iMac 1GHz G4 with NVidea GeForce4MX)


NoBoDo(Posted 2005) [#4]
Thank you very much! Source code to pore over is always appreciated.


ImaginaryHuman(Posted 2005) [#5]
I'm still playing this thing. ;-)

Just a bit too much fast movement going on at once but it's still lots of fun!


Robert(Posted 2005) [#6]
Works on Linux if I comment out the following line in the LoadSettings() function in StarFighterMax.bmx:

(Line 476) : Graphics ScreenWidth, ScreenHeight, GraphicDepth

I think this is a BlitzMAX/Linux issue - we'll see if it is fixed in 1.12.

Still, this does speak quite well for cross-platform compatibility in Max.


Réno(Posted 2005) [#7]
Nice ! Can you add joypad support ?


Neuro(Posted 2005) [#8]
Thanks for the replies folks!
Also, the game crashed when I died:


I'm lookin into it right...not sure why that happened....did this happened all the time?

Works on Linux if I comment out the following line in the LoadSettings() function in StarFighterMax.bmx:

(Line 476) : Graphics ScreenWidth, ScreenHeight, GraphicDepth


Woah...thanks for the info...!

Nice ! Can you add joypad support ?


I thought about it but got lazy at the end....but the source code is there....so any can actually it if they want.


BlitzSupport(Posted 2005) [#9]
Haven't tried this yet. Are you checking for available graphics modes, Neuro, or just setting a specific depth?


Neuro(Posted 2005) [#10]
I just defaulted to 640x480 using OGL...didnt do any checking assuming that most folks would have that mode and opengl running.


xlsior(Posted 2005) [#11]
I just defaulted to 640x480 using OGL...didnt do any checking assuming that most folks would have that mode and opengl running.


Most, but not all -- quite a few of the newer 'widescreen' laptops don't support 640x480 anymore.


Neuro(Posted 2005) [#12]
Ok...that I should of known but never occured to me. Whats the usual lowest specs for the newer wide screen laptops, btw?


Matt McFarland(Posted 2005) [#13]
Hey.. I played the game and it was enjoyable. The old-skool graphics are attractive in a nostalgic way :)

The problem I had is the sound and music together causes immense crackling and sound lagging.. It sounds horrible. However, I put the blame on BRL because I've been having BlitzMax sound issues from the git-go. Perhaps I should update my sound driver. Just using an nVidia onboard sound chip... Also, I dont have sound problems with any other programs (just blitzmax, anyone else having this problem?)

The enemy movement patterns are very simple, I can tell without looking at code you're using if X = then reverse. Of course this is just from level 1 and some of 2. I think I saw more advanced movement paths (but still if X and if Y based, and maybe timer based with X and Y velocity changes. This is without me looking at the source code so I may be wrong!) in level 2. The movement paths could be a ton better though, especially if you used my path maker ;) (shameless plug!)

I do think you did a terrific job considering its your first game. I give it a 5 / 10 . Keep up the great work, and congradulations on finishing your first game! There's plenty of people who never finsh one game ;) Kudos 4 U :)

All the best,
Matthew McFarland
----------------------


Neuro(Posted 2005) [#14]
Hey Matt, thanks for the critique! You're right about the move pattens. Yah the movement paths are very simple....i originally was just gonna make it a left - to - right type thingy like those Space Invaders clones.....but wanted something a little different but nothing too special. The ships do move a little different on later levels, but, as usual nothing spectacular.

The movement paths could be a ton better though, especially if you used my path maker ;) (shameless plug!)


Thanks pluging it! I'm definately gonna check it out. I'm looking at it now and I can see that it can do 2D patterns...but can it also do 3D movement patterns? (considering my next project is gonna be a more complete version of my Space Harrier demo...(if they ever release the 3D module)...)

I do think you did a terrific job considering its your first game. I give it a 5 / 10 .

Thanks....I actually got a ton of game *demos* that I never really finished. This one was my actual first one thats sorta....complete.


Matt McFarland(Posted 2005) [#15]
Neuro: I do think you can use this for 3D, as you can use it to update the X and Y and you can update your Z manually. You could have the Z constantly moving towards the camera while the X and Y do the spline.

If you draw the spline thinking the top is far away and the bottom is close, you can replace Y with Z respectivly.

Anything is possible!

Best Wishes, (I loooved Space Harrier)

Matt McFarland

PS: Because I'm just as interested in 3D Splining as you are, if you want to email me if you need help using my spline maker for your programs I will be glad to provide assistance. If there's one thing I know, I know how to use it in a game.


Neuro(Posted 2005) [#16]
Neuro: I do think you can use this for 3D, as you can use it to update the X and Y and you can update your Z manually. You could have the Z constantly moving towards the camera while the X and Y do the spline.


That make sense.....I can definately do something with that.......but since you mentioned it...expect to hear from me soon! :-)