Allegro.cc - Online Community

Allegro.cc Forums » The Depot » Zep's Dreamland: Linux complete!

This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
Zep's Dreamland: Linux complete!
Evert
Member #794
November 2000
avatar

Any major changes since the last version I was able to try out?
Yes, I agree - it's a very fun game :)

About Linux cross-platform compatibility - bear in mind that part of the problem is Linux (or UNIX in general)'s openness: it's not a homogeneous system such as Windows is, but highly adapted and specialized for whatever hardware it's running on. That's the nature of the beast.
I agree that this sucks somewhat for the average home user with his standard PC, but that's not the (original) target user of UNIX systems, and it's great for advanced users with fancy hardware.

miran
Member #2,407
June 2002

Quote:

Bad. It won't run on my machine. Mandrake 10.

How do you run it? If I double click the file in Konqueror (or any other file manager), it crashes, probably because it doesn't handle paths properly. But if I run it from a console, it works perfectly. Except for music of course, that doesn't work...

--
sig used to be here

SonShadowCat
Member #1,548
September 2001
avatar

Thou were right miran. I didn't check music/sound since I have music playing in the background so I'll check later.

Evert
Member #794
November 2000
avatar

Ultio: I hate to say I told you so, so I'll just say that I warned you about assuming anything about paths and a relation between the location of the executable and the data.
Is there a readme file in the archive? You would probably want to put this in there.

Quote:

I can hear sound, but no music ...

Your soundcard can't play MIDI then, or you don't have it configured to do that. You can work around that by using Allegro's DIGMID driver. You'll need a patch set, and to create an Allegro config file.

SonShadowCat
Member #1,548
September 2001
avatar

I don't recall being warned about anything.

Evert
Member #794
November 2000
avatar

That wasn't addressed to you ;)
Now edited for clarity.

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

Ultio: I hate to say I told you so, so I'll just say that I warned you about assuming anything about paths and a relation between the location of the executable and the data.

get_executable_name(buf, len);
(strrchr(buf, '/'))[1] = 0;
chdir(buf);

:)

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Ultio
Member #1,336
April 2001

Quote:

I hate to say I told you so, so I'll just say that I warned you about assuming anything about paths and a relation between the location of the executable and the data.

So, the executable can't open up a file ala: fopen("blah"); even if the file is right there in the same directory (if you open it via some kind of file manager?) That seems rather odd. Is there any reason for doing this or is it just a quirk in the OS?

Nivoc, I'm sorry the editor doesn't run. It doesn't make sense that it even initializes sound. That will be on my list of things to fix up for the next revision!

Jamal, glad you like it. :)

Kitty Cat, thanks for that. I'll have to toss that into the code later this weekend and update the game archives as needed. :)

---
"It's nice knowing that someday, the software I write will just be pirated by millions of people." :-/
http://loomsoft.net | Zep's Dreamland | Allegro Newbie Tutorials

Evert
Member #794
November 2000
avatar

Quote:

So, the executable can't open up a file ala: fopen("blah"); even if the file is right there in the same directory (if you open it via some kind of file manager?) That seems rather odd. Is there any reason for doing this or is it just a quirk in the OS?

Has nothing to do with the OS, since you can get the same problem in Windows. There's no guarentee that the directory the exectuable is in is the active directory, ever.
You could argue that the file browser should start the exectable with the current directory as its working directory, but on a system where binaries conventionally live detached from their associated data in a dedicated (part of the) filesystem (namely, /bin or /usr/bin), that's rather bad and pointless behavior too. And ofcourse, it presumes something about the user, namely that he will start the binary through a file browser.

Quote:

Kitty Cat, thanks for that. I'll have to toss that into the code later this weekend and update the game archives as needed.

Yup, that's the easiest way to do it.

Oscar Giner
Member #2,207
April 2002
avatar

Works perfectly on SUSE 9.2 64 Bit :D

[edit]
But if I execute it from Knonqueror it doesn't just quit without any message as SSC said ::). It gives an error about not finding the data.

Gnatinator
Member #2,330
May 2002
avatar

ultio said:

So, the executable can't open up a file ala: fopen("blah"); even if the file is right there in the same directory (if you open it via some kind of file manager?) That seems rather odd. Is there any reason for doing this or is it just a quirk in the OS?

Oddly enough, my OSX system does that same thing :P

Heres some code I whipped up to fix the problem (which is being activley used in outer-rim pod digger):

void ConvertToDirectory(char s[]) {
  int endlength = 0;
  int spos = 0;
  
  while (s[spos] != '\0'){
    spos++;
    endlength++;
    
    if(s[spos] == '\\' || s[spos] == '/'){
    endlength=0;}
    }
    
    s[spos-endlength] = '\0';
}

Then all you need to do is call something like this:

// Get Executable path, then find executable directory
get_executable_name(exe_path, 1024);
ConvertToDirectory(exe_path);

This will properley format and store the exact executable path in exe_path. To use the path all you need to do is append it to the names of your data files and bingo. :)

Edit
Kitty Cat:
(strrchr(exe_path, '/'))[1] = 0;This line crashes my program. And im really not sure what it does. :P

miran
Member #2,407
June 2002

Quote:

And im really not sure what it does.

It finds the last occurance of '/' in the string and replaces the next character with a NULL terminator. Of course if there is no '/' in the string (but a '\\' instead) the code will very likely crash. What I do is this:

get_executable_name(buf, len);
(get_filename(buf))[0] = 0;

--
sig used to be here

Ultio
Member #1,336
April 2001

A new version of the archive is now up at the site which, hopefully, addresses the file browser launching issue. It's the same archive, so if you want the new stuff just download exactly what you did last time. :)

---
"It's nice knowing that someday, the software I write will just be pirated by millions of people." :-/
http://loomsoft.net | Zep's Dreamland | Allegro Newbie Tutorials

Matt Smith
Member #783
November 2000

Runs fine on Mandrake 10 here (only from console) :) edit: and no sound, but I have that problem with various things (like flash plug-in)

HoHo
Member #4,534
April 2004
avatar

runs fine on my Gentoo when launcing from console. Opening in KDE gives an allegro message complaining about datafiles not found.

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Ultio
Member #1,336
April 2001

Hm. Still complains about datafiles not being found, eh? I thought I fixed it. I'll have to take a look at it once again.

---
"It's nice knowing that someday, the software I write will just be pirated by millions of people." :-/
http://loomsoft.net | Zep's Dreamland | Allegro Newbie Tutorials

Rick
Member #3,572
June 2003
avatar

This is a very fun game. Level 8 is just mean. Level 10 was hard, and level 13 is tricky. I quit when I got to level 14 after seeing all those transporters. My brain can't take much more. Is there a way to save your progress?

[EDIT]

OK, I just did 14. Not that bad. After awhile your mind start to think differently.

Did 15. This is a great game.

16. I can't stop. It's like the game has me in a dream world. :)

========================================================
Actually I think I'm a tad ugly, but some women disagree, mostly Asians for some reason.

Ultio
Member #1,336
April 2001

Hit the S key while in gameplay to save your progress. This is one of the major flaws of the game (not having a save game menu item in the main menu list).

:) Glad you're enjoying it so much.

---
"It's nice knowing that someday, the software I write will just be pirated by millions of people." :-/
http://loomsoft.net | Zep's Dreamland | Allegro Newbie Tutorials

Evert
Member #794
November 2000
avatar

I actually didn't have any problems finding the s key to safe my progress... I think I was at level 34 or something a few days ago, haven't played since.
Really nice game... must have beenhell to think of all those levels though. I usually have to think a while on each level, even if I do know in principle how to solve it. Really great stuff.

Ultio
Member #1,336
April 2001

The main reason the game initially took so long to release was because I was brain fried trying to make new and unique levels. It's a hard process once you've used up all of your little "tricks" for making difficult levels. You eventually learn to adapt a little bit. You'd be surprised how many of those difficult levels were created merely out of luck; and by that I mean mashing tiles around and coming up with something I could possibly work with. :)

The reason I say this is one of the major flaws of the game is that saving (restarting and changing songs) doesn't adhere very well to the user interface I set up. Everything else in the game is user driven. Of course, I'm not saying the keyboard features should be removed, I just think there should be menu items to accompany them. :)

Thanks for the kind words. I'm glad you're having such a fun time with it. Only 6 more levels to go!

---
"It's nice knowing that someday, the software I write will just be pirated by millions of people." :-/
http://loomsoft.net | Zep's Dreamland | Allegro Newbie Tutorials

Peter Wang
Member #23
April 2000

Just wanted to say as well, this is a really great game! Thanks a lot. I only have one small suggestion, which is to make switching between windowed and fullscreen modes easier (e.g. ALT+Enter).

Evert
Member #794
November 2000
avatar

If you do more work on this, I'd love to be able to use my gamepad with this game... but, well... wishful thinking I suppose. :)

Ultio
Member #1,336
April 2001

That's a really good idea. I don't think it would be too hard to do with the current code I have. :) Maybe for a 1.03 or 1.10 release if any of those ever happen? ;)

---
"It's nice knowing that someday, the software I write will just be pirated by millions of people." :-/
http://loomsoft.net | Zep's Dreamland | Allegro Newbie Tutorials

Rick
Member #3,572
June 2003
avatar

I can't get level 31. Ultio, anyone?

========================================================
Actually I think I'm a tad ugly, but some women disagree, mostly Asians for some reason.

Evert
Member #794
November 2000
avatar

31 was a little bit tricky. First move right (make sure you replace breaking blocks with new ones, so that you can always walk back) to place a block to prevent you from plunging to your death, then move back left. Go down the left side and enter a teleporter. I don't remember the exact sequence, and I remember screwing up by misplacing a block up to five times after I'd figured it out... anyway, hope this little hint helps some...
Oh, you may have to block the teleporter immediately left from where you started by placing a block over it, I forget... could be another level I'm thinking of.

 1   2   3 


Go to: