GithubHelp home page GithubHelp logo

juzzlin / dustracing2d Goto Github PK

View Code? Open in Web Editor NEW
294.0 21.0 66.0 48.87 MB

Dust Racing 2D is a traditional top-down car racing game including a level editor.

Home Page: http://juzzlin.github.io/DustRacing2D/index.html

License: GNU General Public License v3.0

CMake 0.68% NSIS 0.11% Shell 0.10% C++ 61.99% C 37.08% Python 0.04%
racing game physics car qt qt-game opengl c-plus-plus top-down race-track

dustracing2d's People

Contributors

amdmi3 avatar devnexen avatar jarssoft avatar juzzlin avatar mailaender avatar paolostraffi avatar pinotree avatar pusso avatar samet732 avatar vistaus avatar wuzzy2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dustracing2d's Issues

Walls and grandstands are pushable

In many tracks, the grandstands and walls are pushable.

This can mess up the tracks quite badly on long races in which the cars crash into walls all the time. It's not good when you end up with entire wall blocks lying around on the road. :D

I think these objects should always be immobile, no exceptions. Many of my previous map contributions rely on these objects being immobile.

This is a regression, in earlier versions, grandstands and walls were immovable. I think these objects always need to be immobile, no exceptions.

Tested in version: 2.0.1

A minimap would be greatly appreciated

As the title says, the game is a bit hard to play if you don't know perfectly the track you're racing on. A minimap would be greatly improve the usability.

Thanks for that great game,
Mt

When computer cars resets under a bridge, it gets confused

It is possible to drive through the little ramp of the bridge when your car is under the bridge.

How to reproduce:

  • Create a test map to force computer cars under various bridges. The bridges must face North/South, while the road below the road must face West/East
  • Have a waypoint exactly on the bridge tile
  • Make it so the computer cars crash in an unfortunate fashion when driving under the bridge
  • If the cars reset, you did it right

EXPECTED: The restting computer cars will respawn in the direction of the lower road and under the bridge.

ACTUAL: The resetting cars will respawn in the direction of the lower road, but ON the bridge. The poor fellows will perpetually drive into the bridge railing, then reset, drive into the railing again, and so on, in an infinite loop and just fail to continue the race at all.

Cars are not rendered on FreeBSD

FreeBSD amd64, dustrac 2.0.3

    Vendor: Intel Open Source Technology Center (0x8086)
    Device: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2)  (0x1916)
    Version: 18.3.2
    Accelerated: yes
    Video memory: 3072MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2

Cars and some other elements are rendered as black rectangles. I assume some shader problem. No other OpenGL apps show any artifacts.

dustrac

cmake installs into /usr/local instead of /usr/local/bin

I ran

cmake ..
make 
sudo make install

and then the binary is not found from within the shell. The binaries are put into /usr/local/./dustrac-game and
/usr/local/./dustrac-editor

Here is the full install log:

-- Install configuration: "Release"
-- Installing: /usr/local/./dustrac-game
-- Installing: /usr/local/./dustrac-editor
-- Installing: /usr/local/./data/editorModels.conf
-- Installing: /usr/local/./data/meshes.conf
-- Installing: /usr/local/./data/surfaces.conf
-- Installing: /usr/local/./AUTHORS
-- Installing: /usr/local/./CHANGELOG
-- Installing: /usr/local/./COPYING
-- Installing: /usr/local/./README.md
-- Installing: /usr/local/./data/images
-- Installing: /usr/local/./data/images/steel.jpg
-- Up-to-date: /usr/local/./data/images
-- Installing: /usr/local/./data/images/carBlue.png
-- Installing: /usr/local/./data/images/tireStatusIndicatorTires.png
-- Installing: /usr/local/./data/images/sandGrassCornerEditor.png
-- Installing: /usr/local/./data/images/startLightOn.png
-- Installing: /usr/local/./data/images/brake.png
-- Installing: /usr/local/./data/images/clear.png
-- Installing: /usr/local/./data/images/asphalt.png
-- Installing: /usr/local/./data/images/sandGrassCorner.png
-- Installing: /usr/local/./data/images/trackSelectionBack.png
-- Installing: /usr/local/./data/images/bridgeEditor.png
-- Installing: /usr/local/./data/images/straight45Female.png
-- Installing: /usr/local/./data/images/pit.png
-- Installing: /usr/local/./data/images/grandstand.png
-- Installing: /usr/local/./data/images/plant.png
-- Installing: /usr/local/./data/images/grandstandEditor.png
-- Installing: /usr/local/./data/images/startLightOffCorner.png
-- Installing: /usr/local/./data/images/finish.png
-- Installing: /usr/local/./data/images/startLightGlow.png
-- Installing: /usr/local/./data/images/sparkle.png
-- Installing: /usr/local/./data/images/straight.png
-- Installing: /usr/local/./data/images/sandEditor.png
-- Installing: /usr/local/./data/images/bushArea.png
-- Installing: /usr/local/./data/images/star.png
-- Installing: /usr/local/./data/images/sandAreaBig.png
-- Installing: /usr/local/./data/images/leaf.png
-- Installing: /usr/local/./data/images/carDarkRed.png
-- Installing: /usr/local/./data/images/grass.png
-- Installing: /usr/local/./data/images/dustRacing2DBanner.png
-- Installing: /usr/local/./data/images/rock.png
-- Installing: /usr/local/./data/images/grid.png
-- Installing: /usr/local/./data/images/logo.png
-- Installing: /usr/local/./data/images/carDarkGreen.png
-- Installing: /usr/local/./data/images/sandGrassCorner2Editor.png
-- Installing: /usr/local/./data/images/carViolet.png
-- Installing: /usr/local/./data/images/sandGrassCorner2.png
-- Installing: /usr/local/./data/images/tree.png
-- Installing: /usr/local/./data/images/carNormalMap.png
-- Installing: /usr/local/./data/images/starGlow.png
-- Installing: /usr/local/./data/images/settingsBack.png
-- Installing: /usr/local/./data/images/skid.png
-- Installing: /usr/local/./data/images/bridgePreview.png
-- Installing: /usr/local/./data/images/right.png
-- Installing: /usr/local/./data/images/grassEditor.png
-- Installing: /usr/local/./data/images/tire.png
-- Installing: /usr/local/./data/images/sandAreaCurve.png
-- Installing: /usr/local/./data/images/crashOverlay.png
-- Installing: /usr/local/./data/images/lock.png
-- Installing: /usr/local/./data/images/carYellow.png
-- Installing: /usr/local/./data/images/carBlack.png
-- Installing: /usr/local/./data/images/intro.png
-- Installing: /usr/local/./data/images/startLightOnCorner.png
-- Installing: /usr/local/./data/images/cursor2.png
-- Installing: /usr/local/./data/images/left.png
-- Installing: /usr/local/./data/images/frontTire.png
-- Installing: /usr/local/./data/images/sandGrassStraight.png
-- Installing: /usr/local/./data/images/straight45MalePreview.png
-- Installing: /usr/local/./data/images/straight45FemalePreview.png
-- Installing: /usr/local/./data/images/sky.png
-- Installing: /usr/local/./data/images/corner45Right.png
-- Installing: /usr/local/./data/images/smoke.png
-- Installing: /usr/local/./data/images/wood.png
-- Installing: /usr/local/./data/images/corner45LeftPreview.png
-- Installing: /usr/local/./data/images/tireStatusIndicatorBody.png
-- Installing: /usr/local/./data/images/checkeredFlag.png
-- Installing: /usr/local/./data/images/straight45Male.png
-- Installing: /usr/local/./data/images/sandGrassStraightEditor.png
-- Installing: /usr/local/./data/images/carPink.png
-- Installing: /usr/local/./data/images/creditsHelpBack.png
-- Installing: /usr/local/./data/images/corner45RightPreview.png
-- Installing: /usr/local/./data/images/carCyan.png
-- Installing: /usr/local/./data/images/carGreen.png
-- Installing: /usr/local/./data/images/mainMenuBack.png
-- Installing: /usr/local/./data/images/straightPreview.png
-- Installing: /usr/local/./data/images/about.png
-- Installing: /usr/local/./data/images/cross.png
-- Installing: /usr/local/./data/images/carGrey.png
-- Installing: /usr/local/./data/images/mud.png
-- Installing: /usr/local/./data/images/carRed.png
-- Installing: /usr/local/./data/images/sand.png
-- Installing: /usr/local/./data/images/startLightOff.png
-- Installing: /usr/local/./data/images/carOrange.png
-- Installing: /usr/local/./data/images/carBrown.png
-- Installing: /usr/local/./data/images/cornerPreview.png
-- Installing: /usr/local/./data/images/corner.png
-- Installing: /usr/local/./data/images/cursor.png
-- Installing: /usr/local/./data/images/finishPreview.png
-- Installing: /usr/local/./data/images/corner45Left.png
-- Installing: /usr/local/./data/levels
-- Installing: /usr/local/./data/levels/ring.trk
-- Installing: /usr/local/./data/levels/suzuka.trk
-- Installing: /usr/local/./data/levels/infinity.trk
-- Installing: /usr/local/./data/levels/Figure 8.trk
-- Installing: /usr/local/./data/levels/Far Lands.trk
-- Installing: /usr/local/./data/levels/curvastone.trk
-- Installing: /usr/local/./data/levels/Western Valley.trk
-- Installing: /usr/local/./data/levels/Twineburg.trk
-- Installing: /usr/local/./data/levels/Radiator.trk
-- Installing: /usr/local/./data/levels/Desert Storm.trk
-- Installing: /usr/local/./data/levels/twister.trk
-- Installing: /usr/local/./data/levels/triangle.trk
-- Installing: /usr/local/./data/levels/straight.trk
-- Installing: /usr/local/./data/levels/monza.trk
-- Installing: /usr/local/./data/levels/Diamond.trk
-- Installing: /usr/local/./data/models
-- Installing: /usr/local/./data/models/bridge.obj
-- Installing: /usr/local/./data/models/cube.obj
-- Installing: /usr/local/./data/sounds
-- Installing: /usr/local/./data/sounds/menuBoom.ogg
-- Installing: /usr/local/./data/sounds/carHit2.ogg
-- Installing: /usr/local/./data/sounds/carEngine.ogg
-- Installing: /usr/local/./data/sounds/carHit3.ogg
-- Installing: /usr/local/./data/sounds/menuClick.ogg
-- Installing: /usr/local/./data/sounds/pit.ogg
-- Installing: /usr/local/./data/sounds/cheering.ogg
-- Installing: /usr/local/./data/sounds/skid.ogg
-- Installing: /usr/local/./data/sounds/bell.ogg
-- Installing: /usr/local/./data/sounds/carHit.ogg
-- Installing: /usr/local/./data/fonts
-- Installing: /usr/local/./data/fonts/DejaVuSans-Bold.ttf
-- Up-to-date: /usr/local/./data/fonts
-- Installing: /usr/local/./data/fonts/LICENCE.txt
-- Installing: /usr/local/./data/translations
-- Installing: /usr/local/./data/translations/dustrac-game_it.qm
-- Installing: /usr/local/./data/translations/dustrac-editor_de.qm
-- Installing: /usr/local/./data/translations/dustrac-game_cs.qm
-- Installing: /usr/local/./data/translations/dustrac-editor_it.qm
-- Installing: /usr/local/./data/translations/dustrac-editor_fr.qm
-- Installing: /usr/local/./data/translations/dustrac-game_fr.qm
-- Installing: /usr/local/./data/translations/dustrac-editor_fi.qm
-- Installing: /usr/local/./data/translations/dustrac-editor_cs.qm
-- Installing: /usr/local/./data/translations/dustrac-game_de.qm
-- Installing: /usr/local/./data/translations/dustrac-game_fi.qm

Performance regression since version 1.8.3

The current version (1.11.0) of the game is not playable on slower hardware (e.g. Intel's older HD graphics). However, for example version 1.8.3 is much faster and can do almost 60 fps.

Early finish on 4 tracks

As of 4ab1583, the following tracks have an early finish, meaning the lap is considered “finished” about 1 tile before the actual finish line:

  • Curvastone
  • Ring
  • Suzuka
  • Twister

Compilation failure.

On Debian Jessie (oldstable) x64 KDE.
Here are the last lines from make:

[ 57%] Building CXX object src/game/CMakeFiles/dustrac-game.dir/statemachine.cpp.o
/home/giorgos/TEMPG/DustRacing2D-2.0.1/src/game/statemachine.cpp: In member function 'void StateMachine::stateDoIntro()':
/home/giorgos/TEMPG/DustRacing2D-2.0.1/src/game/statemachine.cpp:135:6: error: no matching function for call to 'QTimer::singleShot(int, StateMachine::stateDoIntro()::<lambda()>)'
     });
      ^
/home/giorgos/TEMPG/DustRacing2D-2.0.1/src/game/statemachine.cpp:135:6: note: candidates are:
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTimer:1:0,
                 from /home/giorgos/TEMPG/DustRacing2D-2.0.1/src/game/eventhandler.hpp:23,
                 from /home/giorgos/TEMPG/DustRacing2D-2.0.1/src/game/renderer.hpp:22,
                 from /home/giorgos/TEMPG/DustRacing2D-2.0.1/src/game/statemachine.hpp:19,
                 from /home/giorgos/TEMPG/DustRacing2D-2.0.1/src/game/statemachine.cpp:16:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qtimer.h:81:17: note: static void QTimer::singleShot(int, const QObject*, const char*)
     static void singleShot(int msec, const QObject *receiver, const char *member);
                 ^
/usr/include/x86_64-linux-gnu/qt5/QtCore/qtimer.h:81:17: note:   candidate expects 3 arguments, 2 provided
/usr/include/x86_64-linux-gnu/qt5/QtCore/qtimer.h:82:17: note: static void QTimer::singleShot(int, Qt::TimerType, const QObject*, const char*)
     static void singleShot(int msec, Qt::TimerType timerType, const QObject *receiver, const char *member);
                 ^
/usr/include/x86_64-linux-gnu/qt5/QtCore/qtimer.h:82:17: note:   candidate expects 4 arguments, 2 provided
src/game/CMakeFiles/dustrac-game.dir/build.make:905: recipe for target 'src/game/CMakeFiles/dustrac-game.dir/statemachine.cpp.o' failed
make[2]: *** [src/game/CMakeFiles/dustrac-game.dir/statemachine.cpp.o] Error 1
CMakeFiles/Makefile2:538: recipe for target 'src/game/CMakeFiles/dustrac-game.dir/all' failed
make[1]: *** [src/game/CMakeFiles/dustrac-game.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
>

main.cpp:(.text.startup+0xe): undefined reference to `qt_qhash_seed'

Doesn't compile on current @openSUSE Tumbleweed: https://build.opensuse.org/request/show/559801

[   88s] cd /home/abuild/rpmbuild/BUILD/DustRacing2D-2.0.0/src/game/MiniCore/src && /usr/bin/c++  -DDATA_PATH=\"/usr/share/dustrac\" -DGLEW_NO_GLU -DGLEW_STATIC -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DVERSION=\"2.0.0\" -D__MC_NO_GLEW__ -D__MC_QOPENGLFUNCTIONS__ -I/home/abuild/rpmbuild/BUILD/DustRacing2D-2.0.0/src/game/MiniCore/src -I/home/abuild/rpmbuild/BUILD/DustRacing2D-2.0.0/src/game/MiniCore/src/MiniCore_autogen/include -I/usr/include/AL/.. -I/home/abuild/rpmbuild/BUILD/DustRacing2D-2.0.0/src/game/MiniCore/src/Asset -I/home/abuild/rpmbuild/BUILD/DustRacing2D-2.0.0/src/game/MiniCore/src/Core -I/home/abuild/rpmbuild/BUILD/DustRacing2D-2.0.0/src/game/MiniCore/src/Graphics -I/home/abuild/rpmbuild/BUILD/DustRacing2D-2.0.0/src/game/MiniCore/src/Physics -I/home/abuild/rpmbuild/BUILD/DustRacing2D-2.0.0/src/game/MiniCore/src/Text -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtOpenGL -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtXml  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -std=c++11 -O3 -DNDEBUG   -fPIC -std=gnu++11 -o CMakeFiles/MiniCore.dir/Graphics/mcsurfaceobjectrendererlegacy.cc.o -c /home/abuild/rpmbuild/BUILD/DustRacing2D-2.0.0/src/game/MiniCore/src/Graphics/mcsurfaceobjectrendererlegacy.cc
[   89s] CMakeFiles/dustrac-editor.dir/main.cpp.o: In function `main':
[   89s] main.cpp:(.text.startup+0xe): undefined reference to `qt_qhash_seed'
[   89s] collect2: error: ld returned 1 exit status
[   89s] make[2]: *** [src/editor/CMakeFiles/dustrac-editor.dir/build.make:940: dustrac-editor] Error 1
[   89s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/DustRacing2D-2.0.0'
[   89s] make[1]: *** [CMakeFiles/Makefile2:247: src/editor/CMakeFiles/dustrac-editor.dir/all] Error 2
[   89s] make[1]: *** Waiting for unfinished jobs....

Dual Player Mode: key-press not recognized

when playing in dual player mode, sometimes key presses are not recognized. It seems, that the inputs are limited to max. 4 keys simultaneously.

Can this anyone reproduce, or is this an issue with my hardware? Old Samsung 410B notebook, running Linux Mint 19 with Qt5.9, self compiled.

Change custom track directory

If you create a custom track, the game forces you to use ~/DustRacingTracks as directory. This is pretty annoying as it pollutes the home directory. This is mainly a problem on GNU/Linux or BSD.

I suggest to use the XDG basedir specification:

https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

For this game, it would boil down to:

  • Read the environment variable $XDG_DATA_HOME
  • If the environment variable exists, read tracks from $XDG_DATA_HOME/DustRacing2D/tracks
  • If $XDG_DATA_HOME does not exist, look into $HOME/.local/share/DustRacing2D/tracks

For compability, the game could still additionally read from ~/DustRacingTracks, but it shall be considered deprecated.

Another crash on exit

1.13.0 still crashes on exit. This may not be related to #19 since the trace is different, and that issue is closed anyway, so here's the new issue with actual trace:

[Fri Sep 15 22:53:17 2017] I:   Found '/usr/local/share/dustrac/levels/straight.trk', index=7
[Fri Sep 15 22:53:17 2017] I:   Found '/usr/local/share/dustrac/levels/suzuka.trk', index=11
[Fri Sep 15 22:53:17 2017] I:   Found '/usr/local/share/dustrac/levels/triangle.trk', index=5
[Fri Sep 15 22:53:17 2017] I:   Found '/usr/local/share/dustrac/levels/Twineburg.trk', index=18
[Fri Sep 15 22:53:17 2017] I:   Found '/usr/local/share/dustrac/levels/twister.trk', index=10
[Fri Sep 15 22:53:17 2017] I:   Found '/usr/local/share/dustrac/levels/Western Valley.trk', index=16
[Fri Sep 15 22:53:17 2017] I: Loading race tracks from '/home/marakasov/DustRacingTracks'..
[Fri Sep 15 22:53:17 2017] I:   No race tracks found.
[Fri Sep 15 22:53:17 2017] I: A total of 15 race track(s) loaded.
[Fri Sep 15 22:53:22 2017] I: Quit selected from the main menu.
[LWP 100229 of process 62510 exited]
[LWP 101813 of process 62510 exited]

Thread 1 received signal SIGBUS, Bus error.
0x00000000005961bd in QOpenGLFunctions::glDeleteProgram (this=0x812926708, program=13) at /usr/local/include/qt5/QtGui/qopenglfunctions.h:1334
1334	    d_ptr->f.DeleteProgram(program);
(gdb) bt
#0  0x00000000005961bd in QOpenGLFunctions::glDeleteProgram (this=0x812926708, program=13) at /usr/local/include/qt5/QtGui/qopenglfunctions.h:1334
#1  0x0000000000592194 in MCGLShaderProgram::~MCGLShaderProgram (this=0x812926700) at /usr/work/tmp/dustrac/work/DustRacing2D-1.13.0/src/game/MiniCore/Graphics/mcglshaderprogram.cc:128
#2  0x0000000000592389 in MCGLShaderProgram::~MCGLShaderProgram (this=0x812926700) at /usr/work/tmp/dustrac/work/DustRacing2D-1.13.0/src/game/MiniCore/Graphics/mcglshaderprogram.cc:127
#3  0x00000000004bc6b5 in std::__1::default_delete<MCGLShaderProgram>::operator() (this=0x8023e1bb8, __ptr=0x812926700) at /usr/include/c++/v1/memory:2397
#4  std::__1::__shared_ptr_pointer<MCGLShaderProgram*, std::__1::default_delete<MCGLShaderProgram>, std::__1::allocator<MCGLShaderProgram> >::__on_zero_shared (this=0x8023e1ba0) at /usr/include/c++/v1/memory:3795
#5  0x000000080332799b in std::__1::__shared_count::__release_shared (this=0x8023e1ba0) at /usr/src.git/contrib/libc++/src/memory.cpp:67
#6  std::__1::__shared_weak_count::__release_shared (this=0x8023e1ba0) at /usr/src.git/contrib/libc++/src/memory.cpp:92
#7  0x000000000042871c in std::__1::shared_ptr<MCGLShaderProgram>::~shared_ptr (this=0x8018d2180) at /usr/include/c++/v1/memory:4626
#8  0x000000000058e501 in MCGLScene::~MCGLScene (this=0x8018d2038) at /usr/work/tmp/dustrac/work/DustRacing2D-1.13.0/src/game/MiniCore/Graphics/mcglscene.cc:313
#9  0x00000000005aa8c3 in MCWorldRenderer::~MCWorldRenderer (this=0x8018d2000) at /usr/work/tmp/dustrac/work/DustRacing2D-1.13.0/src/game/MiniCore/Graphics/mcworldrenderer.cc:352
#10 0x000000000058411b in MCWorld::~MCWorld (this=0x8009800f0) at /usr/work/tmp/dustrac/work/DustRacing2D-1.13.0/src/game/MiniCore/Core/mcworld.cc:85
#11 0x000000000045f04f in Game::~Game (this=0x800980000) at /usr/work/tmp/dustrac/work/DustRacing2D-1.13.0/src/game/game.cpp:442
#12 0x000000000045f0d9 in Game::~Game (this=0x800980000) at /usr/work/tmp/dustrac/work/DustRacing2D-1.13.0/src/game/game.cpp:421
#13 0x0000000000476152 in std::__1::default_delete<Game>::operator() (this=0x7fffffffe6f8, __ptr=0x800980000) at /usr/include/c++/v1/memory:2397
#14 std::__1::unique_ptr<Game, std::__1::default_delete<Game> >::reset (this=0x7fffffffe6f8, __p=0x0) at /usr/include/c++/v1/memory:2603
#15 std::__1::unique_ptr<Game, std::__1::default_delete<Game> >::~unique_ptr (this=0x7fffffffe6f8) at /usr/include/c++/v1/memory:2571
#16 main (argc=1, argv=0x7fffffffe930) at /usr/work/tmp/dustrac/work/DustRacing2D-1.13.0/src/game/main.cpp:79

Rewrite the UI in QML

The current UI is aged - rewrite the UI in QML while rendering the game into QQuickFramebufferObject. This would also enable the use of TTF fonts in the menu system / HUD and make it a lot easier to create different game modes, input text etc etc.

Menu transition is slow when selecting difficulty and laps

If I select the difficulty and the laps, the time it takes for the new menu to appear is noticable long. It's a few seconds sometimes, but it should be instant. This does not take the animation into account.

Version: 2.0.3

Maybe this is related to #2.

Driving over 200 km/h makes camera move completely away from car

Version: 4ab1583
OS: GNU/Linux

If you drive over 200 km/h, the car is not visible anymore because the camera moved away from it. :(

Note: I used a resolution of 1920×1080 and the effect occours when driving vertically. For the car to “disappear” when driving horizontally, I have to drive much, much faster.

Black screen after start - Win7, Nvidia

I'm having the same issue as previously reported #30. However I'm running version 2.0.0, which was released before the aforesaid issue was opened, on Win7 x64 and latest Nvidia drivers 430.86.
The game itself seems to be running (sound and everything) but it's all black except of a happy little tree.
screenshot
So if that issue is fixed already could you please provide compiled binaries for Windows?
Version 1.13.0 works fine though.

Confusing/weird stars

Do the stars in the track selection have any meaning?

It seems they are kinda dependent on the best position, but why are there only 10?

Also, I get 10 stars if I only finish 2nd, and I get 1 star for finishing last (12th). This does not seem right.

I use 4ab1583 on GNU/Linux.

Black screen after start

I just compiled the latest commit on my Gentoo box and I only see a black screen after I start the game. I see the mouse cursor and I can hear the click sounds but the display stays black. To build I used this ebuild: dustrac-2.0.0.ebuild

My machine is a Thinkpad T530 laptop with a Nvidia NVS 5400M (using nouveau drivers) and an attached FullHD monitor.

[Fri Dec 29 20:07:29 2017] I: Dust Racing 2D version 2.0.0
[Fri Dec 29 20:07:29 2017] I: Compiled against Qt version 5.9.3
[Fri Dec 29 20:07:29 2017] I: Creating game object..
[Fri Dec 29 20:07:29 2017] W: Failed to load translations for en_US
[Fri Dec 29 20:07:29 2017] I: Resolution: 1920 1200 1
[Fri Dec 29 20:07:29 2017] I: Creating the renderer..
[Fri Dec 29 20:07:29 2017] I: OpenGL Version: 3.0 Mesa 17.2.7
[Fri Dec 29 20:07:29 2017] I: Loading font /usr/share/dustrac/fonts/DejaVuSans-Bold.ttf..
[Fri Dec 29 20:07:29 2017] I: Loaded font DejaVu Sans
[Fri Dec 29 20:07:29 2017] I: Font slot size: 71x80
[Fri Dec 29 20:07:29 2017] I: Font texture size (initial): 568x1200
[Fri Dec 29 20:07:30 2017] I: Loading surface config from '/usr/share/dustrac/surfaces.conf'..
[Fri Dec 29 20:07:30 2017] I: Sound device: OpenAL Soft
[Fri Dec 29 20:07:30 2017] I: Loading mesh config from '/usr/share/dustrac/meshes.conf'..
[Fri Dec 29 20:07:30 2017] I: Loading race tracks from '/usr/share/dustrac/levels'..
[Fri Dec 29 20:07:30 2017] I:   Found '/usr/share/dustrac/levels/curvastone.trk', index=8
[Fri Dec 29 20:07:30 2017] I:   Found '/usr/share/dustrac/levels/Desert Storm.trk', index=13
[Fri Dec 29 20:07:30 2017] I:   Found '/usr/share/dustrac/levels/Diamond.trk', index=14
[Fri Dec 29 20:07:30 2017] I:   Found '/usr/share/dustrac/levels/Far Lands.trk', index=15
[Fri Dec 29 20:07:30 2017] I:   Found '/usr/share/dustrac/levels/Figure 8.trk', index=12
[Fri Dec 29 20:07:30 2017] I:   Found '/usr/share/dustrac/levels/infinity.trk', index=0
[Fri Dec 29 20:07:30 2017] I:   Found '/usr/share/dustrac/levels/monza.trk', index=3
[Fri Dec 29 20:07:30 2017] I:   Found '/usr/share/dustrac/levels/Radiator.trk', index=17
[Fri Dec 29 20:07:30 2017] I:   Found '/usr/share/dustrac/levels/ring.trk', index=9
[Fri Dec 29 20:07:30 2017] I:   Found '/usr/share/dustrac/levels/straight.trk', index=7
[Fri Dec 29 20:07:30 2017] I:   Found '/usr/share/dustrac/levels/suzuka.trk', index=11
[Fri Dec 29 20:07:30 2017] I:   Found '/usr/share/dustrac/levels/triangle.trk', index=5
[Fri Dec 29 20:07:30 2017] I:   Found '/usr/share/dustrac/levels/Twineburg.trk', index=18
[Fri Dec 29 20:07:30 2017] I:   Found '/usr/share/dustrac/levels/twister.trk', index=10
[Fri Dec 29 20:07:30 2017] I:   Found '/usr/share/dustrac/levels/Western Valley.trk', index=16
[Fri Dec 29 20:07:30 2017] I: Loading race tracks from '/home/steam/DustRacingTracks'..
[Fri Dec 29 20:07:30 2017] I:   No race tracks found.
[Fri Dec 29 20:07:30 2017] I: A total of 15 race track(s) loaded.

Choose car color and starting number

I suggest to allow players to choose their own color and starting number (the number written on the top of the car). This should work for player 2 as well.

For the starting number, the player can select a number between 1 and 11.

The colors and numbers of the computer cars need to be changed automatically.

Can teleport from lower to upper side of bridge when driving towards ramp from inside

It is possible to drive through the little ramp of the bridge when your car is under the bridge.

How to reproduce:

  • Drive under a bridge, facing the way of the road below the bridge
  • While being under the bridge, make a 90° turn
  • Drive forwards

EXPECTED:

  • You collide at roughly the point where the bridge ramp starts

ACTUAL:

  • You drive through the little ramp of the bridge and teleport to the upper side of the bridge

Tested in version 2.0.1.

Convert Game to metric Units

This is a follow up of #61

@juzzlin wrote:

I would probably do it so that the scene and surface data is converted to meters when it's being loaded. So, everything in MCObject and MCPhysicsComponent etc would be in meters. Then convert back to scene coordinates only when rendering. This could still be a lot of work to fix all side-effects, but would be clear enough.

Lot of blank space in windowed and fullscreen

When launching the game on Kubuntu 18.04 (Intel NUC i5) there's a lot of blank/black space to the right and above of the game and the cursor appears to be offset too.

Output when launching the game:

[Sat May 19 10:02:19 2018] I: Dust Racing 2D version 2.0.1
[Sat May 19 10:02:19 2018] I: Compiled against Qt version 5.9.3
[Sat May 19 10:02:19 2018] I: Creating game object..
[Sat May 19 10:02:19 2018] W: Failed to load translations for en_GB
[Sat May 19 10:02:19 2018] I: Resolution: 1920 1080 0
[Sat May 19 10:02:19 2018] I: Creating the renderer..
[Sat May 19 10:02:19 2018] I: OpenGL Version: 3.0 Mesa 18.0.0-rc5
[Sat May 19 10:02:19 2018] I: Loading font /usr/share/games/dustracing2d//fonts/DejaVuSans-Bold.ttf..
[Sat May 19 10:02:19 2018] I: Loaded font DejaVu Sans
[Sat May 19 10:02:19 2018] I: Font slot size: 71x80
[Sat May 19 10:02:19 2018] I: Font texture size (initial): 568x1200
[Sat May 19 10:02:19 2018] I: Loading surface config from '/usr/share/games/dustracing2d//surfaces.conf'..
[Sat May 19 10:02:19 2018] I: Sound device: OpenAL Soft
[Sat May 19 10:02:20 2018] I: Loading mesh config from '/usr/share/games/dustracing2d//meshes.conf'..
[Sat May 19 10:02:20 2018] I: Loading race tracks from '/usr/share/games/dustracing2d//levels'..
[Sat May 19 10:02:20 2018] I: Found '/usr/share/games/dustracing2d//levels/curvastone.trk', index=8
[Sat May 19 10:02:20 2018] I: Found '/usr/share/games/dustracing2d//levels/Desert Storm.trk', index=13
[Sat May 19 10:02:20 2018] I: Found '/usr/share/games/dustracing2d//levels/Diamond.trk', index=14
[Sat May 19 10:02:20 2018] I: Found '/usr/share/games/dustracing2d//levels/Far Lands.trk', index=15
[Sat May 19 10:02:20 2018] I: Found '/usr/share/games/dustracing2d//levels/Figure 8.trk', index=12
[Sat May 19 10:02:20 2018] I: Found '/usr/share/games/dustracing2d//levels/infinity.trk', index=0
[Sat May 19 10:02:20 2018] I: Found '/usr/share/games/dustracing2d//levels/monza.trk', index=3
[Sat May 19 10:02:20 2018] I: Found '/usr/share/games/dustracing2d//levels/Radiator.trk', index=17
[Sat May 19 10:02:20 2018] I: Found '/usr/share/games/dustracing2d//levels/ring.trk', index=9
[Sat May 19 10:02:20 2018] I: Found '/usr/share/games/dustracing2d//levels/straight.trk', index=7
[Sat May 19 10:02:20 2018] I: Found '/usr/share/games/dustracing2d//levels/suzuka.trk', index=11
[Sat May 19 10:02:20 2018] I: Found '/usr/share/games/dustracing2d//levels/triangle.trk', index=5
[Sat May 19 10:02:20 2018] I: Found '/usr/share/games/dustracing2d//levels/Twineburg.trk', index=18
[Sat May 19 10:02:20 2018] I: Found '/usr/share/games/dustracing2d//levels/twister.trk', index=10
[Sat May 19 10:02:20 2018] I: Found '/usr/share/games/dustracing2d//levels/Western Valley.trk', index=16
[Sat May 19 10:02:20 2018] I: Loading race tracks from '/home/allywilson/DustRacingTracks'..
[Sat May 19 10:02:20 2018] I: No race tracks found.
[Sat May 19 10:02:20 2018] I: A total of 15 race track(s) loaded.
[Sat May 19 10:02:25 2018] I: Easy selected.
[Sat May 19 10:02:28 2018] I: 3 laps selected.
[Sat May 19 10:02:33 2018] I: Particle renderer using VAO.
[Sat May 19 10:06:16 2018] I: Quit selected from the main menu.

Screenshot: https://imgur.com/a/e1utwaD

EDIT: Changing resolution, FPS, Vsync make no difference, it just scales along.

New menu graphics

Current menu graphics (especially background images) are very bad. New, more modern ones needed.

Problematic license of Ubuntu font

Currently (as of 1.13.0) Dist Racing 2D embeds a copy of the Ubuntu fonts in data/fonts; they were added with commit 2c9fc33, used in commit cd8203e (so since version 1.6.1).

While working on getting Dust Racing 2D packaged for Debian, I spotted this detail, and a related discussion related to the packaging of the Ubuntu font for Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603157 ("main" there refers to the "main" section of the Debian archive, where all the software complies with the DFSG [1] -- in particular, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603157#30 (by one of the Debian FTP-Masters, i.e. the group accepts/removes packages from the Debian archive, among the other things).
Long story short, the Ubuntu font is deemed non-free, because:

  • the preferred form of modification is a data file of a Commercial software (which alone would still allow the font as part of the "contrib" section of the Debian archive)
  • issues with the license itself

On top of this, the license of the Ubuntu font is not mentioned anywere in the sources, and the license itself [2] requires its text to be provided with the font:

  1. Each copy of the Font Software must contain the above copyright notice and this licence. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.

(This could be fixed easily by including a full copy of the license, next to the fonts.)

Thus my request is to switch away from the Ubuntu font, and either not enforce any particular monospaced font (relying on the system default font), or use a free font (for example DejaVu [3], widely available in distributions).

[1] https://www.debian.org/social_contract.en.html#guidelines
[2] http://font.ubuntu.com/licence/
[3] https://dejavu-fonts.github.io/

Segmentation fault on game launch

I installed version 1.11.0 from the AUR under Manjaro Linux. When I run dustrac-game from a terminal, I get the following output:

[Thu Apr 30 23:24:47 2015] I: Dust Racing 2D version 1.11.0
[Thu Apr 30 23:24:47 2015] I: Compiled against Qt version 5.4.1
[Thu Apr 30 23:24:47 2015] I: Failed to load translations for C
[Thu Apr 30 23:24:47 2015] I: Creating game object..
[Thu Apr 30 23:24:47 2015] I: Resolution: 1920 1080 1
[Thu Apr 30 23:24:47 2015] I: Creating the renderer..
[Thu Apr 30 23:24:48 2015] I: OpenGL Version: 3.0 Mesa 10.5.3
[Thu Apr 30 23:24:48 2015] I: Loading font ./data/fonts/UbuntuMono-R.ttf..
QIODevice::read: device not open
[Thu Apr 30 23:24:48 2015] W: Failed to load font ./data/fonts/UbuntuMono-R.ttf..
[Thu Apr 30 23:24:48 2015] I: Loading font ./data/fonts/UbuntuMono-B.ttf..
QIODevice::read: device not open
[Thu Apr 30 23:24:48 2015] W: Failed to load font ./data/fonts/UbuntuMono-B.ttf..
[Thu Apr 30 23:24:48 2015] I: Font texture size: 240x960                                                                                                        
[Thu Apr 30 23:24:48 2015] I: Loading surface config from './data/surfaces.conf'..                                                                              
[Thu Apr 30 23:24:48 2015] F: Parsing './data/surfaces.conf' failed!                                                                                            
[Thu Apr 30 23:24:48 2015] F: Initializing the game failed!                                                                                                     
Segmentation fault (core dumped)

Improvement of Physics

Hi,
great Game, just played it half an hour! 👍
Thank you very much for providing such a great content.

Is there anything we can do about the physics of the car? It feels like driving a front motor car with rear wheels drive and 70/30 percent weight distribution between front and rear.

Would love to have a 4 wheel drive with balanced weight distribution :)

Greets, Karl

(v2.0.1 from the ubuntu repo on linux mint)

Problems with Qt5LinguistToolsConfig.cmake

I have problems with compiling the project as described.

I'm running Linux Mint 19 with Qt 5.9.5. I tried

  mkdir build
  cd build
  cmake ..

Which results in this output:

-- Compiling for OpenGL 2.1
-- Using QOpenGLFunctions
CMake Error at CMakeLists.txt:93 (find_package):
  By not providing "FindQt5LinguistTools.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5LinguistTools", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5LinguistTools"
  (requested version 5.4.0) with any of the following names:

    Qt5LinguistToolsConfig.cmake
    qt5linguisttools-config.cmake

  Add the installation prefix of "Qt5LinguistTools" to CMAKE_PREFIX_PATH or
  set "Qt5LinguistTools_DIR" to a directory containing one of the above
  files.  If "Qt5LinguistTools" provides a separate development package or
  SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!
See also "/home/karl/git/DustRacing2D/build/CMakeFiles/CMakeOutput.log".

Also opening the CMakeList.txt or game.pro in Qt Creator didn't succeed to build.

Any help would be appreciated.

Pit stop spam

On 4ab1583, the game sometimes spams the message log with “pit stop” messages when I stop in the pit stop.

I have played around with this a bit. It seems the message appears each time my car reaches 0 km/h. If I start/stop/etc. the car on the pit stop field, I can reliably reproduce the message spam.

I suggest the game should not attempt to repair the car if it is in perfect condition.

“BRAKE!” sign is untranslated

Tracks can have a red sign that says “BRAKE!”. This text is always in English and cannot be translated.

So it shows up in English in other languages as well.

I have 2 possible ideas on how to solve this:

1: Use a pictogram instead of written text
2: Allow to translate the text, then autogenerate the image from translation file

Crash on exit on FreeBSD

#0  0x0000000801d34ef4 in QOpenGLContext::shareGroup () from /usr/local/lib/libQt5Gui.so.5
#1  0x0000000801fbfd1d in QOpenGLExtensions::flushShared () from /usr/local/lib/libQt5Gui.so.5
#2  0x0000000801fb6b45 in QOpenGLExtensions::flushShared () from /usr/local/lib/libQt5Gui.so.5
#3  0x0000000801f7bbfb in QOpenGLFunctions::initializeOpenGLFunctions () from /usr/local/lib/libQt5Gui.so.5
#4  0x000000000054677f in QOpenGLFunctions::glDeleteProgram (this=0x808db4f88, program=19) at qopenglfunctions.h:1310
#5  0x0000000000542913 in ~MCGLShaderProgram (this=0x808db4f80) at /usr/work/tmp/dustrac/work/DustRacing2D-1.12.0/src/game/MiniCore/Graphics/mcglshaderprogram.cc:128
#6  0x00000000005428c9 in ~MCGLShaderProgram (this=0x808db4f80) at /usr/work/tmp/dustrac/work/DustRacing2D-1.12.0/src/game/MiniCore/Graphics/mcglshaderprogram.cc:127
#7  0x000000000049252c in std::__1::__shared_ptr_pointer<MCGLShaderProgram*, std::__1::default_delete<MCGLShaderProgram>, std::__1::allocator<MCGLShaderProgram> >::__on_zero_shared (this=0x8204209c0) at memory:2431
#8  0x00000008027326ec in std::__1::__shared_weak_count::__release_shared () from /usr/lib/libc++.so.1
#9  0x000000000042610f in ~shared_ptr (this=0x820430e28) at memory:4462
#10 0x0000000000493435 in ~pair (this=0x820430e10) at utility:248
#11 0x00000000004933a3 in std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<MCGLShaderProgram> >, std::__1::__unordered_map_hasher<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<MCGLShaderProgram> >, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, true>, std::__1::__unordered_map_equal<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<MCGLShaderProgram> >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, true>, std::__1::allocator<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<MCGLShaderProgram> > > >::__deallocate (this=0x808ce8b90, __np=0x820430e00) at unordered_map:565
#12 0x00000000004931ad in ~__hash_table (this=0x808ce8b90) at __hash_table:1283
#13 0x000000000048b945 in ~unordered_map (this=0x808ce8b90) at unordered_map:713
#14 0x000000000048b8cf in ~Renderer (this=0x808ce8b40) at /usr/work/tmp/dustrac/work/DustRacing2D-1.12.0/src/game/renderer.cpp:391
#15 0x000000000048b699 in ~Renderer (this=0x808ce8b40) at /usr/work/tmp/dustrac/work/DustRacing2D-1.12.0/src/game/renderer.cpp:390
#16 0x000000000044f9b5 in ~Game (this=0x7fffffffe3d0) at /usr/work/tmp/dustrac/work/DustRacing2D-1.12.0/src/game/game.cpp:363
#17 0x000000000045f19e in main (argc=1, argv=0x7fffffffe8e8) at /usr/work/tmp/dustrac/work/DustRacing2D-1.12.0/src/game/main.cpp:114

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.