• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

3d space shooter

I started working on this a few days ago, with help from a buddy.

So far, I've got a 3d earth with atmosphere, a 3d starfield (you will recognize the constellations in the video) and galaxy, and a radar (middle is what's in front of you, edge is what's behind you). There's also some helpful HUD elements. There's an element that shows your velocity vector relative to your target. There's an element that computes how far ahead you should aim. The target location indicator also points in the direction of your target in case it is not within the view.

some of the gfycat videos posted in this thread (oldest to newest):
https://gfycat.com/FaithfulSecondaryBoaconstrictor
https://gfycat.com/EvilUntidyBlobfish
https://gfycat.com/FamiliarTepidAmericanwarmblood
https://gfycat.com/RadiantHugeAnglerfish

current demo (see spoiler for details ):
Note: only tested on windows 7 so far.
https://www.dropbox.com/s/2g21w4sww841ofz/3d_space_shooter.exe?dl=0
Controls...

pitch & yaw... mouse axes.
roll... X & C
thrust forward... W
thrust backward... S
thrust left... A
thrust right... D
thrust up... E
thrust down... Q
fire guns... left mouse button
fire missiles... middle mouse button
toggle guns / cannon... mouse wheel or shift
select nearest enemy attacking you... R
select nearest enemy... T
select enemy nearest crosshairs... F
look around... hold alt
zoom view... hold right mouse button
space... switch camera mode

Hints...

Aim by moving red crosshair over purple crosshair.

Avoid thrusting in a straight line for any length of time, because it makes it easier for the ai to hit you. Thrust back and forth or up and down.

Presently selected target is highlighted with red box. If not within view, a red arrow will point in the direction of the target.

green dotted-circle shows target's velocity vector relative to you. To match speeds with target, point your ship (approximately) at the green circle and thrust in that direction. Green arrow points to this vector when it is not within view. The orange circle points in the opossite direction of the green circle. If you were to point your nose at the orange circle, then to match speeds with the target, you would thrust backward.

By the way, rear engine is more powerful than others, so if you need to accelerate in a hurry, point nose in direction you need to accelerate, and press forward thrust.

Easier to shoot enemies if you approximately match speed with them.

Bullets do more damage the faster they are going relative to what they hit.

Best way to dodge missiles is to thrust in a vector 90 degrees from where the missile is coming.

Missiles aimed at you will have flashing box around them, if not in view, then flashing arrow will point toward them.

Missiles are more likely to hit if target is at medium range (1000-4000), and has little sideways motion relative to you. Also helps if target is moving away from you.

To avoid being ganged up on, avoid entering regions where there are lots of red ships and no friendlies around.
 
Last edited:
S

ScrabbitRabbit

Guest
Looking really cool, can't wait 'til we can try it out :)
 
Started working on missiles today. Had a heck of a time texturing the model because of some math epsilon problem i guess. And finally after a few hours of messing around, have decent guidance logic in place. I guess it's a kind of proportional navigation method... but maybe crudely put together. Although, maybe not so crudely put together, since the missiles do appear super accurate. Maybe too accurate, might need to tone them down a bit. won't be able to tell until i practice dodging them a bit.

https://gfycat.com/secondblushingcattle

Some of the particle effects for the missiles are looking pretty good

https://gfycat.com/FaithfulSecondaryBoaconstrictor
 
Last edited:
P

Pisces

Guest
This is pretty amazing. I've been looking all over the net on how to get the camera to go over the Zto limits. I've been looking into matrix views and that's where I'm at. Nice job. Good to see GM heading towards 3D
 
P

Pisces

Guest
Hi... what do you mean "camera to go over the Zto limits"?
In an fps, the camera may only look up 90 degrees and down 90 degrees. This also is a limitation on the camera in GM as well since I cant do loops or rolls 360 degrees fully.
 
Oh ok, you meant the up vector I think. You need to calculate a new up vector... good idea to make it perpendicular to both the look and right vectors. Meaning if you know the look vector (direction camera is pointing), and can figure what the right vector is, then the up vector is look cross right.
 
M

MetaSpace

Guest
This reminds me of the original X-Wing and Tie fighter, very cool. Are you using GMS or GMS2 for this project?
 
First major test with multiple AI fighters.

https://gfycat.com/SoreDefensiveDrafthorse

I was expecting some stuttering with so many ai on my 10 year old ocmputer, no optimizations made yet, and fraps recording at the same time. But no, it ran smoothly.

One thing I do need to do is make the fighters more visible from a long distance.

The last major thing I'm going to do before posting a demo is get some sound in. No sound at the moment.
 
I

icuurd12b42

Guest
I applaud your decision to use the original wing commander radar hud system
 
I can't remember exactly how the wing commander radar worked... and if I recall x-wing/tie-fighter had two radars, one for front, and one for back. It does kind of look strange the way blips move around on the radar as you turn, but it does show everything, 360 degrees around you.
 
I

icuurd12b42

Guest
upload_2017-8-18_13-42-50.png

The main thing I think they did well are to spacial - ize the dots a little more. if the dot way right in the middle of the LEFT quadrant you would turn your head left and you would see the ship on your side
 
My radar is set up exactly the same way as far as I can tell... with 90 degrees from front located at the line between B and C

upload_2017-8-18_11-47-13.png

The only thing is, that with equal distance from center given to all regions, it makes things appear to warp strangely as the ship turns. Perhaps I should give more distance from center to the front arc, and then less progressively until the edge.

EDIT: actually no. I just tried that and it looks even odder. I'm trying to remember whether the wing commander radar scopes showed true 360 degrees, or if stuff that was behind you just stuck to the edges of the scope.
 

Attachments

I

icuurd12b42

Guest
They had a larger front region on the radar inner circle, tied to a smaller visible region in world space... tied to the camera view angle I guess, making things in front of you less cramped on the radar... Basically if you saw it on the radar inner circle you would usually see it on the screen, or close to seeing it. Also the segments on the radar were very distinctive making quadrant separation at a glance or with the corner of your eyes very easy.

I do believe they clamped the rear, the outer edge, pushing back this fluidic action you see in yours to the outer edge, it's less pretty but less distracting and more accurate in a sense.

also the dot sizes were granular I think they actually only had 2 sizes, but you could go with 3, for far, mid range and very close. Again not so pretty but much easier to discriminate.

Long story short, I could actually fight blind using only instruments. making my brother dizzy and confused as to how I could manage.
 
Well, I was going to add sound before I posted a demo, but I'm running out of time, and wont be able to work on this very much over the next couple weeks. So what the hell, I'll just post what I've got so far. In the demo, the scenario is just a basic team deathmatch. You are on the blue team, and red ships are enemies. I haven't got different models for the ships yet, so enemies are guys that are shooting red lasers, and have a red halo around them from a distance.

Controls are currently hard-coded, so if you don't have a middle mouse button or a mouse wheel, sorry!

Let me know if you get any crashes or if things look like they aren't drawn correctly (or at all) on your computer.

If you press escape there is a slider which adjusts mouse sensitivity, in case you find the default settings leave you unable to aim at anything easily.

for windows (only tested on windows 7 so far):

https://www.dropbox.com/s/2g21w4sww841ofz/3d_space_shooter.exe?dl=0

Controls...

pitch & yaw... mouse axes.
roll... X & C
thrust forward... W
thrust backward... S
thrust left... A
thrust right... D
thrust up... E
thrust down... Q
fire guns... left mouse button
fire missiles... middle mouse button
toggle guns / cannon... mouse wheel or shift
select nearest enemy attacking you... R
select nearest enemy... T
select enemy nearest crosshairs... F
look around... hold alt
zoom view... hold right mouse button
space... switch camera mode

Hints...

Aim by moving red crosshair over purple crosshair.

Avoid thrusting in a straight line for any length of time, because it makes it easier for the ai to hit you. Thrust back and forth or up and down.

Presently selected target is highlighted with red box. If not within view, a red arrow will point in the direction of the target.

green dotted-circle shows target's velocity vector relative to you. To match speeds with target, point your ship (approximately) at the green circle and thrust in that direction. Green arrow points to this vector when it is not within view. The orange circle points in the opossite direction of the green circle. If you were to point your nose at the orange circle, then to match speeds with the target, you would thrust backward.

By the way, rear engine is more powerful than others, so if you need to accelerate in a hurry, point nose in direction you need to accelerate, and press forward thrust.

Easier to shoot enemies if you approximately match speed with them.

Bullets do more damage the faster they are going relative to what they hit.

Best way to dodge missiles is to thrust in a vector 90 degrees from where the missile is coming.

Missiles aimed at you will have flashing box around them, if not in view, then flashing arrow will point toward them.

Missiles are more likely to hit if target is at medium range (1000-4000), and has little sideways motion relative to you. Also helps if target is moving away from you.

To avoid being ganged up on, avoid entering regions where there are lots of red ships and no friendlies around.
 
Last edited:
Improved the missile guidance by such a huge degree, that I had to reduce the missile's agility and range by a lot in order to make them even a little dodgable. Downside is I might need to add further options for evading missiles, upside is they are more reliable when you shoot them, and they move along a more visually interesting flight path.

https://gfycat.com/RadiantHugeAnglerfish
 
Last edited:

hamdrax24

Member
This game is pretty amazing. I really like the bloom effect on the bullets and explosion.

Missiles are pretty overkill though.
 
gosh, I've been lazy lately. Main problem is I don't want to learn model making software! The few models I do make, I design in notepad, lol! Seems easier then trying to learn blender. Actually, yeah, I do wish I had someone to work with. Working alone is a drag and also bad for your health. At least I've learned a few things in the time since I've been putting off working on this.
 
M

Misty

Guest
Game wont run, due to shaders. However I have several other computers to try it on, will try tommorow.

And this is why I don't use shaders.
 
just be aware, that this isn't so much of a game at this stage, as a little bit of an effects demonstration that lets you shoot colored bullets at some other guys for a few minutes until a missile kills you.

There are so many things that would be impossible or incredibly slow without shaders. If shaders wont compile on your computer you need.. ah, I forget... some directx runtime thing.
 
Last edited:

hamdrax24

Member
Game wont run, due to shaders. However I have several other computers to try it on, will try tommorow.

And this is why I don't use shaders.
That's funny, this works on my Intel GMA 3600. What graphics card do you have?
 
Last edited:
Top