Coder Social home page Coder Social logo

mgerdes / open-golf Goto Github PK

View Code? Open in Web Editor NEW
1.8K 17.0 82.0 151.77 MB

A cross-platform minigolf game written in C.

License: MIT License

C 84.94% HTML 0.22% GLSL 7.00% CMake 7.76% Shell 0.07% Batchfile 0.01%
minigolf game gamedev c game-development game-dev android ios

open-golf's Introduction

Open Golf

A cross-platform minigolf game written in C.

Platforms

Info

Image

  • Used the Sokol libraries to create a cross platform application with 3D graphics and audio.
  • Wrote the Physics code to handle collision detection and collision response for the golf ball.
  • Used ImGui to create in games tools for fast iteration. Also created an in game-editor that can be used to modify the terrain of a hole and then quickly play to get fast feedback. The game-editor can also run scripts to generate the points and faces of more interesting models. Image
  • Used the library Lightmapper to generate lightmaps for the terrain and also xatlas to generate lightmap UVs. These lightmaps are then baked into the files for the courses. It can also interpolate between multiple samples to create lightmaps for some moving objects. Image Image

Building

Windows

  • To compile run build\build-win64.bat

  • To start the game run out\win64\golf.exe

  • This also creates out\win64\golf.sln which can be opened in Visual Studio to compile / run everything

Linux

  • To compile run ./build/build-linux.sh

  • To start the game run out/linux/golf

OSX

  • To compile run ./build/build-osx.sh

  • To start the game run out/osx/golf

3rd Party Libraries

open-golf's People

Contributors

geoffbeier avatar mgerdes 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

open-golf's Issues

Share your best moves

I really like your game.
When you make a great shot, you are very happy but you can't share it, it's a bit frustrating I think.
A way to make the game known in a viral way would be to share your best moves on social networks for example.
If the game recorded the games and allowed the player to share them when he is satisfied with his move for example:

golf.mp4

Android: wrong position of clicks

Phone: Samsung M31
Play store release (mar 22?)

When I click on play button, nothong happens.
When I click inch or so above, level selection starts.

I can scroll level list in higher location than window suggests.
Tap area for level selection also higher than it should be.

I cannot find point to hit a ball, I can only rotate camera around.

I think this is related to DPI or rotation, but no idea how to fix or work around it.

Flatpak package?

Hi! Are there any plans to provide a Flatpak package of Open Golf? It would make it easier to install on Linux. It could also be nice to have it published on Flathub, which would make it available in the default store apps of many Linux distributions.

Feature: Quick-Retry

I have a lot of fun playing the game (iOS), but one thing I've noticed: retry is a bit slow. When hunting for the best scores, you retry a lot and two things become frustrating:

  1. The pause button to access retry is only triggered when the ball has stopped rolling.
  2. The unskippable intro camera movement plays again upon retry and makes the player wait.

It would be nice if retry was as quick as hitting an out of bounds object.

Mute sound

Add a button to mute the sound while playing.

Build error on macOS

Following your build instructions, I get an error with sokol. I think it wants to have a gfx option defined somewhere:

$ build/build-osx.sh
-- The C compiler identification is AppleClang 13.0.0.13000029
-- The CXX compiler identification is AppleClang 13.0.0.13000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/rblath/Projects/GitHub/Open-Golf/out/osx
[ 1%] Building CXX object src/3rd_party/cimgui/imgui/CMakeFiles/imgui.dir/imgui.cpp.o
[ 3%] Building CXX object src/3rd_party/cimgui/imgui/CMakeFiles/imgui.dir/imgui_demo.cpp.o
[ 4%] Building CXX object src/3rd_party/cimgui/imgui/CMakeFiles/imgui.dir/imgui_draw.cpp.o
[ 6%] Building CXX object src/3rd_party/cimgui/imgui/CMakeFiles/imgui.dir/imgui_tables.cpp.o
[ 7%] Building CXX object src/3rd_party/cimgui/imgui/CMakeFiles/imgui.dir/imgui_widgets.cpp.o
[ 9%] Linking CXX static library libimgui.a
[ 9%] Built target imgui
[ 10%] Building CXX object src/3rd_party/cimgui/CMakeFiles/cimgui.dir/cimgui.cpp.o
[ 12%] Linking CXX static library libcimgui.a
[ 12%] Built target cimgui
[ 13%] Building C object src/3rd_party/fast_obj/CMakeFiles/fast_obj.dir/fast_obj.c.o
[ 15%] Linking C static library libfast_obj.a
[ 15%] Built target fast_obj
[ 16%] Building C object src/3rd_party/glad/CMakeFiles/glad.dir/glad.c.o
[ 18%] Linking C static library libglad.a
[ 18%] Built target glad
[ 19%] Building C object src/3rd_party/glfw/CMakeFiles/glfw.dir/src/context.c.o
[ 21%] Building C object src/3rd_party/glfw/CMakeFiles/glfw.dir/src/init.c.o
[ 22%] Building C object src/3rd_party/glfw/CMakeFiles/glfw.dir/src/input.c.o
[ 24%] Building C object src/3rd_party/glfw/CMakeFiles/glfw.dir/src/monitor.c.o
[ 25%] Building C object src/3rd_party/glfw/CMakeFiles/glfw.dir/src/platform.c.o
[ 27%] Building C object src/3rd_party/glfw/CMakeFiles/glfw.dir/src/vulkan.c.o
[ 28%] Building C object src/3rd_party/glfw/CMakeFiles/glfw.dir/src/window.c.o
[ 30%] Building C object src/3rd_party/glfw/CMakeFiles/glfw.dir/src/egl_context.c.o
[ 31%] Building C object src/3rd_party/glfw/CMakeFiles/glfw.dir/src/osmesa_context.c.o
[ 33%] Building C object src/3rd_party/glfw/CMakeFiles/glfw.dir/src/null_init.c.o
[ 34%] Building C object src/3rd_party/glfw/CMakeFiles/glfw.dir/src/null_monitor.c.o
[ 36%] Building C object src/3rd_party/glfw/CMakeFiles/glfw.dir/src/null_window.c.o
[ 37%] Building C object src/3rd_party/glfw/CMakeFiles/glfw.dir/src/null_joystick.c.o
[ 39%] Linking C static library libglfw.a
[ 39%] Built target glfw
[ 40%] Building C object src/3rd_party/lightmapper/CMakeFiles/lightmapper.dir/impl.c.o
[ 42%] Linking C static library liblightmapper.a
[ 42%] Built target lightmapper
[ 43%] Building C object src/3rd_party/mattiasgustavsson_libs/CMakeFiles/mattiasgustavsson_libs.dir/impl.c.o
[ 45%] Linking C static library libmattiasgustavsson_libs.a
[ 45%] Built target mattiasgustavsson_libs
[ 46%] Building C object src/3rd_party/miniz/CMakeFiles/miniz.dir/miniz.c.o
[ 48%] Linking C static library libminiz.a
[ 48%] Built target miniz
[ 50%] Building C object src/3rd_party/parson/CMakeFiles/parson.dir/parson.c.o
[ 51%] Linking C static library libparson.a
[ 51%] Built target parson
[ 53%] Building C object src/3rd_party/sokol/CMakeFiles/sokol.dir/impl.c.o
In file included from /Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/impl.c:4:
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:2421:2: error: "Please select a backend with SOKOL_GLCORE33, SOKOL_GLES2, SOKOL_GLES3, SOKOL_D3D11, SOKOL_METAL, SOKOL_WGPU or SOKOL_DUMMY_BACKEND"
#error "Please select a backend with SOKOL_GLCORE33, SOKOL_GLES2, SOKOL_GLES3, SOKOL_D3D11, SOKOL_METAL, SOKOL_WGPU or SOKOL_DUMMY_BACKEND"
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:3895:5: error: unknown type name '_sg_buffer_t'; did you mean 'sg_buffer'?
_sg_buffer_t* buffers;
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:628:45: note: 'sg_buffer' declared here
typedef struct sg_buffer { uint32_t id; } sg_buffer;
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:3896:5: error: unknown type name '_sg_image_t'; did you mean 'sg_image'?
_sg_image_t* images;
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:629:45: note: 'sg_image' declared here
typedef struct sg_image { uint32_t id; } sg_image;
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:3897:5: error: unknown type name '_sg_shader_t'; did you mean 'sg_shader'?
_sg_shader_t* shaders;
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:630:45: note: 'sg_shader' declared here
typedef struct sg_shader { uint32_t id; } sg_shader;
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:3898:5: error: unknown type name '_sg_pipeline_t'; did you mean 'sg_pipeline'?
_sg_pipeline_t* pipelines;
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:631:45: note: 'sg_pipeline' declared here
typedef struct sg_pipeline { uint32_t id; } sg_pipeline;
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:3899:5: error: unknown type name '_sg_pass_t'
_sg_pass_t* passes;
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:3900:5: error: unknown type name '_sg_context_t'; did you mean 'sg_context'?
_sg_context_t* contexts;
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:633:45: note: 'sg_context' declared here
typedef struct sg_context { uint32_t id; } sg_context;
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:12715:6: error: ("INVALID BACKEND");
#error("INVALID BACKEND");
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:12731:6: error: ("INVALID BACKEND");
#error("INVALID BACKEND");
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:12747:6: error: ("INVALID BACKEND");
#error("INVALID BACKEND");
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:12751:41: error: unknown type name '_sg_context_t'; did you mean 'sg_context'?
static inline void _sg_activate_context(_sg_context_t* ctx) {
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:633:45: note: 'sg_context' declared here
typedef struct sg_context { uint32_t id; } sg_context;
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:12763:6: error: ("INVALID BACKEND");
#error("INVALID BACKEND");
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:12767:52: error: unknown type name '_sg_context_t'; did you mean 'sg_context'?
static inline sg_resource_state _sg_create_context(_sg_context_t* ctx) {
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:633:45: note: 'sg_context' declared here
typedef struct sg_context { uint32_t id; } sg_context;
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:12779:6: error: ("INVALID BACKEND");
#error("INVALID BACKEND");
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:12783:40: error: unknown type name '_sg_context_t'; did you mean 'sg_context'?
static inline void _sg_destroy_context(_sg_context_t* ctx) {
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:633:45: note: 'sg_context' declared here
typedef struct sg_context { uint32_t id; } sg_context;
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:12795:6: error: ("INVALID BACKEND");
#error("INVALID BACKEND");
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:12799:51: error: unknown type name '_sg_buffer_t'; did you mean 'sg_buffer'?
static inline sg_resource_state _sg_create_buffer(_sg_buffer_t* buf, const sg_buffer_desc* desc) {
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:628:45: note: 'sg_buffer' declared here
typedef struct sg_buffer { uint32_t id; } sg_buffer;
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:12811:6: error: ("INVALID BACKEND");
#error("INVALID BACKEND");
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:12815:39: error: unknown type name '_sg_buffer_t'; did you mean 'sg_buffer'?
static inline void _sg_destroy_buffer(_sg_buffer_t* buf) {
^
/Users/rblath/Projects/GitHub/Open-Golf/src/3rd_party/sokol/sokol_gfx.h:628:45: note: 'sg_buffer' declared here
typedef struct sg_buffer { uint32_t id; } sg_buffer;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [src/3rd_party/sokol/CMakeFiles/sokol.dir/impl.c.o] Error 1
make[1]: *** [src/3rd_party/sokol/CMakeFiles/sokol.dir/all] Error 2
make: *** [all] Error 2

Can't control the ball

This is from level 7, when i move my ball to this position then the ball keep being pushed by the water and the wall so that i can't control it.
I love the game and some how this inspire my a lot. Thanks

video.mp4

Show best score for each hole

On Android (haven't tried other platforms) the best score for each hole is displayed on the menu screen. However when playing through the game, there's no indication of what the current best score is for each hole. I think this'd be handy as it'd allow you to see what score you need to beat on subsequent playthroughs.

Crashes when releasing ball

I can build and run the app, but when I release the mouse to launch the ball the app crashes.

Here's a backtrace

/opt/open-golf » gdb out/linux/golf                        walter@willow
GNU gdb (GDB) 11.2
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from out/linux/golf...
(No debugging symbols found in out/linux/golf)
(gdb) run
Starting program: /opt/open-golf/out/linux/golf 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffecf86640 (LWP 33187)]
[New Thread 0x7fffe7fff640 (LWP 33188)]
[New Thread 0x7fffe75b5640 (LWP 33189)]
Loading file data/static_data.static_data, count: 1
Loading file data/models/ui_square.obj, count: 1
Loading file data/models/cube.obj, count: 1
Loading file data/models/render_image_square.obj, count: 1
Loading file data/models/editor/ball_start.obj, count: 1
Loading file data/models/golf_ball.obj, count: 1
Loading file data/textures/golf_ball_normal_map.jpg, count: 1
Loading file data/textures/fallback.png, count: 1
Loading file data/textures/colors/white.png, count: 1
Loading file data/textures/colors/black.png, count: 1
Loading file data/textures/colors/red.png, count: 1
Loading file data/textures/colors/yellow.png, count: 1
Loading file data/textures/aimer.png, count: 1
Loading file data/textures/arrow.png, count: 1
Loading file data/textures/water_noise_1.png, count: 1
Loading file data/textures/water_noise_2.png, count: 1
Loading file data/textures/water_noise_3.png, count: 1
[New Thread 0x7fffe5f85640 (LWP 33190)]
[New Thread 0x7fffe5784640 (LWP 33191)]
[New Thread 0x7fffe4ed6640 (LWP 33192)]
Loading file data/audio/confirmation_002.ogg, count: 1
Loading file data/audio/drop_001.ogg, count: 1
Loading file data/audio/drop_003.ogg, count: 1
Loading file data/audio/error_008.ogg, count: 1
Loading file data/audio/footstep_grass_004.ogg, count: 1
Loading file data/audio/impactPlank_medium_000.ogg, count: 1
Loading file data/audio/in_water.ogg, count: 1
Loading file data/shaders/diffuse_color_material.glsl, count: 1
Loading file data/shaders/environment_material.glsl, count: 1
Loading file data/shaders/pass_through.glsl, count: 1
Loading file data/shaders/solid_color_material.glsl, count: 1
Loading file data/shaders/texture_material.glsl, count: 1
Loading file data/shaders/render_image.glsl, count: 1
Loading file data/shaders/fxaa.glsl, count: 1
Loading file data/shaders/ui.glsl, count: 1
Loading file data/shaders/aim_line.glsl, count: 1
Loading file data/shaders/ball.glsl, count: 1
Loading file data/shaders/editor_water.glsl, count: 1
Loading file data/shaders/water.glsl, count: 1
Loading file data/shaders/water_around_ball.glsl, count: 1
Loading file data/shaders/water_ripple.glsl, count: 1
Loading file data/shaders/ball_hidden.glsl, count: 1
Loading file data/levels/level-1.level, count: 1
Loading file data/textures/hole_lightmap.png, count: 1
Loading file data/models/hole.obj, count: 1
Loading file data/models/hole-cover.obj, count: 1
Loading file data/models/sphere.obj, count: 1
Loading file data/textures/wood.jpg, count: 1
Loading file data/textures/ground.png, count: 1
Loading file data/textures/colors/light_gray.png, count: 1
Loading file data/textures/colors/red.png, count: 2
Loading file data/textures/environment/grass_dark.jpg, count: 1
Loading file data/textures/environment/soil1_dark.jpg, count: 1
Loading file data/textures/environment/wood.jpg, count: 1
Loading file data/textures/environment/wood_dark.jpg, count: 1
Loading file data/textures/ground_spinner_platform.png, count: 1
Loading file data/textures/ground_mover_platform.png, count: 1
Loading file data/models/flag_red.obj, count: 1
Loading file data/models/nature_kit/platform_grass.obj, count: 1
Loading file data/models/nature_kit/tree_pineTallA.obj, count: 1
Loading file data/models/nature_kit/tree_pineDefaultA.obj, count: 1
Loading file data/models/nature_kit/tree_pineRoundA.obj, count: 1
Loading file data/models/nature_kit/tree_pineSmallB.obj, count: 1
Loading file data/models/nature_kit/tree_pineRoundD.obj, count: 1
Loading file data/models/nature_kit/tree_pineTallD_detailed.obj, count: 1
Loading file data/models/nature_kit/tree_pineRoundF.obj, count: 1
Loading file data/config/game.cfg, count: 1
Loading file data/ui/ui.ui, count: 1
Loading file data/textures/colors/white.png, count: 2
Loading file data/textures/loading.gif, count: 1
Loading file data/font/FiraSans-Bold.ttf, count: 1
Loading file data/textures/pixel_pack.pixel_pack, count: 1
Loading file data/textures/pixel_pack_tex.png, count: 1
Loading file data/font/Castle-Rock.ttf, count: 1
Loading file data/textures/ui_icons/locked.png, count: 1
Loading file data/textures/ui_icons/pause.png, count: 1
Loading file data/textures/ui_icons/pointer.png, count: 1
Unloading file data/levels/level-1.level
Unloading file data/textures/hole_lightmap.png
Unloading file data/models/hole.obj
Unloading file data/models/hole-cover.obj
Unloading file data/models/sphere.obj
Unloading file data/textures/wood.jpg
Unloading file data/textures/ground.png
Unloading file data/textures/colors/light_gray.png
Unloading file data/textures/colors/red.png
Unloading file data/textures/environment/grass_dark.jpg
Unloading file data/textures/environment/soil1_dark.jpg
Unloading file data/textures/environment/wood.jpg
Unloading file data/textures/environment/wood_dark.jpg
Unloading file data/textures/ground_spinner_platform.png
Unloading file data/textures/ground_mover_platform.png
Unloading file data/models/flag_red.obj
Unloading file data/models/nature_kit/platform_grass.obj
Unloading file data/models/nature_kit/tree_pineTallA.obj
Unloading file data/models/nature_kit/tree_pineDefaultA.obj
Unloading file data/models/nature_kit/tree_pineRoundA.obj
Unloading file data/models/nature_kit/tree_pineSmallB.obj
Unloading file data/models/nature_kit/tree_pineRoundD.obj
Unloading file data/models/nature_kit/tree_pineTallD_detailed.obj
Unloading file data/models/nature_kit/tree_pineRoundF.obj
Loading file data/levels/level-3.level, count: 1
Loading file data/textures/hole_lightmap.png, count: 1
Loading file data/models/hole.obj, count: 1
Loading file data/models/hole-cover.obj, count: 1
Loading file data/models/sphere.obj, count: 1
Loading file data/textures/wood.jpg, count: 1
Loading file data/textures/ground.png, count: 1
Loading file data/textures/colors/black.png, count: 2
Loading file data/textures/colors/light_gray.png, count: 1
Loading file data/textures/colors/red.png, count: 2
Loading file data/textures/environment/slab.jpg, count: 1
Loading file data/textures/environment/grass_dark.jpg, count: 1
Loading file data/textures/environment/wood.jpg, count: 1
Loading file data/textures/environment/grass.jpg, count: 1
Loading file data/textures/environment/soil1_dark.jpg, count: 1
Loading file data/textures/environment/water.jpg, count: 1
Loading file data/textures/environment/wood_dark.jpg, count: 1
Loading file data/textures/colors/dark_gray.png, count: 1
Loading file data/textures/ground_spinner_platform.png, count: 1
Loading file data/textures/ground_mover_platform.png, count: 1
Loading file data/textures/environment/grass.png, count: 1
Loading file data/textures/environment/dark_stone.jpg, count: 1
Loading file data/models/flag_red.obj, count: 1
Loading file data/models/nature_kit/platform_grass.obj, count: 1
Loading file data/models/nature_kit/tree_pineTallB_detailed.obj, count: 1
Loading file data/models/nature_kit/tree_pineRoundC.obj, count: 1
Loading file data/models/nature_kit/tree_pineDefaultA.obj, count: 1
Loading file data/models/nature_kit/tree_pineRoundA.obj, count: 1
Loading file data/models/nature_kit/tree_pineDefaultB.obj, count: 1
Loading file data/models/nature_kit/tree_pineTallB.obj, count: 1
Loading file data/models/nature_kit/tree_pineTallD.obj, count: 1
Loading file data/models/nature_kit/tree_pineGroundA.obj, count: 1
Loading file data/models/nature_kit/tree_pineTallA.obj, count: 1
Loading file data/models/nature_kit/tree_pineRoundB.obj, count: 1

Thread 1 "golf" received signal SIGSEGV, Segmentation fault.
0x00007ffff77fa692 in fwrite () from /usr/lib/libc.so.6
(gdb) backtrace
#0  0x00007ffff77fa692 in fwrite () from /usr/lib/libc.so.6
#1  0x000055555559f15f in ?? ()
#2  0x000055555556b1f3 in ?? ()
#3  0x00005555555659e9 in ?? ()
#4  0x0000555555565d34 in ?? ()
#5  0x000055555555c0ba in ?? ()
#6  0x00007ffff77ad310 in __libc_start_call_main ()
   from /usr/lib/libc.so.6
#7  0x00007ffff77ad3c1 in __libc_start_main_impl ()
   from /usr/lib/libc.so.6
#8  0x000055555555d0d5 in ?? ()
(gdb) 

I'm on Arch linux, running the latest commit of open-golf (b9029f1)
I have the app installed in /opt/open-golf/
If you need more details, let me know.

SIGSEGV when opening on Android

Launching the app (the 1.0 version from F-Droid) on an armv7l LineageOS 14.1 (Android 7.1.2) device results in an immediate SIGSEGV with only the Android crash dialog being displayed. The backtrace implies it might be some kind of audio issue.

11-13 19:53:50.630  2329 30013 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=me.mgerdes.open_golf/android.app.NativeActivity bnds=[750,608][960,846] (has extras)} from uid 10027 on display 0
11-13 19:53:50.649  2329  2343 W BroadcastQueue: Permission Denial: receiving Intent { act=com.android.launcher3.action.LAUNCH flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$GmsExternalReceiver requires com.android.launcher3.permission.RECEIVE_LAUNCH_BROADCASTS due to sender com.cyanogenmod.trebuchet (uid 10027)
11-13 19:53:50.702  2329 30015 I ActivityManager: Start proc 10245:me.mgerdes.open_golf/u0a124 for activity me.mgerdes.open_golf/android.app.NativeActivity
11-13 19:53:50.749 10245 10245 W System  : ClassLoader referenced unknown path: 
11-13 19:53:50.881 10245 10273 I Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 10/21/15, 369a2ea, I96aee987eb
11-13 19:53:50.969  2329  2352 I ActivityManager: Displayed me.mgerdes.open_golf/android.app.NativeActivity: +316ms
11-13 19:53:50.998 10245 10276 I golf    : Loading file data/static_data.static_data, count: 1
11-13 19:53:50.999 10245 10276 I golf    : Loading file data/models/ui_square.obj, count: 1
11-13 19:53:50.999 10245 10276 I golf    : Loading file data/models/cube.obj, count: 1
11-13 19:53:50.999 10245 10276 I golf    : Loading file data/models/render_image_square.obj, count: 1
11-13 19:53:51.000 10245 10276 I golf    : Loading file data/models/editor/ball_start.obj, count: 1
11-13 19:53:51.002 10245 10276 I golf    : Loading file data/models/golf_ball.obj, count: 1
11-13 19:53:51.007 10245 10276 I golf    : Loading file data/textures/golf_ball_normal_map.jpg, count: 1
11-13 19:53:51.018 10245 10276 I golf    : Loading file data/textures/fallback.png, count: 1
11-13 19:53:51.034 10245 10276 I golf    : Loading file data/textures/colors/white.png, count: 1
11-13 19:53:51.035 10245 10276 I golf    : Loading file data/textures/colors/black.png, count: 1
11-13 19:53:51.038 10245 10276 I golf    : Loading file data/textures/colors/red.png, count: 1
11-13 19:53:51.038 10245 10276 I golf    : Loading file data/textures/colors/yellow.png, count: 1
11-13 19:53:51.038 10245 10276 I golf    : Loading file data/textures/aimer.png, count: 1
11-13 19:53:51.039 10245 10276 I golf    : Loading file data/textures/arrow.png, count: 1
11-13 19:53:51.087 10245 10276 I golf    : Loading file data/textures/water_noise_1.png, count: 1
11-13 19:53:51.116  2329 30006 I ActivityManager: Process com.google.android.configupdater (pid 8248) has died
11-13 19:53:51.117  2329 30006 D ActivityManager: cleanUpApplicationRecord -- 8248
11-13 19:53:51.123 10245 10276 I golf    : Loading file data/textures/water_noise_2.png, count: 1
11-13 19:53:51.128 10245 10276 I golf    : Loading file data/textures/water_noise_3.png, count: 1
11-13 19:53:51.151  2329  3309 I ActivityManager: Process com.qualcomm.timeservice (pid 9198) has died
11-13 19:53:51.151  2329  3309 D ActivityManager: cleanUpApplicationRecord -- 9198
11-13 19:53:51.183  2329  4348 I ActivityManager: Process com.android.calendar (pid 9071) has died
11-13 19:53:51.183  2329  4348 D ActivityManager: cleanUpApplicationRecord -- 9071
11-13 19:53:51.188 10245 10273 W libOpenSLES: class OutputMix interface 0 requested but unavailable MPH=43
11-13 19:53:51.188 10245 10273 W libOpenSLES: Leaving Object::GetInterface (SL_RESULT_FEATURE_UNSUPPORTED)
11-13 19:53:51.191 10245 10273 I libOpenSLES: Emulating old channel mask behavior (ignoring positional mask 0x4, using default mask 0x1 based on channel count of 1)
11-13 19:53:51.192 10245 10273 W AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client; transfer 1, track 44100 Hz, output 48000 Hz
11-13 19:53:51.192  1825  2818 W AudioFlinger: createTrack_l(): mismatch between requested flags (00000100) and output flags (00000006)
11-13 19:53:51.192  1825  2818 E AudioMixer: AudioMixer::getTrackName out of available tracks
11-13 19:53:51.192  1825  2818 E AudioFlinger: no more track names available
11-13 19:53:51.192  1825  2818 E AudioFlinger: createTrack_l() initCheck failed -12; no control block?
11-13 19:53:51.193 10245 10273 E AudioTrack: AudioFlinger could not create track, status: -12
11-13 19:53:51.193 10245 10273 E libOpenSLES: AudioTrack::initCheck status 4294967284
11-13 19:53:51.193 10245 10273 W libOpenSLES: Leaving Object::Realize (SL_RESULT_CONTENT_UNSUPPORTED)
11-13 19:53:51.193 10245 10273 W libOpenSLES: Leaving Object::GetInterface (SL_RESULT_PRECONDITIONS_VIOLATED)
11-13 19:53:51.193 10245 10273 W libOpenSLES: Leaving Object::GetInterface (SL_RESULT_PRECONDITIONS_VIOLATED)
11-13 19:53:51.193 10245 10273 W libOpenSLES: Leaving Object::GetInterface (SL_RESULT_PRECONDITIONS_VIOLATED)
11-13 19:53:51.194 10245 10273 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 10273 (erdes.open_golf)
11-13 19:53:51.194   146   146 W         : debuggerd: handling request: pid=10245 uid=10124 gid=10124 tid=10273
11-13 19:53:51.217  2329  4518 I ActivityManager: Process com.android.deskclock (pid 4398) has died
11-13 19:53:51.217  2329  4518 D ActivityManager: cleanUpApplicationRecord -- 4398
11-13 19:53:51.271 10279 10279 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-13 19:53:51.271 10279 10279 F DEBUG   : LineageOS Version: '14.1-20210123-UNOFFICIAL-hammerhead'
11-13 19:53:51.271 10279 10279 F DEBUG   : Build fingerprint: 'google/hammerhead/hammerhead:6.0.1/M4B30Z/3437181:user/release-keys'
11-13 19:53:51.271 10279 10279 F DEBUG   : Revision: '11'
11-13 19:53:51.271 10279 10279 F DEBUG   : ABI: 'arm'
11-13 19:53:51.271 10279 10279 F DEBUG   : pid: 10245, tid: 10273, name: erdes.open_golf  >>> me.mgerdes.open_golf <<<
11-13 19:53:51.271 10279 10279 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
11-13 19:53:51.271 10279 10279 F DEBUG   :     r0 00000000  r1 9babe800  r2 97572e0e  r3 00000003
11-13 19:53:51.271 10279 10279 F DEBUG   :     r4 9b43c1f8  r5 000020a8  r6 00000001  r7 b2de4870
11-13 19:53:51.271 10279 10279 F DEBUG   :     r8 0000209c  r9 9b43c258  sl b465a008  fp 000020a0
11-13 19:53:51.271 10279 10279 F DEBUG   :     ip b2de42fc  sp b2de4800  lr b61a1771  pc 9a2903c8  cpsr 600f0030
11-13 19:53:51.281 10279 10279 F DEBUG   :
11-13 19:53:51.281 10279 10279 F DEBUG   : backtrace:
11-13 19:53:51.281 10279 10279 F DEBUG   :     #00 pc 000b23c8  /data/app/me.mgerdes.open_golf-1/lib/arm/libgolf.so (saudio_setup+767)
11-13 19:53:51.281 10279 10279 F DEBUG   :     #01 pc 000799cd  /data/app/me.mgerdes.open_golf-1/lib/arm/libgolf.so (golf_audio_init+44)
11-13 19:53:51.281 10279 10279 F DEBUG   :     #02 pc 0006e68f  /data/app/me.mgerdes.open_golf-1/lib/arm/libgolf.so
11-13 19:53:51.281 10279 10279 F DEBUG   :     #03 pc 000b9b2f  /data/app/me.mgerdes.open_golf-1/lib/arm/libgolf.so
11-13 19:53:51.281 10279 10279 F DEBUG   :     #04 pc 00047bd3  /system/lib/libc.so (_ZL15__pthread_startPv+22)
11-13 19:53:51.281 10279 10279 F DEBUG   :     #05 pc 00019cbd  /system/lib/libc.so (__start_thread+6)
11-13 19:53:51.628   146   146 W         : debuggerd: resuming target 10245
11-13 19:53:51.629  2329  2349 I BootReceiver: Copying /data/tombstones/tombstone_09 to DropBox (SYSTEM_TOMBSTONE)
11-13 19:53:51.636  2329  2349 W DropBoxManagerService: Dropping: SYSTEM_TOMBSTONE (10 > 0 bytes)
11-13 19:53:51.642  2329 10291 W ActivityManager:   Force finishing activity me.mgerdes.open_golf/android.app.NativeActivity
11-13 19:53:51.655   181   181 E lowmemorykiller: Error writing /proc/10245/oom_score_adj; errno=22
11-13 19:53:51.663  2329 10292 W DropBoxManagerService: Dropping: data_app_native_crash (1257 > 0 bytes)
11-13 19:53:51.678  2329 25753 I WindowManager: WIN DEATH: Window{7be113 u0 me.mgerdes.open_golf/android.app.NativeActivity}
11-13 19:53:51.678  2329  2341 I ActivityManager: Process me.mgerdes.open_golf (pid 10245) has died
11-13 19:53:51.678  2329  2341 D ActivityManager: cleanUpApplicationRecord -- 10245
11-13 19:53:51.705  1824  1824 I Zygote  : Process 10245 exited due to signal (11)
11-13 19:53:51.721  2329  9426 I OpenGLRenderer: Initialized EGL, version 1.4
11-13 19:53:51.721  2329  9426 D OpenGLRenderer: Swap behavior 1
11-13 19:53:52.287  3332  3438 W OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
11-13 19:53:52.287  3332  3438 W OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...

Infinite void

In the last hole, where a barrier pops up before a C-shaped loop, it's possible to hit the ball over the background mountains into an infinite void. The game doesn't continue.

Add more courses

I enjoyed the 20 courses that come with Open-Golf. After playing through all of them I would like to see 20 more.

Ball releases when finger leaves game window

One of the constant annoyances I have with this game is that when my finger is aiming the ball with maximum force, if my finger moves too far down the screen and leaves the game window, the ball releases prematurely.

I'm not sure if there's a way to fix this, or if it's by design...

Apple App Store Age Rating Incorrect

Thanks for the App. We think it's fun!

Recently the rating for this app changed to 17+ on the App Store. This seems to be incorrect. Previously my pre-teen son was able to play it on his iPhone, but now cannot because of the age restrictions. Can we get this changed? (Not sure you have any control over it...)

Thanks!

Add to F-Droid

F-Droid is a FOSS app store for Android. I suppose that your app is a good candidate to be freely released there

Great app!

This is an awesome app! Please add more levels. Its by far one of the best golf experiences on an android device.

A level editor

The game is very good, but unfortunately it's quickly over.
If players could create levels and share them it would be really great and it would increase the life of the game considerably.

A ranking of the best players

In order to increase the spirit of competition there could be some sort of ranking of the players.
For example by using the number of moves per level and the time used to complete the stroke, and the player's nickname.

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.