Skip to main content

News

Topic: TurboSphere (Read 190672 times) previous topic - next topic

0 Members and 6 Guests are viewing this topic.
Re: TurboSphere
Reply #150
Without any knowledge of what it looks like on Mac (this might in fact be bad advice for OS X), I personally recommend GCC. Both TurboSphere and V8 compile quite well with it, and with pretty much any version of it (from 3.5 all the way to 4.5, at least I've tested those).

  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: TurboSphere
Reply #151
I think the issue is less whether I can and more whether I should. Keep in mind my limitation of using an older XCode is more a result of being on a version of OS X that doesn't support newer ones and that while I've had much success using the Macports gcc (especially when I was willing to spend almost 12 hours downloading Macports Qt4 to get phoenix to compile on Mac) there's an integration achieved when using XCode that is lacking without it.

Re: TurboSphere
Reply #152

@casiotone - What's your tool chain on OS X? I want to make a note of whether I should use old XCode 3.2.x to build on 10.6 or use MacPorts gcc or something when I go back to my Macbook.

I use the XCode toolchain, but I'm not sure if that would be better or worse than gcc on 10.6... In theory, it should be better.

  • Rukiri
  • [*]
Re: TurboSphere
Reply #153

Without any knowledge of what it looks like on Mac (this might in fact be bad advice for OS X), I personally recommend GCC. Both TurboSphere and V8 compile quite well with it, and with pretty much any version of it (from 3.5 all the way to 4.5, at least I've tested those).

What version of GCC are you using? The latest is GCC 4.8 which supports C++11 and other improvements.

I'm just curious, how well does turbo support 2.5D?  I generally would just use Unity for this but I'm just not a fan of C# or boo(even though I love python).

Re: TurboSphere
Reply #154
TurboSphere doesn't have anything more (and it's not done, so often less) than Sphere does. It does have more potential to, just because a 2.5D or 3D plugin could be made for it. I did have a ray-tracing 3D plugin working for a short time while I was working out the plugin API, but I never released it. It a software renderer (and was ray-tracing), so it was far, far too slow for realtime use. But even then, an OpenGL or DirectX 3D plugin was quite possible, and still is.

I do plan on adding very basic 3D/2.5D support to the core graphics plugin, mainly just primitives and textured polygons with no perspective, for effects like those from Castevania Symphony of the Night. I don't want to get into anything much more than that in the SDL-GL plugin pack, though. That sort of functionality is also something I'd much prefer to add to a sprite batcher, too. It would be much more elegant that way.

I was wrong before, use GCC 4.6 usually, although it did compile on 4.8 not too long ago and I'll bet it still does. I used to use C++11, but at the moment I'm not because when I moved to Scons I didn't add the switch to use it, and I started using adjacent string literal concatenation, which apparently doesn't work in C++11. That is, as far as I know, the only thing in TurboSphere that doesn't work with C++11.

The main problem with getting TurboSphere working from scratch is compiling V8. TurboSphere proper seems quite content to compile with just about any toolchain, it seems.
I would worry a little about things like XCode or MingW, because for everything that needs to work differently on Windows and Linux (GCC and MSVC), I check for _WIN32, and then assume GCC otherwise, and in only a couple places where something really is MSVC or GCC specific (and probably not always then) I check for MSVC or GCC.

It does compile with the Intel Compiler on Windows, though. But I can't distribute those binaries due to the license. And sometimes it's notably slower (particularly the software graphics use, like surfaces and surface primitives) because if I set it to use more than MMX vectorization it makes binaries that refuse to run on AMD processors, like mine (even if I just enable 3DNow!, which makes no sense from a technical standpoint).

Re: TurboSphere
Reply #155
TurboSphere on Git has been updated. It now matches my development machine's copy, so it also has the mostly restored map engine. In addition, it no longer uses OpenGL immediate mode (although I doubt that is anything more than just aesthetic right now), more software primitives for surfaces, and the fix for drawTextBox crashing--I hope. That one's like a bad penny.

Re: TurboSphere
Reply #156
I'm taking a little break from the Map Engine to work on an audio plugin.

I was thinking that I would use irrKlang for the audio. I know it has a nice API and also then the editor could share the library with TurboSphere. But I don't think that there exists a 64-bit Linux version of the library, which is (for me personally, as a user of the engine I'm making) a deal breaker. I may end up making an irrKlang library later, either just for Windows and 32-bit Linux, or when 64-bit Linux binaries are released (which is quite possible, the irrKlang developers seem very active in Linux development).

But for now, I'm tentatively going with Bass, which has a very similar license to irrKlang, and also has the added bonus of supporting MIDI much more easily. I also generally rather like how the API looks. Bass also offers the ability to use many other file types through plugins (so does irrKlang, but not as many). I'm not sure if irrKlang can, but I know Bass can also encode audio using any installed system codec, and operate directly on CDs (which dovetails nicely with SDL's CD-drive functionality...at least in theory). I would someday like there to be tools in TurboSphere to run games and/or the engine off of CDs. Properly streaming sound from the game CD might not really be necessary, but it sounds like a nice way to take advantage of the CD media.

I'll be back to the Map Engine relatively soon. But the thing is, there's so much to it that a lot of the code I have to write doesn't tangibly change the functionality right away, and I need to write a lot of such code to get most things working since so many things rely on so many other things.

  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: TurboSphere
Reply #157
BASS powers mudlord & kode54's User-Mode Soundfont Driver, a software-only replacement for the Creative Soundfont Loader letting Windows users without SF-capable sound cards use Soundfonts for MIDI playback.

While the BASS license itself is significantly more restrictive than irrKlang's, it's a fantastic choice for temporary use.

Re: TurboSphere
Reply #158
I don't think it's too much more restrictive, but I haven't paid too much attention to how it works out for commercial use. I'm pretty much assuming that if anyone really wants to go commercial, they should write their own libogg based plugin and just use that (or something like that). It's easy to make a simple but inflexible audio plugin (I've done it before). It's hard to make a one that can measure up to how Sphere 1.x can handle audio.

And also either way, the sound plugin is a lot more freeform than the some of the others. An irrKlang plugin, a Bass plugin, an SDL_Mixer plugin, or even an Audiere plugin could all be drop in replacements for each other in most cases, unlike the plugins that use graphics which have to agree with the main graphics plugin.

I would definitely like to use irrKlang, but until there is a 64-bit Linux version I won't, because 99% of my development is on 64-bit Linux. And plus, I think that if you want to use MIDI files, you'll get to a lot sooner with a Bass plugin than you will with an irrKlang (combined with a different midi library) plugin.

Edit: Speaking of, I've got the new audioBASS plugin working just as well as the old, pre-plugin sound support did...except now it also supports MIDIs.

Edit Edit: And right off we also have external soundfont support, as well as per-midi font changing (including multiple fonts running at once, and combining fonts on the same sound). Not that that last bit is hugely important, but it's great that it is possible now. I'm looking for a good font to include with TurboSphere (maybe Chorium? I haven't checked the license for it yet).
  • Last Edit: June 05, 2013, 07:27:38 pm by Flying Jester

Re: TurboSphere
Reply #159
I've updated TurboSphere on github to include the BASS audio plugin (and updated the included docs accordingly). It includes the ability to use external soundfonts, and includes a demo font (Hollywood, which is terrible but tiny, only ~512k. But you can change the system.ini file, and replace it with anything you want). You can also play WAVs, OGGs, theoretically mod-music, and possibly a lot of other files (BASS can supposedly try to use system codecs if it can't open a file, but I haven't tested that). I also plan on adding general BASS plugin loading.

I don't have it working so that you can use the machine's system soundfont, because I can't test that yet. Fedora doesn't include a default MIDI soundfont, I haven't installed the stuff to make MIDI work at all on my Arch machine, and my Windows machine died recently (I'll cast res on it soon, once my mana recharges--aka, when I get enough money to buy the parts).

Right now all that has been added is:
Code: [Select]

new Sound(filename) //Sound
sound.Play([loop]);
sound.Stop();


This update also includes some of the new (actually restored after losing them when I switched to OpenGL) software surface primitives:

Code: [Select]

surface.Line(x1, y1, x2, y1, color);
surface.Rectangle(x, y, w, h, color);
surface.FilledCircle(x, y, r, color);
surface.OutlinedCircle(x, y, r, color);


I also slightly improved engine startup time and game loading time...which is probably overshadowed by now loading BASS and BASSmidi at startup.

To test the sounds with the new startup game, press M to play an ogg and N to switch and play a midi.
  • Last Edit: June 06, 2013, 08:39:38 pm by Flying Jester

Re: TurboSphere
Reply #160
TurboSphere 0.3.0 has been released!

This release doesn't need or worry about OpenGL extensions, so it should work on Intel GPUs now. It lacks the Map Engine (there's not much to look at yet), but includes all the new graphics improvements and the sound plugin.

Considering how little there is to do to finish the sound plugin (somehow I thought there were a lot more sound functions in Sphere), I may just finish it. And have a completely finished plugin for once!

I'll update the TS functions page on the wiki sometime soon. It needs it badly.

I've fixed up the source (as posted as 0.3.0 on sourceforge) quite significantly for non-Linux platforms, especially Windows. It should compile well from the scons file on Windows (this is the first win32 release I've made using scons to build it). It should also no longer have the heap corruption issues it used to have with font.drawTextBox on Windows and OS X. I may or may not make a win64 release soon...I need to get the win 7.1 SDK on my newly resurrected Windows machine.

  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: TurboSphere
Reply #161
Visit the Sound API page to see just how many functions the Sphere Sound object really has ;) (note: does not include SoundEffect or SFXR APIs)

Re: TurboSphere
Reply #162
Yeah, that's just what I was looking at.

Considering that a lot of the functions are shared (in some manner in the code, at least) with sound effects, that's not really a whole lot for a plugin (compared to, say, the graphics plugin or the map engine). And I'm also considering how much easier it is to make this now that I'm using something other than SDL_mixer.

I kind of plan on putting the SFXR into a separate plugin, or as a sub plugin to the sound plugin. Partially because if and when I switch to irrKlang (or something else, even, for instance if I or someone else wanted to make a totally free, even for commercial use sound plugin), then the SFXR plugin will be less affected.

  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: TurboSphere
Reply #163
That's fine; I wouldn't have expected the SFXR stuff to be built directly into the Sound stuff even on vanilla Sphere.

Re: TurboSphere
Reply #164
Yay! Finally I can continue using turbosphere :) the new gfx functions and intel support was quite essential for me.