Open Giana Sisters

Open Giana Sisters

Postby bzt » 27 Feb 2022, 15:04

I've seen @dulsi's post about Open Giana Sisters here.

Since Giana Sisters was one of my favourite on C64 when I was a child, I had to try it out :-) I remember, there was no save/load game option, so once me and my nephew left a C64 turned on for days so that we don't have to start the game over from the beginning. Sadly it was impossible at that time to get an official C64 power adapter, so my father made one with spare parts, which didn't like working that long, it overheaded and demonstrated that electronic devices work with smoke. Despite our best efforts, we've lost the "save" game anyway...

Back on topic, I've checked this rewrite and it's pretty good. I understand that dulsi didn't liked it because he expected Super Mario, but this is Giana Sisters. For someone who have played the original like me, this is really awesome. The game dynamics are a bit different (I was surprised that I still remember some movements, like it were muscle memory), but easy to get accustomed to. Animations are a little bit different too, but not noticeable. All in all it's a great rewrite, and a very big plus for including a tile and level editor!!!

My only issue was that I couldn't compile it. No matter what I've tried, Cmake failed. After trying to fix Cmake files and their dependencies for more than half an hour, I got so pissed, that I've deleted all the Cmake **** and I quickly wrote a Makefile myself (took me about 2 minutes tops). If anybody else having issues with the provided Cmake files, just put this in the src directory as "Makefile" and run "make". (When you copy'n'paste, make sure that the indent before the two "g++" lines is actually a TAB, and not spaces).
{l Code}: {l Select All Code}
TARGET=../giana
SRCS=$(wildcard *.cpp)
OBJS=$(SRCS:.cpp=.o)

all: $(TARGET)

%.o: %.cpp
   g++ -I/usr/include/SDL2 -c $<

$(TARGET): $(OBJS)
   g++ $(OBJS) -o $(TARGET) -lSDL2 -lSDL2_mixer -lSDL2_image
(It is really this simple, I don't understand why complicate things with multiple cmake files, especially when they don't work with the FHS locations...)

Cheers,
bzt
User avatar
bzt
 
Posts: 332
Joined: 23 May 2021, 21:46

Re: Open Giana Sisters

Postby dulsi » 27 Feb 2022, 19:22

Cmake failed for me. The files in cmake directory had the wrong case. I change FindSDL2_image.cmake and FindSDL2_mixer.cmake to FindSDL2_Image.cmake and FindSDL2_Mixer.cmake respectively.
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Re: Open Giana Sisters

Postby PeterX » 27 Feb 2022, 21:26

dulsi, have you tried bzt's makefile?
User avatar
PeterX
 
Posts: 270
Joined: 01 Oct 2020, 21:44

Re: Open Giana Sisters

Postby bzt » 28 Feb 2022, 07:33

@dulsi: hah, that's it! But I don't think renaming the files to camelCase is the best to do, because all the libs and header files are lowercase. I think the proper solution would be to replace the strings "Image" to "image" and "Mixer" to "mixer" in the CMakeLists.txt file. Anyway, I'm happy that I've thrown out Cmake, one less dependency :-)

Just for the records, if one replaces the includes in the sources, like "#include <SDL.h>" to "#include <SDL2/SDL.h>" like it's supposed to be in the first place, then one can remove the "-I" flag too. That means no more paths in the Makefile, so it will work with any environment configuration.

@PeterX: that's unlikely, dulsi tried OGG long before I wrote that.

Cheers,
bzt
User avatar
bzt
 
Posts: 332
Joined: 23 May 2021, 21:46

Re: Open Giana Sisters

Postby dulsi » 01 Mar 2022, 00:06

bzt {l Wrote}:@dulsi: hah, that's it! But I don't think renaming the files to camelCase is the best to do, because all the libs and header files are lowercase. I think the proper solution would be to replace the strings "Image" to "image" and "Mixer" to "mixer" in the CMakeLists.txt file. Anyway, I'm happy that I've thrown out Cmake, one less dependency :-)


But what if you have a friend with Windows. Your makefile doesn't allow you to easily build a windows version. With cmake I can easily use the Fedora crosscompiler to build a windows version. (At least in theory. I've done it with other projects but haven't tried this one.) Granted maintaining two makefiles isn't hard either.
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Re: Open Giana Sisters

Postby bzt » 01 Mar 2022, 09:25

dulsi {l Wrote}:But what if you have a friend with Windows. Your makefile doesn't allow you to easily build a windows version.
Works for me with mingw and msys out-of-the-box.
dulsi {l Wrote}:With cmake I can easily use the Fedora crosscompiler to build a windows version. (At least in theory. I've done it with other projects but haven't tried this one.) Granted maintaining two makefiles isn't hard either.
The problem with cmake is that it does not work. I've opened an issue with the fix, but since the project seems to be inactive for years, I don't think it will be merged any time soon. But at least if someone with the same problem looks at the github issues, he/she will be able to find the solution.

<offtopic>
BTW, for cross-compilation, you can do that with pure Makefiles easily. It's not a game, but for example I've done that in one of my projects, and it works pretty well. Makefiles are flexible and scriptable enough so that they can detect a toolchain automatically to compile a PE executable on Linux. Allowing the user to specify CC environment variable manually is also an option. Conclusion: cmake is not necessary for easy cross-compilation setups. (I'm not against cmake per se, I just don't like introducing a new dependency and potential point of failure unless I absolutely really really have to. I strongly believe in the K.I.S.S. principle.)
</offtopic>

Cheers,
bzt
User avatar
bzt
 
Posts: 332
Joined: 23 May 2021, 21:46

Who is online

Users browsing this forum: No registered users and 1 guest