Flyer - a 2D flight simulation.

Will try the svn version later. Had some troubles compiling it the first time, maybe I'll be more lucky this time...

This flight sim is pretty cool! I've not managed to shoot down the other plane yet tho, it's way better than me at controlled flight hehe.
For those of you who manage to compile the project:
Flying instructions are here: http://code.google.com/p/flyer2d/wiki/HowToFly

For those of you who want to hack on it:
I'm using KDevelop. It can use Qt's .pro files as project files. It also supports Qt development in many other ways. I'm also using SmartSVN, very nice visual subversion client.

Remember - this is Free software, all suggestions, ideas, bug reports, graphics, sounds and patches are welcome 🙂

If anyone of you want to hack on the code, but have problem with setting up the environment, or need some help about how it works - I'd love to help.
uh i managed to install QT+MiniGW and started the command prompt, made a make file
but i had 2 compile errors, i can't find any error details though...
Try running 'make -k' at least twice. If this doesn't help, I'm afraid you'll have to wait until first numbered release for Windows support 🙁
yea i forgot -k lol gonna try again soon
EDIT: still no good here's the log

Code: Select all

c:\flyer2d>make -k
cd Box2D\ && mingw32-make -f Makefile
mingw32-make[1]: Entering directory `c:/flyer2d/Box2D'
mingw32-make -f Makefile.Release
mingw32-make[2]: Entering directory `c:/flyer2d/Box2D'
mingw32-make[2]: Nothing to be done for `first'.
mingw32-make[2]: Leaving directory `c:/flyer2d/Box2D'
mingw32-make[1]: Leaving directory `c:/flyer2d/Box2D'
cd QPropertyEditor\ && mingw32-make -f Makefile
mingw32-make[1]: Entering directory `c:/flyer2d/QPropertyEditor'
mingw32-make -f Makefile.Debug
mingw32-make[2]: Entering directory `c:/flyer2d/QPropertyEditor'
mingw32-make[2]: Nothing to be done for `first'.
mingw32-make[2]: Leaving directory `c:/flyer2d/QPropertyEditor'
mingw32-make[1]: Leaving directory `c:/flyer2d/QPropertyEditor'
cd flyer\ && mingw32-make -f Makefile
mingw32-make[1]: Entering directory `c:/flyer2d/flyer'
mingw32-make -f Makefile.Debug
mingw32-make[2]: Entering directory `c:/flyer2d/flyer'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
DQT_DLL -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEED
S_QMAIN -I"..\..\Qt\4.4.2\include\QtCore" -I"..\..\Qt\4.4.2\include\QtCore" -I".
.\..\Qt\4.4.2\include\QtGui" -I"..\..\Qt\4.4.2\include\QtGui" -I"..\..\Qt\4.4.2\
include\QtOpenGL" -I"..\..\Qt\4.4.2\include\QtOpenGL" -I"..\..\Qt\4.4.2\include"
 -I"..\common" -I"objects" -I"..\include" -I"c:\Qt\4.4.2\include\ActiveQt" -I"de
bug" -I"." -I"..\..\Qt\4.4.2\mkspecs\win32-g++" -o debug\mainwindow.o mainwindow
.cpp
In file included from ../include/Box2D.h:39,
                 from plane.h:21,
                 from mainwindow.cpp:21:
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Add(const b2ContactPoint*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:95: warning: statement has no ef
fect
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Persist(const b2ContactPoint*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:99: warning: statement has no ef
fect
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Remove(const b2ContactPoint*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:103: warning: statement has no e
ffect
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Result(const b2ContactResult*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:106: warning: statement has no e
ffect
In file included from mainwindow.cpp:23:
world.h: At global scope:
world.h:137: error: extraneous `char' ignored
mainwindow.cpp: In member function `void Flyer::MainWindow::elevatorChanged(doub
le)':
mainwindow.cpp:120: warning: passing `double' for converting 1 of `void QAbstrac
tSlider::setValue(int)'
mainwindow.cpp: In member function `void Flyer::MainWindow::throttleChanged(doub
le)':
mainwindow.cpp:129: warning: passing `double' for converting 1 of `void QAbstrac
tSlider::setValue(int)'
mainwindow.cpp: In member function `void Flyer::MainWindow::flapsChanged(double)
':
mainwindow.cpp:138: warning: passing `double' for converting 1 of `void QAbstrac
tSlider::setValue(int)'
mingw32-make[2]: *** [debug/mainwindow.o] Error 1
mingw32-make[2]: Target `first' not remade because of errors.
mingw32-make[2]: Leaving directory `c:/flyer2d/flyer'
mingw32-make[1]: *** [debug] Error 2
mingw32-make[1]: Target `first' not remade because of errors.
mingw32-make[1]: Leaving directory `c:/flyer2d/flyer'
mingw32-make: *** [sub-flyer-make_default] Error 2
cd editor\ && mingw32-make -f Makefile
mingw32-make[1]: Entering directory `c:/flyer2d/editor'
mingw32-make -f Makefile.Debug
mingw32-make[2]: Entering directory `c:/flyer2d/editor'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..
\Qt\4.4.2\include\QtCore" -I"..\..\Qt\4.4.2\include\QtCore" -I"..\..\Qt\4.4.2\in
clude\QtGui" -I"..\..\Qt\4.4.2\include\QtGui" -I"..\..\Qt\4.4.2\include" -I"..\c
ommon" -I"..\flyer" -I"..\include" -I"c:\Qt\4.4.2\include\ActiveQt" -I"debug" -I
"." -I"..\..\Qt\4.4.2\mkspecs\win32-g++" -o debug\editor.o editor.cpp
In file included from ../include/Box2D.h:39,
                 from ../common/shape.h:20,
                 from editor.cpp:20:
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Add(const b2ContactPoint*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:95: warning: statement has no ef
fect
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Persist(const b2ContactPoint*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:99: warning: statement has no ef
fect
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Remove(const b2ContactPoint*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:103: warning: statement has no e
ffect
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Result(const b2ContactResult*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:106: warning: statement has no e
ffect
In file included from editor.cpp:20:
../common/shape.h: At global scope:
../common/shape.h:35: warning: `class Flyer::Shape' has virtual functions but no
n-virtual destructor
In file included from ui_editor.h:26,
                 from editor.h:25,
                 from editor.cpp:29:
../include/QPropertyEditorWidget.h:1: error: expected constructor, destructor, o
r type conversion before '.' token
../include/QPropertyEditorWidget.h:1: error: expected `,' or `;' before '.' toke
n
In file included from ui_editor.h:26,
                 from editor.h:25,
                 from editor.cpp:29:
../include/QPropertyEditorWidget.h:1:48: warning: no newline at end of file
In file included from editor.h:25,
                 from editor.cpp:29:
ui_editor.h:64: error: ISO C++ forbids declaration of `QPropertyEditorWidget' wi
th no type
ui_editor.h:64: error: expected `;' before '*' token
ui_editor.h: In member function `void Ui_Editor::setupUi(QMainWindow*)':
ui_editor.h:180: error: `propertyEditor' undeclared (first use this function)
ui_editor.h:180: error: (Each undeclared identifier is reported only once for ea
ch function it appears in.)
ui_editor.h:180: error: `QPropertyEditorWidget' has not been declared
editor.cpp: In member function `void Editor::select(EditableWrapper*)':
editor.cpp:361: error: `propertyEditor' undeclared (first use this function)
mingw32-make[2]: *** [debug/editor.o] Error 1
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..
\Qt\4.4.2\include\QtCore" -I"..\..\Qt\4.4.2\include\QtCore" -I"..\..\Qt\4.4.2\in
clude\QtGui" -I"..\..\Qt\4.4.2\include\QtGui" -I"..\..\Qt\4.4.2\include" -I"..\c
ommon" -I"..\flyer" -I"..\include" -I"c:\Qt\4.4.2\include\ActiveQt" -I"debug" -I
"." -I"..\..\Qt\4.4.2\mkspecs\win32-g++" -o debug\main.o main.cpp
In file included from ../include/Box2D.h:39,
                 from ../common/body.h:27,
                 from editor.h:22,
                 from main.cpp:18:
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Add(const b2ContactPoint*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:95: warning: statement has no ef
fect
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Persist(const b2ContactPoint*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:99: warning: statement has no ef
fect
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Remove(const b2ContactPoint*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:103: warning: statement has no e
ffect
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Result(const b2ContactResult*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:106: warning: statement has no e
ffect
In file included from ../common/body.h:31,
                 from editor.h:22,
                 from main.cpp:18:
../common/shape.h: At global scope:
../common/shape.h:35: warning: `class Flyer::Shape' has virtual functions but no
n-virtual destructor
In file included from ui_editor.h:26,
                 from editor.h:25,
                 from main.cpp:18:
../include/QPropertyEditorWidget.h:1: error: expected constructor, destructor, o
r type conversion before '.' token
../include/QPropertyEditorWidget.h:1: error: expected `,' or `;' before '.' toke
n
In file included from ui_editor.h:26,
                 from editor.h:25,
                 from main.cpp:18:
../include/QPropertyEditorWidget.h:1:48: warning: no newline at end of file
In file included from editor.h:25,
                 from main.cpp:18:
ui_editor.h:64: error: ISO C++ forbids declaration of `QPropertyEditorWidget' wi
th no type
ui_editor.h:64: error: expected `;' before '*' token
ui_editor.h: In member function `void Ui_Editor::setupUi(QMainWindow*)':
ui_editor.h:180: error: `propertyEditor' undeclared (first use this function)
ui_editor.h:180: error: (Each undeclared identifier is reported only once for ea
ch function it appears in.)
ui_editor.h:180: error: `QPropertyEditorWidget' has not been declared
mingw32-make[2]: *** [debug/main.o] Error 1
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..
\Qt\4.4.2\include\QtCore" -I"..\..\Qt\4.4.2\include\QtCore" -I"..\..\Qt\4.4.2\in
clude\QtGui" -I"..\..\Qt\4.4.2\include\QtGui" -I"..\..\Qt\4.4.2\include" -I"..\c
ommon" -I"..\flyer" -I"..\include" -I"c:\Qt\4.4.2\include\ActiveQt" -I"debug" -I
"." -I"..\..\Qt\4.4.2\mkspecs\win32-g++" -o debug\moc_editor.o debug\moc_editor.
cpp
In file included from ../include/Box2D.h:39,
                 from ../common/body.h:27,
                 from debug\/../editor.h:22,
                 from debug\moc_editor.cpp:10:
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Add(const b2ContactPoint*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:95: warning: statement has no ef
fect
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Persist(const b2ContactPoint*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:99: warning: statement has no ef
fect
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Remove(const b2ContactPoint*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:103: warning: statement has no e
ffect
../include/../Box2D/Dynamics/b2WorldCallbacks.h: In member function `virtual voi
d b2ContactListener::Result(const b2ContactResult*)':
../include/../Box2D/Dynamics/b2WorldCallbacks.h:106: warning: statement has no e
ffect
In file included from ../common/body.h:31,
                 from debug\/../editor.h:22,
                 from debug\moc_editor.cpp:10:
../common/shape.h: At global scope:
../common/shape.h:35: warning: `class Flyer::Shape' has virtual functions but no
n-virtual destructor
In file included from debug\/../ui_editor.h:26,
                 from debug\/../editor.h:25,
                 from debug\moc_editor.cpp:10:
../include/QPropertyEditorWidget.h:1: error: expected constructor, destructor, o
r type conversion before '.' token
../include/QPropertyEditorWidget.h:1: error: expected `,' or `;' before '.' toke
n
In file included from debug\/../ui_editor.h:26,
                 from debug\/../editor.h:25,
                 from debug\moc_editor.cpp:10:
../include/QPropertyEditorWidget.h:1:48: warning: no newline at end of file
In file included from debug\/../editor.h:25,
                 from debug\moc_editor.cpp:10:
debug\/../ui_editor.h:64: error: ISO C++ forbids declaration of `QPropertyEditor
Widget' with no type
debug\/../ui_editor.h:64: error: expected `;' before '*' token
debug\/../ui_editor.h: In member function `void Ui_Editor::setupUi(QMainWindow*)
':
debug\/../ui_editor.h:180: error: `propertyEditor' undeclared (first use this fu
nction)
debug\/../ui_editor.h:180: error: (Each undeclared identifier is reported only o
nce for each function it appears in.)
debug\/../ui_editor.h:180: error: `QPropertyEditorWidget' has not been declared
mingw32-make[2]: *** [debug/moc_editor.o] Error 1
mingw32-make[2]: Target `first' not remade because of errors.
mingw32-make[2]: Leaving directory `c:/flyer2d/editor'
mingw32-make[1]: *** [debug] Error 2
mingw32-make[1]: Target `first' not remade because of errors.
mingw32-make[1]: Leaving directory `c:/flyer2d/editor'
mingw32-make: *** [sub-editor-make_default] Error 2
cd common\ && mingw32-make -f Makefile
mingw32-make[1]: Entering directory `c:/flyer2d/common'
mingw32-make -f Makefile.Debug
mingw32-make[2]: Entering directory `c:/flyer2d/common'
mingw32-make[2]: Nothing to be done for `first'.
mingw32-make[2]: Leaving directory `c:/flyer2d/common'
mingw32-make[1]: Leaving directory `c:/flyer2d/common'
mingw32-make: Target `first' not remade because of errors.
So yes, this is error in my code. I'll fix it before the release.
Thank you very much for trying it out, and for feedback!
Hm any progress on a windows fix : P i'm very eager to try this out : )
Rev 24 btw
Soon, very soon. Within few day there will be 0.1 release, with exciting new features: bombing, repairs and refills on the airfield. Also with Windows build.
Version 0.1 is released!

Binary packages are currently available only for Linux x86_64 and Windows. Package for 32-bit Linux will be added soon. But even now You can download and compile sources! No Mac package planned, but if someone has access to Mac machine and is able to compile and test the application - just let me know.

Everything is here: http://code.google.com/p/flyer2d/

Whats new:

Bomb, repairs and re-arminig in hangar at the airport. So flyign finally has a purpose: you can go, drop a bomb, shotdown a boogey, get back, repair, drop another bomb... Fun!

Feddback will be appreciated.
Nice 😀 brings back sopwith memories.

Some suggestions:
-Add keyboard control, the mouse wheel throttle does not feel that great. And using a mouse wheel puts quite a bit of strain on your fingers
-I nose-dived into the ground, at full speed. But I was still in 1 piece. Ofcourse it reported everything broken, but there was only a bit of smoke. When I fly into the ground at 100km/h I don't expect to find a whole plane 😉
-It could use some SFX 😉 maybe this will help you: http://www.cyd.liu.se/~tompe573/hp/project_sfxr.html

I also had a bug that when I resized the window to a certain size the map would disappear.

Original thread: https://box2d.org/forum/viewtopic.php?t=1497