Project: Starfighter
Whoops, accidentally posted this to the Troll Hole. Re-posting here...
Remember this old game? I've started to maintain it. :)
And I've made a new release, 1.3. You'll notice that this version, unlike the original, has libre graphics, sound, and music. (Most of the work was done by the folks at http://sourceforge.net/projects/pr-starfighter/; I just completed it by adding music and replacing one set of graphics that weren't properly licensed.) Another thing you'll notice is a lot of gameplay improvements. The release announcement explains what has changed in greater detail:
https://savannah.nongnu.org/forum/forum.php?forum_id=8249
Please give it a try and let me know what you like and dislike. :)
Congratulations onpon4, I know you've been learning about 2d game development and I'm very happy you took the step to maintain a project like that :)
I will try the game eventually.
I'm happy to be the first responding you... and all thanks to the fact that I cannot sleep. Remember folks: if you sleep too much one day, don't think that you will be able to do the same the next day.
Oh, I learned 2-D game development years ago, and I've developed games before. (See from my homepage: Senso, Karate Kat, Pacewar. I've also been contributing quite a bit to Naev; the recent 0.6.0 release includes several of my contributions. And there are some others which I don't mention on my homepage because they have proprietary software dependencies, usually Game Maker; I have a separate page listing those.)
That's great! :D
Onpon continues 4's legacy.
Nice! I guess somebody should update (and perhaps rename) this https://libregamewiki.org/Starfighter
Done. :) (Renaming it to "Project Starfighter" isn't really necessary, in my opinion; "Starfighter" is a legitimate short name for the game.)
I am trying to compile the game on Trisquel 6, but it fails because I don't seem to have the right libraries installed.
~$ make
g++ -O2 -Wall -g `pkg-config --cflags sdl2 SDL2_image SDL2_mixer` -c -DVERSION=\"1.3\" -DDATADIR=\"/usr/share/games/parallelrealities/\" src/alien.cpp
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
Package SDL2_image was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL2_image.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL2_image' found
Package SDL2_mixer was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL2_mixer.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL2_mixer' found
In file included from src/alien.cpp:20:0:
src/Starfighter.h:31:17: fatal error: SDL.h: No such file or directory
compilation terminated.
make: *** [alien.o] Error 1
This doesn't give me any useful hint on which packages to install. I already have libsdl1.2-dev installed.
Thank you for continuing the development of this game. I hope to play it soon.
These would seem like good candidates
libsdl-image1.2-dev
libsdl-mixer1.2-dev
That's not right. It uses SDL2 now. The packages you need are libsdl2-dev, libsdl2-image-dev, and libsdl2-mixer-dev.
Sorry about the cryptic errors and lack of documentation. One of my goals is to replace the current hand-made Makefile with either Autoconf or CMake scripts; that should help with that.
Anyway, as I said in the other post, the packages needed are libsdl2, libsdl2-image, and libsdl2-mixer.
It looks like this software may be Trisquel 7 only. A search in Synaptic for libsdl2 returns no results.
Ah, OK.
You might still be able to get it working by compiling SDL2 yourself, though:
I compiled SDL2 according to the instructions (./configure; make; make install, the last one as root) and it apparently compiled correctly, but the compilation of Starfighter returns the same error.
Hm... what does this command return?
pkg-config --cflags sdl2 SDL2_image SDL2_mixer
This command is used by the makefile, and it generates the -I flag. If it's returning something incorrect, that would be causing the problem. (I imagine make install would have put your installation into /usr/local.)
If that's the problem, you can replace this command in the makefile with the correct -I command.
Another thought: you need the SDL2 header files. Does the configure && make && make install procedure install these, or does it just install the library itself?
~/code/SDL2-2.0.3$ pkg-config --cflags sdl2 SDL2_image SDL2_mixer
Package SDL2_image was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL2_image.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL2_image' found
Package SDL2_mixer was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL2_mixer.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL2_mixer' found
What does the -I flag do?
I found the header files in this location:
/usr/local/include/SDL2$ ls
begin_code.h SDL.h SDL_pixels.h SDL_test_compare.h
close_code.h SDL_haptic.h SDL_platform.h SDL_test_crc32.h
SDL_assert.h SDL_hints.h SDL_power.h SDL_test_font.h
SDL_atomic.h SDL_joystick.h SDL_quit.h SDL_test_fuzzer.h
SDL_audio.h SDL_keyboard.h SDL_rect.h SDL_test.h
SDL_bits.h SDL_keycode.h SDL_render.h SDL_test_harness.h
SDL_blendmode.h SDL_loadso.h SDL_revision.h SDL_test_images.h
SDL_clipboard.h SDL_log.h SDL_rwops.h SDL_test_log.h
SDL_config.h SDL_main.h SDL_scancode.h SDL_test_md5.h
SDL_cpuinfo.h SDL_messagebox.h SDL_shape.h SDL_test_random.h
SDL_endian.h SDL_mouse.h SDL_stdinc.h SDL_thread.h
SDL_error.h SDL_mutex.h SDL_surface.h SDL_timer.h
SDL_events.h SDL_name.h SDL_system.h SDL_touch.h
SDL_filesystem.h SDL_opengles2.h SDL_syswm.h SDL_types.h
SDL_gamecontroller.h SDL_opengles.h SDL_test_assert.h SDL_version.h
SDL_gesture.h SDL_opengl.h SDL_test_common.h SDL_video.h
The -I flag sets an include directory.
Is there a /usr/local/share/pkgconfig or /usr/local/lib/pkgconfig directory? If so, try adding it to your PKG_CONFIG_PATH environment variable.
I tried these two commands and I got the same error after running make:
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
What's in /usr/local/lib/pkgconfig?
Just two files: sdl2.pc and valgrind.pc.
Hm... looking at your list of header files above, I don't think you actually installed SDL2_image and SDL2_mixer. That would seem to be your problem. Oddly, the main SDL page doesn't mention these at all. Anyway, here's where you can download them:
http://www.libsdl.org/projects/SDL_image/
http://www.libsdl.org/projects/SDL_mixer/
For some reason I assumed the SDL2 source included that.
I installed those libraries and successfully compiled Starfighter.
After running it I get odd warnings in the terminal, such as:
nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 30
A window titled Starfighter appears, but it is completely black except for the top title bar.
I know that my laptop has poor OpenGL support with the free drivers, but I wasn't aware of any SDL issues.
I suppose you have an Nvidia card? A quick search suggests the warning you posted would be related to that, though I didn't see any answers as to what it actually means.
It's a Nvidia card. I'll try installing the program on my Mac Mini with Intel GMA and Trisquel 7.
UPDATE: I installed it on my desktop computer and it works fine. I was surprised that I didn't hear any sound until after I started a new game and fired the first shot.
Is this normal?
New bugfix release:
Another new release:
https://savannah.nongnu.org/forum/forum.php?forum_id=8275
Significantly, ships now turn red like they're supposed to, finally.
Version 1.4:
https://savannah.nongnu.org/forum/forum.php?forum_id=8295
This is a fairly big one because it features updated character portraits.
Here's to hoping this one gets ported to Android (I'd love to see this on F-Droid :)
if possible a android 1.5 OM port as-well!