Problems on Mac

Feb 25, 7:26 pm
#1
Joined: Feb 25, 2017
Posts: 4
Hi all, I'm trying to build and play IVAN on my MacBook Pro running Sierra. I managed to build the game from source (after battling SDL) but the world map/play screen is just blank (see attached). I can navigate around but can't see anything; it's not rendering anything in that frame, the rest looks fine. Ideas?

Also, it's not finding any output device for the midi music, but that's a secondary problem.

Notes:
- Got latest master branch from https://github.com/Attnam/ivan using git.
- Installed cmake using Homebrew
- Got the latest SDL2 dev libraries and installed to /Library/Frameworks/SDL2.framework/ and cmake found it correctly (seen in CMakeCache.txt)
Feb 26, 11:22 am
#2
Ischaldirh's avatar
Ex-Tyrant of the IVANers


Joined: Dec 8, 2007
Occupation: Student
Location: California
Interests: Physics
Posts: 2,673
Hmm. I'm not sure we've ever had a mac user on here before. Sorry I'm not more help, maybe Fejoa has ideas?
Feb 27, 3:55 am
#3
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 876
Ischaldirh wrote
Hmm. I'm not sure we've ever had a mac user on here before. Sorry I'm not more help, maybe Fejoa has ideas?

Is Cap using Mac? I think emlai might use Mac as well? He posts as Zenith around here, but you can more easily reach him on GitHub.
Feb 27, 6:58 pm
#4
Joined: Feb 25, 2017
Posts: 4
Thanks, I'll reach out to emlai. I got it set up in XCode and can debug but not quite sure what to look for. The worldmap drawing routines run without apparent issue and do attempt to draw stuff. There's just nothing there on the screen.
Feb 28, 2:53 am
#5
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,741
I know next to nothing about coding so feel free to disregard, but perhaps the issue is not with the map, but rather the light? Isn't that what restricts vision in this game along with perception?
Feb 28, 11:22 am
#6
capristo's avatar
The Imperialist


Joined: Dec 2, 2007
Location: New Attnam
Interests: bananas
Posts: 1,922
I use a Mac. I just pulled from master and ran installation again and the graphics work fine.

I installed sdl2 through Homebrew, try that and see if it helps?

My computer also doesn't detect a MIDI device either though. I never use sound on my Mac so I never noticed
Feb 28, 9:55 pm
#7
Joined: Feb 25, 2017
Posts: 4
Well, what do you know. I started over from scratch and it worked!! No idea what was wrong before. Biggest changes were using vanilla install path and homebrew's sdl2 instead of SDL2.framework.

Steps to clean up and start over:
1. Deleted ~/.ivan from previous tries
$ rm -rf ~/.ivan

2. Deleted cloned ivan project
$ rm -rf ~/dev/games/ivan

3. Deleted SDL2.framework (and related) from /Library/Frameworks/ to make sure it doesn't interfere with homebrew's and cmake's find sdl2 routine.
$ rm -rf /Library/Frameworks/SDL2.framework

4. Make sure I have SDL2 installed via homebrew (brew list sdl2)
$ brew list sdl2
/usr/local/Cellar/sdl2/2.0.5/bin/sdl2-config
/usr/local/Cellar/sdl2/2.0.5/include/SDL2/ (70 files)
/usr/local/Cellar/sdl2/2.0.5/lib/libSDL2-2.0.0.dylib
/usr/local/Cellar/sdl2/2.0.5/lib/cmake/SDL2/sdl2-config.cmake
/usr/local/Cellar/sdl2/2.0.5/lib/pkgconfig/sdl2.pc
/usr/local/Cellar/sdl2/2.0.5/lib/ (4 other files)
/usr/local/Cellar/sdl2/2.0.5/share/aclocal/sdl2.m4

5. Clone ivan from git
$ git clone https://github.com/Attnam/ivan.git

6. Generate makefiles (I used the most vanilla commands this time, previously I customized path)
$ cd ivan
$ cmake .
Previously I had done
cmake . -DCMAKE_INSTALL_PREFIX=`pwd`

7. Build ivan
$ make -j

8. install and rejoice!
$ make install
$ ivan

Feb 28, 11:00 pm
#8
capristo's avatar
The Imperialist


Joined: Dec 2, 2007
Location: New Attnam
Interests: bananas
Posts: 1,922
Woohoo! Maybe the latest SDL2 release breaks something. Hopefully not
Mar 1, 1:22 am
#9
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 876
\o/ that's great!
Mar 19, 2:42 pm
#10
Joined: Feb 25, 2017
Posts: 4
Wanted to report that I got the audio working as well. Mac OSX doesn't have a built in MIDI synthesizer anymore so I had to get one that rtmidi would work with. I ended up building fluidsynth from source and got some different soundfonts from synthfont as well as Compifont.

Firing up fluidsynth:
$ ./fluidsynth ~/Compifont.sf2
FluidSynth version 1.1.6
Copyright (C) 2000-2012 Peter Hanappe and others.
Distributed under the LGPL license.
SoundFont(R) is a registered trademark of E-mu Systems, Inc.

Type 'help' for help topics.

>

Testing with rtmidi (built from source, it comes with some tests):
~/rtmidi/tests $ ./midiprobe

Compiled APIs:
  OS-X CoreMidi

Current input API: OS-X CoreMidi

There are 0 MIDI input sources available.

Current output API: OS-X CoreMidi

There are 1 MIDI output ports available.
  Output Port #1: FluidSynth virtual port (91976)

Select the fluidsynth virtual port in IVAN and rejoice!


Note, I did get some segfaults with certain soundfonts when initializing rtmidi. Also, depending on font, there will be some complaints about instruments but everything works
fluidsynth: warning: Instrument not found on channel 9 [bank=128 prog=35], substituted [bank=128 prog=0]
Jump to