Hey, we have forums!

Author Topic: Supported Platforms  (Read 206849 times)

0 Members and 2 Guests are viewing this topic.

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: Supported Platforms
« Reply #75 on: July 07, 2007, 09:45:21 pm »


SoundManager code is a mess because of past experimentation.

Offline wesley

  • Bit
  • ***
  • Posts: 46
  • Ubuntu Developer
    • View Profile
    • Personal TechBlog (Dutch)
Re: Supported Platforms
« Reply #76 on: July 07, 2007, 10:04:05 pm »
SoundManager code is a mess because of past experimentation.
It's not that messy :) if your actual implementations also use ifdefs, the messy/unused code can easily be removed again.
And I guess the next thing in the list will be #include <irrKlang.h> now ;)

It's good to see that you have already experimented with all those libraries. At least you're trying to give everyone the best gaming experience, no matter what OS they use. I hope you two can pull off a stunt like that. I'm hoping that IrrKlang is here to save the day.
Human Knowledge Belongs To The World - Antitrust (2001)
http://www.ubuntu.com

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: Supported Platforms
« Reply #77 on: July 07, 2007, 10:24:58 pm »
Oh yeah, I just remembered the other thing that'll be a bitch for linux is case sensitivity.

Ugh.

Offline wesley

  • Bit
  • ***
  • Posts: 46
  • Ubuntu Developer
    • View Profile
    • Personal TechBlog (Dutch)
Re: Supported Platforms
« Reply #78 on: July 07, 2007, 10:39:56 pm »
Oh yeah, I just remembered the other thing that'll be a bitch for linux is case sensitivity.

Ugh.
Haha, yea, that could be annoying if you don't care about case sensitivity when developing for Windows, but C++ by design is also case sensitive, right? So you only have to watch out for the filenames.
Human Knowledge Belongs To The World - Antitrust (2001)
http://www.ubuntu.com

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: Supported Platforms
« Reply #79 on: July 07, 2007, 10:54:59 pm »
Filenames are a big deal. If one file is not in the right case, it can't be loaded. That would mean not only would much of our content have to be renamed, but we'd have to test EVERYTHING just for Linux to ensure that there isn't a file that's named wrong.

Its like... every other major OS ignores case, why does Linux have to care.

Offline wesley

  • Bit
  • ***
  • Posts: 46
  • Ubuntu Developer
    • View Profile
    • Personal TechBlog (Dutch)
Re: Supported Platforms
« Reply #80 on: July 07, 2007, 11:14:22 pm »
Filenames are a big deal. If one file is not in the right case, it can't be loaded. That would mean not only would much of our content have to be renamed, but we'd have to test EVERYTHING just for Linux to ensure that there isn't a file that's named wrong.
That is indeed a big problem. Are it really that many files? If you want, I can try to write a little bash script for you (for free) to scan the contents of a given dir + check the contents of your source (cpp, h) files and check for casing mistakes :) Would you be interested in that?
edit: I don't need your source for that, just say yes and I'll start scripting something you can use yourself to check the files.

Its like... every other major OS ignores case, why does Linux have to care.
Well, because in essence "a" is different from "A" (different ascii values as you know) and even though it would be easy to map a to be the same as A, or to use tolower/toupper conversion tricks, Linux wasn't developed this way. Actually, Windows only uses case sensitivity because in the old days Microsoft DOS only supported uppercase and to maintain backwards compatibility they didn't make a distinction between upper and lower case in Windows.

It might seem odd to you, but I actually find it odd that a lot of other operating systems do not know case sensitivity. It's just how you look at it. It makes sense to me.
« Last Edit: July 07, 2007, 11:17:07 pm by wesley »
Human Knowledge Belongs To The World - Antitrust (2001)
http://www.ubuntu.com

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: Supported Platforms
« Reply #81 on: July 07, 2007, 11:57:42 pm »
Yeah, it wouldn't be that simple unfortunately.

I think its odd to be case sensitive, because it makes things way more complicated and harder to implement.

I understand that Linux does that because of how it was built, but...

The way I look at Linux is it has this great potential. The potential to be an OS that a lot of people use, because its free, because anyone can work on improving it, etc. It has these great ideals behind it. But its got a lot of little annoying issues that cause big problems that prevent a lot of people from wanting to use/support it.

So I feel like it would be better to take those ideals, and just start a new OS from scratch, one that is based more around being user friendly.

Offline wesley

  • Bit
  • ***
  • Posts: 46
  • Ubuntu Developer
    • View Profile
    • Personal TechBlog (Dutch)
Re: Supported Platforms
« Reply #82 on: July 08, 2007, 12:31:31 am »
Yeah, it wouldn't be that simple unfortunately.

I think its odd to be case sensitive, because it makes things way more complicated and harder to implement.
Only to port things. If you start from scratch with the knowledge that casing matters, there is no problem. I hope this is not keeping you from porting the game to Linux. Actually, I could even write a script that checks case problems and automatically renames the filenames in the source files if you give me some time.

I understand that Linux does that because of how it was built, but...

The way I look at Linux is it has this great potential. The potential to be an OS that a lot of people use, because its free, because anyone can work on improving it, etc. It has these great ideals behind it. But its got a lot of little annoying issues that cause big problems that prevent a lot of people from wanting to use/support it.
I am aware of that. But please do tell us what the current problems are. I'm pretty sure I can fix casing for you with a little bash script. And then there's the sound issue. Have you tried IrrKlang yet? If there are more problems you run into, please let us know, so we can look for solutions together.

I am still hoping that a linux port will be possible.

So I feel like it would be better to take those ideals, and just start a new OS from scratch, one that is based more around being user friendly.
That sounds like: "Better luck next time, Linux boys/girls" :( So please tell us, what's in your head? Do you think a Linux port is still possible? Or impossible for Bit Blot?

I also want to say that I do not agree with the statement. Developing a new OS from scratch is a really bad idea. First of all, it will take many many years to develop something new. And second, a lot of Linux will probably just be copied anyway if we want a more user friendly Linux clone. Linux is becoming better and more user friendly at a fast pace. It is going in the right direction and is finally gaining some important momentum from a few big commercial backers.

The only problem that I see for developing for Linux for you is the case sensitivity and the audio library.
I don't think of the casing as a real problem. And if I finish my script for you, it can solve that problem automatically, so you don't really have to worry about that. And in the future you just make sure that your casing always reflects the real filenames. Make it a programming rule to always check it, even though you are using Windows.

Then the audio library. That's a hard one. Have you tried IrrKlang yet? It might be what you were looking for. The other libraries aren't very good for you though. OpenAL is too low-level (you already experienced that yourself, I think), FMOD is just too expensive for commercial games. And SDL_Mixer isn't capable of mixing multiple audio streams. So we could be at the end of our line here :(
Human Knowledge Belongs To The World - Antitrust (2001)
http://www.ubuntu.com

Offline kawsper

  • Mini Bit
  • **
  • Posts: 7
    • View Profile
Re: Supported Platforms
« Reply #83 on: July 08, 2007, 12:36:12 am »
So I feel like it would be better to take those ideals, and just start a new OS from scratch, one that is based more around being user friendly.

"Linux is User-Friendly, it's not idiot friendly or ignorant friendly"
http://twitter.com/amin/statuses/128960342

You can do that and still use Linux. Linux is "just" a kernel, it doesn't distinct A and a, its filesystem drivers handles that. All you would need to is write up your own implementation of a filesystem, and then maybe make a new graphical frontend with Linux as your engine.

But sometimes i feel your frustration.

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: Supported Platforms
« Reply #84 on: July 08, 2007, 12:38:22 am »
Calling users idiots doesn't solve the problem. That kind of attitude is what keeps me from investigating Linux further. An OS should be built to support users, not insult them.

I am still hoping that a linux port will be possible.

I have to say I admire your interest and dedication to solving the problems. :)

I just don't think they'll be that easy to solve, unfortunately. :(

Filenames are weird. We have a lot of content, divided into different sections. Each section does things slightly differently. Some filenames are loaded out of scripts, some from txt files with lists in them, etc. Not all the filenames are in code. Some get converted to various cases when loaded in so that they can be easily compared.

Its not something that could be easily solved in one step.

IrrKlang looks like it handles allocation of sounds itself, i.e. doesn't let you load and unload sounds when you want to. I'm not 100% sure of this yet, but from skimming the docs that's what it seems like. What we like to do is load a directory of cached sounds, and load/unload local sounds per level to try an minimize the impact on memory.

« Last Edit: July 08, 2007, 12:40:15 am by Alec »

Offline wesley

  • Bit
  • ***
  • Posts: 46
  • Ubuntu Developer
    • View Profile
    • Personal TechBlog (Dutch)
Re: Supported Platforms
« Reply #85 on: July 08, 2007, 01:51:23 am »
I am still hoping that a linux port will be possible.

I have to say I admire your interest and dedication to solving the problems. :)

I just don't think they'll be that easy to solve, unfortunately. :(
Yes, I am very interested in this project and I also really want to play/enjoy the game. I am not really looking forward to booting my older Windows laptop just to play this game. I will however buy the Wii version instead (together with a Wii, because I was already planning to buy one) when Aquaria is available there and if no Linux version is available by then.

But I don't want to think about that. If possible, I want to be able to play the game on Linux.
Too bad that it sounds like you're giving up, though. I can't blame you. The more I learn about the way the game is written, the better I understand the difficulty of porting it.

Filenames are weird. We have a lot of content, divided into different sections. Each section does things slightly differently. Some filenames are loaded out of scripts, some from txt files with lists in them, etc. Not all the filenames are in code. Some get converted to various cases when loaded in so that they can be easily compared.

Its not something that could be easily solved in one step.
Hmm, still sounds doable :) I actually have a better idea for a script. We can just grab all filenames in your game source/content directory (+ its subdirectories) and then execute sed commands on all files to automatically replace incorrectly cased references to those files by the actual filenames. A "quick and dirty" script to accomplish that can be written in a short time. It should fix casing in source files, script files and most text files. It will only fail for files that reference to other files in a wrong way (e.g. "fi le 1. tx t" instead of "file1.txt")

And is there a problem with the conversion to various cases? If you load in names from a text file and want to easily compare them by changing the case to lower or upper case, that should only be temporary for the check, otherwise I can indeed see the possible complications. And of course if you are checking the uppercase of a loaded filename to "FILE1.TXT" and the script changed "FILE1.TXT" to read "file1.txt", you'll run into other problems. The more I think about it, the less I think my script would be a solution. It could potentially make your code even worse if it runs into those cases.  :-\

But still. I think it's not as big an issue as the audio library. You can take your time sorting out the filenames after you have successfully changed/subclassed your SoundManager. (Because to test the SoundManager I suppose you have created a small test application that tries out the needed combinations of the audio (e.g. multiple audio streams + voice over))

IrrKlang looks like it handles allocation of sounds itself, i.e. doesn't let you load and unload sounds when you want to. I'm not 100% sure of this yet, but from skimming the docs that's what it seems like. What we like to do is load a directory of cached sounds, and load/unload local sounds per level to try an minimize the impact on memory.
I spoke to some IrrLicht users (IrrKlang was officially created for the IrrLicht 3D engine) through IRC and I got this answer:
Quote from: irc.freenode.net #irrlight
[01:02] <profoX`> Hello everyone! A friend of mine has this problem, can you guys give more information? --> IrrKlang looks like it handles allocation of sounds itself, i.e. doesn't let you load and unload sounds when you want to. I'm not 100% sure of this yet, but from skimming the docs that's what it seems like. What we like to do is load a directory of cached sounds, and load/unload local sounds per level to try an minimize the impact on memory.
[01:03] <Halan> of course oyuve to load it
[01:03] <Halan> but you can also stream from hd or ram
[01:05] <profoX`> I do know that he wants to use streams from HD or ram for background music. I think that my friend thinks that all sounds have to be loaded at one particular time and can't be unloaded/other sounds loaded when a new level commences
[01:21] <Halan> no
[01:21] <Halan> you just load it via a funciton
[01:21] <Halan> in the engine
[01:21] <Halan> and then do sound->drop()
[01:21] <Halan> and the memory is free again
I hope that cleared some things up. And I also hope that a Linux port is still possible :) Two thumbs up if you are able to create one. And, well, still one thumb up if you can't, because I will enjoy the game on the Wii if it will become available there. And if it won't, I'll *sigh* just boot up my old Windows laptop ;) But that's really not what I'm after. (Plus it's not the newest hardware on that laptop)
Human Knowledge Belongs To The World - Antitrust (2001)
http://www.ubuntu.com

Offline Qantourisc

  • Mini Bit
  • **
  • Posts: 3
    • View Profile
Re: Supported Platforms
« Reply #86 on: July 08, 2007, 05:43:06 pm »
Well I'm personally working on a sounlib (with an easy to use interface) ...
 However it's alpha state ...
It's not useable for production yet :(
Neither do I currently have the time to complete it further ...
(I should have spend more time in my lib :)

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: Supported Platforms
« Reply #87 on: July 08, 2007, 11:41:42 pm »
Thanks for the info. :)

The other thing about case sensitivity is for Mods...

It would force Mod makers to keep a consistent naming system if they wanted their Mods to be playable on Linux.

Its a pretty big issue I think, because Linux players would try to boot up a made-for-Mac/Windows Mod, and it would just die at some point just because of the cases.

So yeah, I guess I do feel that Linux would be better off to support that stuff, because it would make it easier for people to add files to a project. I understand its probably really impractical for any of the distros to add that support now, because people have been doing things the old way for so long. But it would really make a lot of things a lot easier for a lot of people I think.

Offline taiyo

  • Mini Bit
  • **
  • Posts: 2
    • View Profile
Re: Supported Platforms
« Reply #88 on: July 09, 2007, 03:23:45 am »
There are certainly pros/cons about case sensitivity, but I do not think it should be such a big issue.
Wouldn't it be possible to have a consistent naming in lowercase letters or a simple translation of letters when running mods?
I do not know very much about programming but I think such a function would not be very difficult to implement.

Correct me if I am wrong?

Good luck with the further development (and porting ;) )

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: Supported Platforms
« Reply #89 on: July 09, 2007, 03:34:32 am »
With the Mods, people are going to be creating their own files. So they'll be able to use whatever naming convention they want.

So when they load something, its up to them to enter it correctly. There's no way for the code to compensate, unless it checks for each variation of the name.

i.e.

someone creates an entity lua script files called asdF.lua

they enter it in the entity list as "Asdf"

So if the code converts it to all upper case, or all lower case, it doesn't matter. "ASDF" and "asdf" are both not "asdF".

People are liable to make mistakes like this here and there by accident. That's why I'm saying case insensitivity is more user friendly.

I imagine there's a way to get a list of all the files in a directory in Linux, and then run through them and do a case insensitive comparison... but why would I want to spend time writing something like that? The OS should just handle that!