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/AppGameKit Studio Showcase / tFlight - 3d space combat

Author
Message
Globbits
10
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 2nd May 2018 16:46 Edited at: 23rd Jan 2020 13:38
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.

September 2018 version:


Updated version:


Original version:


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
16
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
10
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
10
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 3rd May 2018 12:21
Richard_6
2
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
10
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
3
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
11
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
10
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
10
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
3
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
10
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
3
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
10
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 11th May 2018 10:04
Now I want one!
PSY
Valued Member
3
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
2
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
10
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
Moderator
15
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 27th Jun 2018 07:02
I Like
Great work
fubar
Globbits
10
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++
12
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
10
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
10
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
Moderator
15
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 7th Oct 2018 01:23
Great Stuff
fubar
SpecTre
Developer
16
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 25th Oct 2018 16:30
@Globbits

missed this and only just come across this project. Although I haven't played the game yet, this is very impressive and the latest video footage you have provided looks very polished.
Great work.

Cliff Mellangard 3DEGS
Developer
13
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 25th Oct 2018 23:28
Looks very nice …..
and only paste this bold parts of the Youtube link in to the forums brackets for Youtube...
https://www.youtube.com/watch?v=RlouDQrkIIY

GarBenjamin
AGK Developer
3
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Globbits
10
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 26th Oct 2018 12:12
Thank you all for your kind and supportive comments above (and thanks Cliff for the youtube video tip!).

Development has slowed to almost zero this month, but I'm hoping to get stuck in again ASAP.
Cliff Mellangard 3DEGS
Developer
13
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 26th Oct 2018 12:55
Ortu
DBPro Master
12
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 28th Oct 2018 23:33
Controls / motion looks really well done, nice work
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Phodis
4
Years of Service
User Offline
Joined: 3rd Oct 2015
Location:
Posted: 30th Oct 2018 21:40
This is FANTASTIC!!... Wow!. I hope one day I can program something like this.
Well done sir.
Globbits
10
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 10th Jan 2020 21:03
After over a years break, I'm finally getting back into this project. The first item I've been working on is improvements to the AI; mainly streamlining the code and getting rid of any bottlenecks. I've managed to get up to 70 AI ships running at a consistent 60 FPS on my old Core i3 with an Nvidia 7 series video card. (This is in tier 1. It would probably run several times more in tier 2). There's still plenty of work to do, but I feel I'm making better progress now.

AI test video:


vennis73
3
Years of Service
User Offline
Joined: 12th Sep 2016
Location:
Posted: 11th Jan 2020 09:01 Edited at: 11th Jan 2020 09:01
Very impressive. You plan on big battles in the game or is this a stress-test?

I can imagine if you plan for even more detailed textures or a second planet or sun (just thinking out loud) it might require more resources. I haven't done 3d myself so i have no idea on the possible impact things will have.
But since you can run 60 AI ships smooth there seems to be a lot of 'space' to expand on all surfaces. This must give a good feeling to see that stretch possible.

I'll be looking forward to updates on your project.
Globbits
10
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 11th Jan 2020 12:18
Thanks very much. Yes, big battles certainly seem possible now. With the old AI code the maximum amount of ships I could get was about 10 in the tier 1 version before the FPS started dipping too much.

I don't think extra planets (and suns) and better textures would be too much of an issue as they would mainly impact the GPU (as far as I'm aware). I'll give it a go and see what happens.
blink0k
AGK Developer
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 11th Jan 2020 22:21
Very nice! Can i ask how you did that glow at the back of the ships?
Globbits
10
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 12th Jan 2020 20:55
It's just 3d particles. The particles life is really short: 0.2s. It starts with a yellow colour key frame at 0.0s, then changes to red colour key frame at 0.1s
george++
12
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 15th Jan 2020 07:41
Very nice project here, Globbits
I downloaded and I'll test it as soon as possible.
Globbits
10
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 15th Jan 2020 17:24
Thanks George.

That demo version is quite old now (September 2018), so I'll try to get a more up-to-date version with the new AI in ASAP.
smerf
14
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 16th Jan 2020 01:05
very nice globbits i really like the follow cam.

Globbits
10
Years of Service
User Offline
Joined: 30th Jan 2009
Location: Cambridge
Posted: 23rd Jan 2020 13:37
Thanks.

Still testing the new AI. Latest video shows a 50 ship battle (everyone for themselves / general mayhem - no sides!).

This test is still using tier 1 and I'm pleased with the results so far.

Login to post a reply

Server time is: 2020-01-28 10:44:55
Your offset time is: 2020-01-28 10:44:55