Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Showcase / tFlight - 3d space combat

Author
Message
Globbits
9
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 2nd May 2018 16:46 Edited at: 24th Sep 2018 09:11
Hi all,

This is a demo version of tFlight, or "test" flight (only a working title).

It's a single player, mission based 3d space combat game. If you're as old as me then you'll remember the excellent X-Wing series from the 90's. It's similar to that, but with updated controls (i.e. vertical and lateral thrusters, with assist on/off modes) a bit like Elite Dangerous.

Latest version:
https://www.youtube.com/watch?v=RlouDQrkIIY

Updated version:
https://www.youtube.com/watch?v=TZHFl5Mgtyk

Original version:
https://www.youtube.com/watch?v=yWuXLcsizK0

The controls are configurable, the default setup being for the xbox controller. I would appreciate feedback from any hotas users as to whether they can get it work with this game (I don't own one myself). There's also the ability to use head tracking which I've tested on both the EDTracker and Tobii Eye Tracker, but would appreciate feedback from people with other head tracking solutions.

The game currently has 4 missions to try.

Enjoy!

Globbits


[Update]
Added extra options into the display menu for sync rate and vsync.

Attachments

Login to view attachments
Captain Ouais
14
Years of Service
User Offline
Joined: 12th Dec 2003
Location: France
Posted: 2nd May 2018 17:46
Wouaaa !!

The effect of depth and inertia are impressive ....

I do what i do !!!
Globbits
9
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 2nd May 2018 21:42
Quote: "
The effect of depth and inertia are impressive ...."

Thanks. I had to limit the inertial (flight assist off) mode to the ships maximum speed, otherwise it was too easy to reach "ludicrous speed" to quote from Spaceballs!
Globbits
9
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 3rd May 2018 12:21
Richard_6
1
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 3rd May 2018 14:03
Well done, Globbits. Did you use shaders with particles for the explosion?
Globbits
9
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 3rd May 2018 14:42
Thanks. I just used the regular 3D particle commands, no shaders.
PSY
Valued Member
2
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 5th May 2018 22:03
Hey,

the demo is unplayable for me.
It stutters badly all the time. FPS jump from 30ish to 90ish and back constantly.
Same issue in the menu.

Can't be my hardware, though. I'm able to play Rust and PuBG on 1440p w/o problems...



PSY LABS Games
Coders don't die, they just gosub without return
JLMoondog
Moderator
9
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 5th May 2018 23:26
It's looking good so far! I'm working on a similar project and I'm curious how you're tackling the AI? Any tips or tricks for writing AI for flight based NPC's, or a starting point to work from?
Globbits
9
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 6th May 2018 09:52 Edited at: 8th May 2018 14:31
Quote: "It stutters badly all the time. FPS jump from 30ish to 90ish and back constantly. "


The game is using vsync, and it tries to work out how many game loops to run per sync. E.g. If the system has a high rate of sync, e.g. > 90 then the game will sync every game loop cycle. For slower refresh rates (e.g. 60), the game runs through two cycles per sync. I'm guessing that your monitor has a high refresh rate? If so, then I think I need to alter the threshold a bit as it seems to be getting confused as to which route to take.

[Update]
Removed the automatic calculation for game loop and instead added sync rate and vsync options to the display menu.
Globbits
9
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 6th May 2018 10:25
Quote: "It's looking good so far! I'm working on a similar project and I'm curious how you're tackling the AI? Any tips or tricks for writing AI for flight based NPC's, or a starting point to work from?"


Thanks. Writing the AI is always challenging! This is the approach that I took:

1. The first thing to do is to get the enemy ships to be able to yaw, pitch in their target's direction. Position a dummy object at the AI ship's position and angle. Use the SetObjectLookAt command to look at the target. Work out the difference in angles between the AI ship and the dummy object. Use that information to rotate the AI ship. Once you've got this to work well move onto the next step:

2. Avoiding other objects. The AI are sending out a collision test ahead of them by enough distance to be able to react to it. If there is no collision, the AI simply continue with the logic in step 1 trying to point directly at their target. If there is a collision detected the AI send out a second collision test that is not directly ahead, but at an angle obtainable by the ships pitch and yaw limits. If another collision is detected, the angle is changed and the test will be tried again during the next game loop. Once no collision has been detected, the AI will set this position as a waypoint. The AI ship will then go back to the logic in step 1, but for lining up the waypoint rather than its actual target. Once the AI ship has reached the waypoint, the target is reset to it's original target and the whole cycle begins again.

3. Preset manoeuvres. Once the AI can avoid and react to other objects in the game world you can start to add a bit of character to their flying by using some preset manoeuvre patterns. E.g. Clockwise roll and full pitch for 100 game loop cycles. All the time the AI ship is doing the manoeuvre it is not doing step 1, but only step 2. If a collision is detected the manoeuvre is cancelled and the ship returns to the regular step 1 and 2 cycle.

I hope this helps.
PSY
Valued Member
2
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 10th May 2018 04:23
Quote: "The game is using vsync, and it tries to work out how many game loops to run per sync. E.g. If the system has a high rate of sync, e.g. > 90 then the game will sync every game loop cycle. For slower refresh rates (e.g. 60), the game runs through two cycles per sync. I'm guessing that your monitor has a high refresh rate? If so, then I think I need to alter the threshold a bit as it seems to be getting confused as to which route to take."


Indeed, it's a GSync monitor. It's set to 144Hz. VSync is turned off globally.

I tried the updated version. Runs totally smooth.
Keep up the good work dude. Very promising project


PSY LABS Games
Coders don't die, they just gosub without return
Globbits
9
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 10th May 2018 09:12
Thanks PSY, I'm glad that sorted it. Sounds like an awesome monitor you have there.
PSY
Valued Member
2
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 11th May 2018 01:31
It's a gamer monitor

G-Sync eliminates screen tearing by forcing the monitor to adapt to the framerate of the gfx card all the time.
Makes everything pretty smooth, especially when the fps drop below 60


PSY LABS Games
Coders don't die, they just gosub without return
Globbits
9
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 11th May 2018 10:04
Now I want one!
PSY
Valued Member
2
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 14th May 2018 12:49
You won't regret the investment


PSY LABS Games
Coders don't die, they just gosub without return
Rick Nasher
1
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 20th May 2018 09:39
Looking awesome dude. Depth effect is magnificent, especially with the writing in the HUD and looking round in cockpit

One thing I find bit hard though, is that there's no way to tell if an asteroid is dangerously near or just very large and far away still.
To improve this you could do an overlay cross displaying width and height measured "by the onboard computer" or a laser ray originating from your ship that displays the distance(or both) and perhaps ring an alarm/red light/outline or circle round the object if one is coming too close to the ship. Perhaps the latter would make things too easy on the player, but would also allow him to pay more attention to chasing the enemy.

Imho that would greatly help manouvering by knowing how far an object is away from your ship.

Anyways keep up the good work.
Globbits
9
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 23rd May 2018 17:36
Thanks very much.

I'm planning on improving the scanner which will help with this. I'm also thinking about a collision warning alert similar to the one in Elite Dangerous.

fubarpk
AGK Developer
Gold Codemaster
13
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 27th Jun 2018 07:02
I Like
Great work
fubar
Globbits
9
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 16th Aug 2018 11:52
Finally released an update to this. It's taken a while as I've converted the project to tier 2 as it was becoming too complex to manage in tier 1.

The game now has 4 missions (the first being a training mission) and 3 difficulty levels to try.

The latest download and youtube video are on the first post in this thread.
george++
11
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 10th Sep 2018 21:44 Edited at: 10th Sep 2018 21:44
I missed your project. Well done!
Yes, I am old as you (I was playing the X series when I was student) and I always wanted to create a project similar to the Starglider with AGK. I don't have the time so far...
I wish you good luck with this
Globbits
9
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 12th Sep 2018 09:33
Thanks George. I guess there are a few of us oldies around here then

I remember Starglider very well. I remember having Starglider 1 and 2 on the Atari ST. Both were great games.
Globbits
9
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 22nd Sep 2018 20:00 Edited at: 22nd Sep 2018 20:02
Latest version with improved graphics and several fixes:

https://www.youtube.com/watch?v=RlouDQrkIIY&feature=youtu.be
fubarpk
AGK Developer
Gold Codemaster
13
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 7th Oct 2018 01:23
Great Stuff
fubar

Login to post a reply

Server time is: 2018-10-17 02:26:38
Your offset time is: 2018-10-17 02:26:38