Friday, January 21, 2011

Adventurer 0.0.2.5 - Cross-Platform with Mono

At long, long last, I can honestly call Adventurer cross-platform. It definitely runs on Windows and Ubuntu (Linux), and should run on Macintosh. Someone tell me if it does, if you've got a Mac. So if you've been following me the past week, I got almost nothing done with items. I did, however, go through a major operating system shift that took up most of my time. I am now primarily a Ubuntu user. Yay! I like it.

I am now using MonoDevelop to work on Adventurer, rather than Visual Studio. It seems largely the same, and it shouldn't be much of a leap for me. It also helps ensure that anything I do will be compatible with Mono, and so Adventurer should remain from now on fully cross-platform. Realize that I'm still doing this in C#: I've had a lot of debate in my web classes (which primarily use C++) about whether C++ or C# is better. While C++ has been around longer, I've found that I can get to anything C++ can do whenever I like, but usual programming is much more intuitive and faster. The main complaint is that C# isn't cross-platform. To that I say: Look at this right here. You may not have believed me, but right here is proof. I have run a C# program on something other than Windows.

Okay, so I didn't get much done with items. Like, frankly anything. Well, I got sidetracked on last week's bit of awesomeness. By the time I finished, it was already seven days, and time for an update. So here you all are. Windows users are going to be a little disappointed, but Linux and Mac users should at long last be able to play this thing without having to go to extreme emulation measures.

Next week will be back to work on items and other ideas I've had building up. Also an interesting note: It is 1/21/11 as of me posting this. Next week exactly, 1/28, is my birthday. I'll be 20. Wow, that feels really major when I write it like that. So what do I want? Well, I'm hoping that I would get a donation. Any donation. I've been working on Adventurer for several months, and I have almost $7 built up from ads. And if you aren't able or feeling up to giving me a monetary vote of confidence, then how about a textual one? Comment, tell me what you think, offer constructive criticism and suggestions. You may not think it, but seeing a new comment in my inbox really does lift my spirits.

14 comments:

  1. Congrats on hitting multi-plat as well as the looming b-day. Keep at things as best you can as I think this has the potential to eventually be one of the great Roguelikes with realized ambitions.

    ReplyDelete
  2. Mac doesn't appear to work. When I tried to run it on a Mac the terminal displayed the following.


    /Users/twilcox/Downloads/Adventurer\ 0_0_2_5/Run\ Adventurer\ with\ Mono ; exit;
    luna:~ twilcox$ /Users/twilcox/Downloads/Adventurer\ 0_0_2_5/Run\ Adventurer\ with\ Mono ; exit;
    Cannot open assembly 'Adventurer.exe': No such file or directory.
    logout

    [Process completed]

    ReplyDelete
  3. Those blackslashes are weird. They seem to be occurring any time there's a space. And since it can't find Adventurer, I'm assuming those backslashes are interfering with the path.

    Okay, as I'm researching I'm finding that spaces are used to tell the program to handle the following character specially. In this case, to handle spaces. So we're left with... Hrm. We're left with it trying twice to run the script and then exiting, without saying anything about what actually went wrong. Other that the path in the script can't find Adventurer.exe. The script is in the same folder as Adventurer.exe, right? The script in its entirety is:

    #!/bin/sh
    exec mono Adventurer.exe "$@"

    Here's a link to Mono's official guide to running Mono programs: http://www.mono-project.com/Guide:Running_Mono_Applications . Wish I knew more about why the script is failing, like what exact path it was trying to call for Adventurer.exe. You could open whatever terminal Mac has, navigating to the folder, and entering "mono Adventurer.exe" to see if that works, or what error it puts out. I'll keep researching this, but it's a really weird problem.

    ReplyDelete
  4. Aha, found the problem. Macs when running scripts default from the home folder, not the folder the script is in. I'm uploading a fixed version of Adventurer as we speak. Or, you can quickly fix it yourself by going into the script file and changing it to:

    #!/bin/sh
    cd "$(dirname "$0")"
    exec mono Adventurer.exe

    ReplyDelete
  5. I'll be sure to flip a tip in the jar next week, it won't be much but I like where this game is going. But there are people watching out there!

    ReplyDelete
  6. I think you should stop asking for donations and talking about not getting them. You seem to have this belief that you should be getting donations, and it comes across as entitlement which is off-putting.

    Why not just put a statement that along the lines of "if you wish to support me in my work on this project, please consider donating" or "remember, you can support this project by donating"?

    Congratulations on getting your project to this point, and good luck getting it to a level where it retains a playerbase and you have reason to expect donations! :-)

    ReplyDelete
  7. Heh, yeah, I'm probably saying it too much. But let me make it clear: I don't feel entitled to anything. I'm working on Adventurer for the experience of doing a major programming project. In both the sense of "Oh hey, that was pretty awesome, committing to something for so long" and "Hey, I can honestly say to an employer that I have n months of programming experience." Comments are nice and constructive towards the project, and like I said, that's a real morale bonus towards working on this. Donations or ad money are a much more tangible bonus from working on this. But overall? I'd still be doing this even if I never got a single view.

    If I ever do joke about not getting any comments or cash, it's more in a sarcastic, self-deprecating way. Like "most people would stop at this point thinking their stuff sucks", with an implied ", but I'm not going to" after it. I've seen way too many things fail from authors expecting too much too soon, and I came in to this knowing that. Though at the same time, it is nice reading what people have to say. The put the time of thinking of and writing a comment, when they didn't actually have to.

    So thank you for the criticism. I just removed the wall of text under the donate button. I'll add some links to the Adventurer main screen, maybe stick a "if you want to support the development of Adventurer, there's a donate button over here" at the end of the manual. Clean, simple, unobtrusive. The End of Month posts include statistics on views, ads, and donations because that's frankly all I can think of to report, and I want people to know. But I'll try to keep such statistics there so that I don't come off like I have a sense of entitlement about the whole thing. And I'll probably hold off on reporting a lack of donations, and only comment on if someone did. Then I can keep it positive, instead of seeming negative.

    ReplyDelete
  8. Ok... Now when I run on a Mac I get the following....


    luna:Adventurer 0_0_2_5 twilcox$ mono Adventurer.exe
    The dungeon collapses. Rocks fall, everyone dies. Kalasen apologizes for the instability.
    Perhaps you can salvage some understanding of the collapse from this arcane scroll.

    **********************************

    System.DllNotFoundException: /Library/Frameworks/SDL_ttf.framework/SDL_ttf
    at (wrapper managed-to-native) Tao.Sdl.SdlTtf:TTF_Init ()
    at Adventurer.Adventurer.PreInitialize () [0x00000] in :0
    at Adventurer.Adventurer.Main () [0x00000] in :0

    **********************************

    I'm pretty sure that I have SDL installed as I had to install it to run Magecrawl from http://iferrorthrownewbrick.blogspot.com/.

    ReplyDelete
  9. Good news is that Adventurer at least started. After that point, it's usually trivial to fix any remaining problems.

    I had a similar problem with Linux at first with SdlGfx. The way Mono handles .dll files, is that it finds an approriate replacement on the system. In the case of Linux, it's .so files. And the way SDL works, is that it has a couple sub-libraries that may or may not be installed alongside it. The short of it is that you need to install the missing sublibrary. In this case, SDL_ttf. In Linux when I had the SdlGfx problem, I just looked up the SdlGfx package and installed it, then everything worked. I assume something similar will need to be done on your end.

    If there's nothing obvious, then you can always find online the Mac file that is apparently "SDL_ttf", and paste it in "/Library/Frameworks/Sdl_ttf.framework/

    Oh, wait, I found the main SDL site where you can install SdlTtf and the others if you're missing anything else. http://www.libsdl.org/projects/SDL_ttf/
    I'll be listing that in the readme from now on.

    The grand list of libraries used is Sdl, SdlTtf, SdlImage, and SdlGfx. The base Sdl is needed for input and output. SdlTtf lets me load in a font so I can use text. SdlImage, lets me load in and use the tileset. And SdlGfx lets me draw boxes.

    ReplyDelete
  10. Ok, after installing some extra libraries the program ran launched and brought me to a screen with the text "", "Help", and "Quit", but no matter where I clicked or what button I pressed I couldn't get the game to start (or bring up a help menu, or quit).

    ReplyDelete
  11. That is... incredibly bizarre. The code for drawing "Start Game" is right above and completely identical to the code for drawing "Help" and "Quit", except for the words.

    If the arrow keys don't move the selection, and enter doesn't do anything at all... then I seriously have no idea how that problem could be happening. Maybe it got corrupted in some weird fashion? Try redownloading it? I really don't know what else to look at. But good luck trying to figure it out, the source code is out there. And if you do get it working, I'd like to know so that I can answer if anyone else gets the same problem.

    ReplyDelete
  12. Ahh... Actually, it did say (and I did type) "start game" but it looks like if you put it in brackets in these comments it will be removed. I typed "Start Game" in brackets in the first quote.

    ReplyDelete
  13. Ohhh, well then, this is looking a lot more solvable. I figured something really weird must be going on, turned out it was here at blogspot.

    So, your problem boils down to the input at the opening menu not working, much more doable. Maybe there's something weird going on between SDL and your keyboard. It might be a Mac thing. SDL is up there in popularity with OpenGL and DirectX, so there should be a lot of information about any problems SDL would have with your system. I'll also go over the input code again for the opening menu, to make sure nothing's too quirky. I'm just about to go to bed, but I'll research it in the morning. If I can, I'll fix whatever the problem is for the next update.

    ReplyDelete
  14. Hi I've been looking around for good rogue like games and This one seemed interesting. I like the direction it's going in with the ability to use materials to create items.

    I was on the second floor when it crashed on me this is the error log.

    System.ArgumentOutOfRangeException: 'minValue' cannot be greater than maxValue.
    Parameter name: minValue
    at System.Random.Next(Int32 minValue, Int32 maxValue)
    at Adventurer.Dice.Roll(Int32 sides)
    at Adventurer.Creature.LevelUpForSlayingImp()
    at Adventurer.Creature.MeleeAttack(Level currentLevel, Int32 dir)
    at Adventurer.Adventurer.Update_Move(Creature c, Byte i)
    at Adventurer.Adventurer.Update_Player(Creature c)
    at Adventurer.Adventurer.Update_MainGame()
    at Adventurer.Adventurer.Update()
    at Adventurer.Adventurer.Main()

    I'll continue to follow the progress of this game.

    ReplyDelete