Skip to main content

News

Topic: neoSphere 5.9.2 (Read 522050 times) previous topic - next topic

0 Members and 23 Guests are viewing this topic.
  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: minisphere 2.1.1
Reply #885
I just pulled the latest source, but I've forgotten how to compile on Mac.  XP

Please refresh me on compilation instructions, thanks!

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.1.1
Reply #886
You need:
Allegro 5.1.11+ (may have to build this yourself, https://github.com/liballeg/allegro5)
libmng
zlib

From the command line, switch to the minisphere source directory and run scons which will build minisphere and Cell in the bin/ subdirectory.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: minisphere 2.1.1
Reply #887

You need:
Allegro 5.1.11+ (may have to build this yourself, https://github.com/liballeg/allegro5)
libmng
zlib

From the command line, switch to the minisphere source directory and run scons which will build minisphere and Cell in the bin/ subdirectory.


Gave a missing libmng error (pretty much the only library error left after all the previous work I did before), DLed libmng 2.0.3 from Sourceforge, one `./configure; make; sudo make install` later was able to scons minisphere!

Running my two tests worked ok, running Radnen's Cellar Rush gave a LoadSound() error - failed to load some ogg file. I've previously had trouble building Allegro on this Mac with extended sound capabilities (including anything libogg related), so this one's probably on me.

Other than Allegro-specific or me-specific things like the libogg issue, it builds on Mac OS X Mavericks! I'll take a look at Allegro stuff later.

This current building served two purposes: make sure current minisphere builds and runs on Mavericks, and set up a prep environment related to my game dev and my RFC about adding Python.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.1.1
Reply #888
Here's the thing with Allegro: By default it dynamically loads audio codecs such as libogg at runtime, and gracefully degrades if they are missing (this is annoying).  You can static link them if you disable the CMAKE flag WANT_ACODEC_DYNAMIC_LOAD, not sure how feasible that is on OS X though.  Either way, additional dependencies needed for Allegro audio:

dumb
libFLAC
libogg
libvorbis
libvorbisfile

They really need to get rid of that "dynamic link by default" feature, it causes so many headaches.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.1.1
Reply #889
@NEO: Did you get Allegro to build properly with sound support?
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: minisphere 2.1.1
Reply #890

@NEO: Did you get Allegro to build properly with sound support?


Not yet; for reference, Allegro's cmake is giving me the following output (tl;dr - I'm missing libFLAC, libdumb, libvorbis):

Quote

-- Allowing GCC/Clang to use SSE instructions
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
S3TC locking disabled. You will not be able to load/save pre-compressed textures with OpenGL.
-- Could NOT find OPENSL (missing:  OPENSL_INCLUDE_DIR OPENSL_LIBRARY)
-- Could NOT find FLAC (missing:  FLAC_INCLUDE_DIR)
WARNING: libFLAC not found or compile test failed, disabling support.
-- Could NOT find DUMB (missing:  DUMB_INCLUDE_DIR DUMB_LIBRARY)
WARNING: libdumb not found or compile test failed, disabling support. <http://dumb.sourceforge.net/>
-- Could NOT find OGG (missing:  OGG_INCLUDE_DIR)
WARNING: libvorbis not found or compile test failed, disabling support.
-- Could NOT find OGG (missing:  OGG_INCLUDE_DIR)
-- Could NOT find OGG (missing:  OGG_INCLUDE_DIR)
WARNING: allegro_video wanted but no supported backend found
-- Not building ex_video
-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   allegro
   allegro_acodec
   allegro_audio
   allegro_color
   allegro_dialog
   allegro_font
   allegro_image
   allegro_main
   allegro_memfile
   allegro_physfs
   allegro_primitives
   allegro_ttf

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/lux/dev/allegro5/Build

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.1.1
Reply #891
You think this is bad, you should have seen me try to build Allegro on Windows when I first upgraded to 5.1.  Even with CMake it's a nightmare, sometimes it doesn't find libraries that are actually present, or they'll fail a compile test for no reason at all (which CMake then "remembers" and won't try again until you blow away the entire build cache and start over).  This is why I'm still using Allegro 5.1.11 even though 5.1.12 has some new stuff that would actually be useful to have (such as cross-platform clipboard support).

Allegro is a great library, but their build process needs a lot of work.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: minisphere 2.1.1
Reply #892
Even with CMake it's a nightmare


CMake is just always a bit of a nightmare. This is a pretty normal experience with it, especially on Windows.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.1.1
Reply #893
I got minisphere to compile with Chipmunk2D linked in.  So minisphere 2.2 will definitely have some kind of physics support, once I figure out a good API structure.

Originally I was going to try to copy the particle engine from Sphere 1.6, but I'm thinking now that a more general-purpose physics engine will be better in the long run.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.1.1
Reply #894

Even with CMake it's a nightmare


CMake is just always a bit of a nightmare. This is a pretty normal experience with it, especially on Windows.


In large part this seems to be caused by CMake's braindead caching setup: When a variable is set, its value is stored in the CMakeCache and future accesses will always just read from the cache.  There doesn't appear to be any kind of conditional logic where the cached value can be ignored when something related to it changes.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.1.3
Reply #895
Just implemented: Error copying.  Finally you can press Ctrl+C on the error screen to copy error text (and filename/line number) directly to the clipboard.  This has been a long time coming.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: minisphere 2.1.3
Reply #896

Just implemented: Error copying.  Finally you can press Ctrl+C on the error screen to copy error text (and filename/line number) directly to the clipboard.  This has been a long time coming.


Ok, that's it. I'm done with Sphere 1.5/1.6. That was the secret. I wanted you to do that, but never said, and now that you did it, bye bye Sphere 1.5/1.6. :)
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.1.3
Reply #897

Ok, that's it. I'm done with Sphere 1.5/1.6. That was the secret. I wanted you to do that, but never said, and now that you did it, bye bye Sphere 1.5/1.6. :)


Hehe.  I wanted to do this a while ago, but I was too lazy to research the clipboard APIs for the different platforms.  As of Allegro 5.1.12, basic clipboard functions are built-in, so I took advantage of it.

2.1.3 doesn't include the feature, but it's in the git repository anyway (Windows build requires VC++2015).  If I release a 2.1.4 I'll backport it, otherwise it'll be in v2.2 along with some sort of physics support.  I haven't quite worked out a good API for that yet.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.1.4
Reply #898
Okay, Radnen, you lucked out, I had to fix a map engine bug related to GrabImage() (actually a regression due to a careless recent change to the map update loop) so I released a hotfix.  Said hotfix happens to include the error message copying, so now you can download minisphere 2.1.4 and ditch Sphere 1.x if you want. ;)

As for physics, the API is going to need some more thought before I forge ahead with it, so I'm postponing it to minisphere 3.0.  Instead I think I'll dedicate minisphere 2.2 to improving Cell.  What was released of it with minisphere 2.0 is little more than a prototype and I'd like to make it a more invaluable part of the Sphere toolchain.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: minisphere 2.1.4
Reply #899
Having an issue building this again on OS X - I've installed Allegro 5.0.11 through homebrew and I'm getting this when running scons:

Code: [Select]
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o obj/msphere/main.o -c -DDUK_OPT_HAVE_CUSTOM_H obj/msphere/main.c
obj/msphere/main.c:183:44: error: use of undeclared identifier 'ALLEGRO_PROGRAMMABLE_PIPELINE'
        al_set_new_display_flags(ALLEGRO_OPENGL | ALLEGRO_PROGRAMMABLE_PIPELINE);
                                                  ^
obj/msphere/main.c:624:5: warning: implicit declaration of function 'al_set_clipboard_text' is invalid in C99
      [-Wimplicit-function-declaration]
                                al_set_clipboard_text(g_display, msg);
                                ^
obj/msphere/main.c:779:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        while (fse = al_read_directory(engine_dir)) {
               ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
obj/msphere/main.c:779:13: note: place parentheses around the assignment to silence this warning
        while (fse = al_read_directory(engine_dir)) {
                   ^
               (                                  )
obj/msphere/main.c:779:13: note: use '==' to turn this assignment into an equality comparison
        while (fse = al_read_directory(engine_dir)) {
                   ^
                   ==
2 warnings and 1 error generated.
scons: *** [obj/msphere/main.o] Error 1
scons: building terminated because of errors.


Any ideas?