Problems on Mac

https://attnam.com/topics/Problems-on-Mac

The Cathedral of Attnam > Trouble Shooting and Bugs

#1 Feb 25, 2017, 7:26 pm Hide

Dethread

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)
#2 Feb 26, 2017, 11:22 am Hide

Ischaldirh

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?
#3 Feb 27, 2017, 3:55 am Hide

fejoa

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.
#4 Feb 27, 2017, 6:58 pm Hide

Dethread

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.
#5 Feb 28, 2017, 2:53 am Hide

chaostrom

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?
#6 Feb 28, 2017, 11:22 am Hide

capristo

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
#7 Feb 28, 2017, 9:55 pm Hide

Dethread

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

#8 Feb 28, 2017, 11:00 pm Hide

capristo

Woohoo! Maybe the latest SDL2 release breaks something. Hopefully not
#9 Mar 1, 2017, 1:22 am Hide

fejoa

\o/ that's great!
#10 Mar 19, 2017, 2:42 pm Hide

Dethread

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]