peteb / tankage

Multiplayer 2D tank game; drive around in a mutable world together with friends
10 stars 2 forks source link

inconvenient resource (data) location #24

Closed kskels closed 13 years ago

kskels commented 13 years ago

The game is using relative path to resources which are not working in deployment of the game..

I did put the game in /usr/games and resources in /usr/share/snail-wail/data. Then game is in global path and relative location is not convenient anymore.. Maybe we can make this optional? If data are not fount in relative path we could try to look in the /usr/share/snail-wail/data?

kaspars@kaspars-laptop:~/Projects/Snail-Wail$ game glfw: registering interfaces... glfw: initialized glfw: window opened terminate called after throwing an instance of 'std::runtime_error' what(): devil: failed to load image '../data/snail_l.png': 1290, Aborted

peteb commented 13 years ago

I dunno. I think there should be a RESOURCE_PATH or something defined in the game, which can be different for different platforms. Maybe it should be a compile-time variable. Hm. Or maybe it should be set by the "starter" module, in this case glfw.

peteb commented 13 years ago

after some thinking, I think this should be defined by a "system profile", which is something that will describe characteristics of the system. Stuff like how many particles that can be visible at the same time, etc. and maybe the resource path.

kskels commented 13 years ago

I like system profile :)

kskels commented 13 years ago

I would say this is fixed for Linux..

peteb commented 13 years ago

Yeah, we close this one :)