Closed nieknooijens closed 8 years ago
This is something I wanted to look at from the start. I might try to start on porting the windows bits of the code if I am able to get a proper development environment for it set up.
well, I see you had some external dependencies in this git repo, linux has APT so that's not needed. could you give me a basic explanation of the file tree in this repo? I guess main is the application code, but what is shared and include/shared? then there is a bin folder without binaries, but with all kinds of textures and such, something I would call "themes". like we did in performous (https://github.com/performous/performous/tree/master/data/themes/default)
Why do I need this info? well if I know how the program should be put together I can create a CMAKE-script, which will collect all the dependencies and generate a visual-studio project, code-blocks project, linux makefile, or scons-script for you. this greaty reduces the time needed to setup a development environment. If I can get the cmake script to work on my windows VM, then all that's left is ripping out the windows-specific bits.
Yeah I guess i don't need the externals on Linux but I'd still like to have them ready to go on windows without having to run an entire set of different configuration scripts for each library. So yeah "bin" is basically the working folder/output folder for binaries. The visual studio project also generates a "lib" folder in the root where all the static libraries get built to, both the external ones and the Shared library. The "Shared" library contains most stuff that is not unique to the main project (like vectors,lists,file-system API, etc.) and can also be used for separate tools later on.
Porting the windows specific stuff I can probably handle myself, the main things that need to be changed for linux are: Audio playback. Window creation + OpenGL context creation. File system functions
I don't have any experience with setting up build scripts such as CMAKE, so if you are willing to help out that would be cool. Let me know if you need to now more about anything.
for window creation and openGL context I'd advise you to take a look at SDL2 (https://libsdl.org/) it works on windows too. basically it's something like: SDL_Window * screen = SDL_CreateWindow(title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_OPENGL); SDL_GL_CreateContext(screen);
done!
Hi there!
Saw you've been working on the linux port! it's already working quite well using cmake. I wasn't able to compile it though, first I tried GCC, then I switched to clang since it has better error messages. I fixed a few of them, (including macro's shit and fpermissive errors) but not all. hope these changes help: https://github.com/nieknooijens/unnamed-sdvx-clone/commit/660f0b34ae5f9f8b55f9b1a7303de2e7955ec90e just pick the one that work and remove the ones that don't really look sensible.
I also took an attempt to compile this on Linux and was successful, of course the game doesn't work. Dies immediately with SIGABRT
after printing a message.
[Main][20:56:01][Warning] Failed to load embeded fallback font
@GhettoGirl that had to do with the folders that contains the font. you need to copy over all the folders from the bin folder to the folder your executable is in. I also had problems with the game using windows slashes () for folders. I changed them into the universal ones (/) now the game actually works!! (but no spaces allowed in folder names atm)
here's a video where you can see it in action on a linux box: https://drive.google.com/open?id=0B1EARbuGbWkfUHV2VTQ0Q1lFUm8
Allright the master branch should fully work on linux (including scanning for maps). Please let me know if you find any issues.
I have some problem with cross dependencies on ubuntu 16.04. I need libfreetype6-dev which depends on libpng-dev which depends on libpng12 (1.2). but I also need libpng16 (1.6) which conflicts with libfreetype6-dev. so when I use libpng12 I get this:
these missing function calls are probably from libpng16 which I cannot install because it breaks freetype.
@nieknooijens I suggest you this solution: Install all the required libraries somewhere into /opt
(or whatever you prefer).
I used Ubuntu 1 year for myself before I switched over to Arch. Imho Ubuntu is a shit distro, especially when it comes to packages and how packages are managed. Tons of outdated and heavily patched libraries and programs. Debian and Ubuntu is not known to ship vanilla libs/apps #justsayin'. My /opt
folder exploded and than I rage-quited to Arch. But thats over to you what distro you choose.
There is no real elegant solution to solve such ugly conflicts or workaround it.
As an start compile and install this libraries somewhere (eg: /opt
), because the ones provided by Ubuntu are outdated and heavily patched!
/opt
, instead of using the one from the Arch repos)I put all the deps the game requires into /opt/unnamed-sdvx-clone/libs
for now to ensure maximum compatibility. :wink: (will move everything over to a new location as soon as there is a name, rather than unnamed-sdvx-clone)
See CMAKE_PREFIX_PATH
to get started on how to compile the game afterwards.
Hope I could help you a bit.
@GhettoGirl I'll try that thanks.
offtopic: And the ubuntu packages stuff, TBH I use ubuntu because I'm just lazy, ubuntu's APT repo's are pretty streamlined and since it's the most widespread distro out there I usually take it as a base target. outdated libs is actually a good thing, since old binaries work on newer libs, but new binaries don't work on the old ones, so to maintain widespread compability ubuntu is the most strategic target to develop on. is it perfect? Not at all! cross compilers are a hell to set up and for embedded platforms it's often too heavy. Arch is pretty neat, in my opinion. The good things about arch are it's excellent documentation and the ability that you can setup everything yourself... the problem with arch is that you HAVE to setup everything yourself :laughing: so it just depends on what you need.
OK I have this weird WTF moment when the game compiles correctly when I just load it into my IDE instead of the command line. even on libpng12! so yeah, it compiles now on stock ubuntu with stock libs. still need to fix cmake to copy the audio fonts and shaders folders over to the cmake bin folder but i'll open up another bug for that.
Hi there
Are there any plans to port this game to linux and if so can I possibly help? I'm currently running kshootmania in wine but it's laggy as hell (and it's written in HSP)! I'd like to have something more future-proof and cross platform before I'm going to purchase one of those controllers, and this project would be perfect for that if it would run on linux.
niek