SolarLune / resolv

A Simple 2D Golang collision detection and resolution library for games
MIT License
451 stars 42 forks source link

Use Ebiten game engine as your example. #9

Closed einthusan closed 3 years ago

einthusan commented 3 years ago

You should include an example for Ebiten, and maybe even use that as your default example. Ebiten is a game engine developed entirely in Go with good follower base and very active development by the lead developer. When I try to download your package using "go get", it shows all kinda of messages/errors relating to external dependencies in your examples for raylib and sdl2.

# pkg-config --cflags  -- sdl2
Package sdl2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sdl2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sdl2' found
pkg-config: exit status 1

# github.com/gen2brain/raylib-go/raylib
In file included from raudio.c:208:
../../gen2brain/raylib-go/raylib/external/jar_xm.h:620:9: warning: 'ALIGN' macro redefined [-Wmacro-redefined]
/usr/include/i386/param.h:83:9: note: previous definition is here
einthusan commented 3 years ago

okay, found out what the problem is. Your package is not "go get github.com/SolarLune/resolv" as your documentation refers to as. It is missing another "/resolv" at the end because of the way you've structured your repo tree. I recommend you moving your examples into a folder called "examples" where main.go will reside for various examples. Move your actual package to the top level. This is the standard way of doing it. My code should say "import github.com/SolarLune/resolv" and not "import github.com/SolarLune/resolv/resolv" as you currently have.

tslocum commented 3 years ago

I've opened #11 restructuring the layout.

SolarLune commented 3 years ago

Hello, the examples use ebiten now. Thanks for the suggestion~!