Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: FLIGHT  (Read 4038 times)

0 Members and 1 Guest are viewing this topic.

Evan Bowman

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
FLIGHT
« on: February 06, 2017, 09:40:37 pm »
About a week ago I started a project that uses SFML, it's in its early stages but it going to involve flying planes.

I'm using SFML window, audio, network, and also the graphics module for text rendering. Most of the visuals are OpenGL. The terrain is procedurally generated with ridged fractal noise.

Video:


Code:
https://github.com/evanbowman/planes

Evan Bowman

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: FLIGHT
« Reply #1 on: February 07, 2017, 08:29:44 pm »
Infinite terrain:


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 9041
    • View Profile
    • development blog
    • Email
FLIGHT
« Reply #2 on: February 07, 2017, 09:21:20 pm »
This looks quite neat! :)

What will be the general goal of the game?
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

Evan Bowman

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: FLIGHT
« Reply #3 on: February 08, 2017, 02:02:08 am »
This looks quite neat! :)

Thanks!

What will be the general goal of the game?

I'm not completely sure yet, but I think maybe an action game where where swarms of enemies appear and you survive as long as you can. One thing that I am sure of is that I want it to have a multiplayer mode. It's all very conceptual right now :)


CleverBoy

  • Newbie
  • *
  • Posts: 24
  • Game on!!
    • View Profile
    • Email
FLIGHT
« Reply #4 on: February 08, 2017, 04:32:27 am »
This looks quite neat! :)

Thanks!

What will be the general goal of the game?

I'm not completely sure yet, but I think maybe an action game where where swarms of enemies appear and you survive as long as you can. One thing that I am sure of is that I want it to have a multiplayer mode. It's all very conceptual right now :)

It's nice. I like the shadows that get generated.. 👍



Sent from my iPhone using Tapatalk

CleverBoy

  • Newbie
  • *
  • Posts: 24
  • Game on!!
    • View Profile
    • Email
Re: FLIGHT
« Reply #5 on: February 08, 2017, 01:22:46 pm »
I was going through the code and found that the eye vector is 3X3.. but getting a vec4. It errors during compiling. I changed to Vec 4 but then it errors out at ---   m_terrainManager.UpdateChunkLOD(eyePos, m_camera.GetViewDir());


glm::vec3 eyePos = invView * glm::vec4(0.0f, 0.0f, 0.0f, 1.0f);

Evan Bowman

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: FLIGHT
« Reply #6 on: February 08, 2017, 02:50:53 pm »
I was going through the code and found that the eye vector is 3X3.. but getting a vec4. It errors during compiling. I changed to Vec 4 but then it errors out at ---   m_terrainManager.UpdateChunkLOD(eyePos, m_camera.GetViewDir());


glm::vec3 eyePos = invView * glm::vec4(0.0f, 0.0f, 0.0f, 1.0f);

Interesting, I don't get this error, could we be using different versions of glm? I installed glm just last week so we could have different versions. If you change the eye position vector to a vec4 that should fail to compile because TerrainManager::UpdateChunkLOD() expects a const reference to a vec3 as the first parameter.

What if you made this change:
glm::vec3 eyePos = glm::vec3(invView * glm::vec4(0.0f, 0.0f, 0.0f, 1.0f));

By the way, what compiler are you using? Right now I only have the cmake script configured for macOS so that's another problem you may run into. I mean the linker flags will not be set of you're on a different platform.

Also libnoise in the deps folder will need to be built too because my code will try to statically link with it after you succeed in compiling all the sources.

As a sidenote, if you start up the game and get a blank blue/white screen, just give it a second, it's loading but there's no screen to tell you that yet.

I just started the project so I haven't worked a lot of this stuff out yet, especially the build steps.
« Last Edit: February 08, 2017, 03:13:03 pm by Evan Bowman »

bitano

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: FLIGHT
« Reply #7 on: February 08, 2017, 04:52:20 pm »
It looks very nice!

Here's an idea:

The player needs to get to a dropzone using the minimap to determine where to fly to. Once above the dropzone the player must drop a supply crate.
As soon as the supply crate has successfully landed in the dropzone, a new dropzone is generated for the player to fly to.

In the meantime the player is attacked by enemy planes which (s)he can shoot down.

MULTIPLAYER
Both players have to drop off a crate at the same drop zone
When a crate is dropped it slowly falls down due to its parachute. The drop is unsuccessful if the other player shoots down the crate.
The lower you get with your plane, the higher the chance of a successful crate drop, but the easier a target you become (and the harder it is to dodge mountains, etc).
A win goes to the first player to successfully drop the crate. The dropzone disappears and a new dropzone is spawned. 5 wins are required.

Just a bit of inspiration. Upto you whether you want to use it  or not :-)
« Last Edit: February 08, 2017, 04:54:22 pm by bitano »

CleverBoy

  • Newbie
  • *
  • Posts: 24
  • Game on!!
    • View Profile
    • Email
FLIGHT
« Reply #8 on: February 09, 2017, 11:37:46 pm »
I was going through the code and found that the eye vector is 3X3.. but getting a vec4. It errors during compiling. I changed to Vec 4 but then it errors out at ---   m_terrainManager.UpdateChunkLOD(eyePos, m_camera.GetViewDir());


glm::vec3 eyePos = invView * glm::vec4(0.0f, 0.0f, 0.0f, 1.0f);

Interesting, I don't get this error, could we be using different versions of glm? I installed glm just last week so we could have different versions. If you change the eye position vector to a vec4 that should fail to compile because TerrainManager::UpdateChunkLOD() expects a const reference to a vec3 as the first parameter.

What if you made this change:
glm::vec3 eyePos = glm::vec3(invView * glm::vec4(0.0f, 0.0f, 0.0f, 1.0f));

By the way, what compiler are you using? Right now I only have the cmake script configured for macOS so that's another problem you may run into. I mean the linker flags will not be set of you're on a different platform.

Also libnoise in the deps folder will need to be built too because my code will try to statically link with it after you succeed in compiling all the sources.

As a sidenote, if you start up the game and get a blank blue/white screen, just give it a second, it's loading but there's no screen to tell you that yet.

I just started the project so I haven't worked a lot of this stuff out yet, especially the build steps.
Ok Thanks.  Yes the suggestion worked and i am past that error. I am compiling on Linux (Ubutu 16.0 LTS) using code blocks. I still have to figure out the linking errors that I am getting for Open GL. The flag I set in the compiler options are not getting picked. I think because they are picked from the cmake file since I built the project using cmake. Not sure. I have to check that. Thanks for your other inputs as well. I will post once I am able to compile. I will give a try on mac as well.


Sent from my iPhone using Tapatalk

CleverBoy

  • Newbie
  • *
  • Posts: 24
  • Game on!!
    • View Profile
    • Email
Re: FLIGHT
« Reply #9 on: February 11, 2017, 07:45:44 am »
Hi..

Sorry this is not related to the project but regarding building libnoise and libnoise utils. I actually forked from GitHub and tried building it on mac..

I am getting the below error... Can you provide any inputs on how you built it..

[  6%] Linking CXX executable Flight
clang: error: no such file or directory: '../deps/libnoise/src/libnoise.a'
clang: error: no such file or directory: '../deps/libnoise/noiseutils/libnoiseutils-static.a'
make[2]: *** [Flight] Error 1
make[1]: *** [CMakeFiles/Flight.dir/all] Error 2
make: *** [all] Error 2

Used the code base from  https://github.com/qknight/libnoise


Thanks...

CleverBoy

  • Newbie
  • *
  • Posts: 24
  • Game on!!
    • View Profile
    • Email
Re: FLIGHT
« Reply #10 on: February 11, 2017, 09:57:33 am »
Was able to compile it. Great code. Did you read any SFML books for this ? Its all very well structured code and good for anyone to learn from it...   

Evan Bowman

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: FLIGHT
« Reply #11 on: February 12, 2017, 06:03:09 am »
It looks very nice!

Here's an idea:

Thanks! I don't know exactly what it's going to be yet so I'm open to ideas :)

Was able to compile it. Great code. Did you read any SFML books for this ? Its all very well structured code and good for anyone to learn from it...   

I didn't read any books on SFML specifically, mostly just the documentation on the SFML homepage. Glad you appreciate the organization of the code, because I try my best to keep my work clean and readable (although it's isn't by any means a software engineering masterpiece :))).

Evan Bowman

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: FLIGHT
« Reply #12 on: February 13, 2017, 04:54:48 am »
Sun, lens flares:


CleverBoy

  • Newbie
  • *
  • Posts: 24
  • Game on!!
    • View Profile
    • Email
Re: FLIGHT
« Reply #13 on: November 08, 2018, 10:06:58 pm »
Any update on this game ?