Author Topic: GearHead: ArenaR First Release. Merry Christmas!  (Read 2588 times)

Offline Antsan

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: GearHead: ArenaR First Release. Merry Christmas!
« Reply #30 on: January 05, 2012, 08:47:24 AM »
I tried to compile on Ubuntu 10.04 x86-64, but all I get is this:

thomas@thomas-desktop:~/Programme/Fremde/Spiele/GH2.1$ fpc Arena_R
Free Pascal Compiler version 2.4.0-2ubuntu3.1 [2011/06/17] for x86_64
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for x86-64
Compiling Arena_R.pas
Compiling gears.pp
Fatal: Can't find unit lua used by gears
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode (normal if you did not specify a source file to be compiled)

I have lua5.1 liblua5.1-0 and liblua5.1-0-dev installed, so the problem is somewhere else.

Offline DudeGuyMan

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: GearHead: ArenaR First Release. Merry Christmas!
« Reply #31 on: January 11, 2012, 02:29:32 AM »
Dear content-making type people: I totally want to join the Bone Devil Gang and smite the forces of good.

Offline Joseph Hewitt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2552
    • View Profile
    • http://www.gearheadrpg.com
Re: GearHead: ArenaR First Release. Merry Christmas!
« Reply #32 on: January 12, 2012, 08:32:37 AM »
Antsan- The problem might be an older version of FPC; I'm running 2.4.4 myself. Version 2.4.0 might be missing the lua headers. I know that it's possible to manually install v2.4.4 version on Ubuntu 10.04 by downloading the deb file from SourceForge; another solution would be to get an alternate set of headers, such as thLua.

I've been extremely busy with job applications and stuff since the new year began; I hope to have some new GH stuff ready soon.

Offline DudeGuyMan

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: GearHead: ArenaR First Release. Merry Christmas!
« Reply #33 on: January 15, 2012, 02:51:12 AM »
Other random things I'd like to see in the remake:

Right now the data cartridge quest in Snake Lake is basically for hardcore forumgoer types only. No actual new player hears some random line about someone flushing a card down the toilet and thinks TIMED QUEST, FORGET ANY OTHER NEWBIE STUFF YOU MIGHT BE DOING AND COMB THE SEWERS NOW OR BE LOCKED OUT OF A LANCEMATE!

Offline magic.coding.fairy.peridot

  • Full Member
  • ***
  • Posts: 162
    • View Profile
Re: GearHead: ArenaR First Release. Merry Christmas!
« Reply #34 on: January 27, 2012, 01:34:09 PM »
Ooh! A hackable Lua version!

I'm using Ubuntu 11.10 on x86_64, and I had some of the problems people complain about above. I've resolved them all, I think, and here's how:

* Doesn't compile initially with complaints about missing Lua or SDL: the problem is that the FPC distribution has been broken up into multiple packages. Make sure you have all of them installed, and that you also have the lua5.1 and lua5.1-dev packages installed. These are not automatically included by the Ubuntu dependency mechanism, for some reason.

* SVN version fails to compile: there's a typo. Patch attached.

* Can't open the door or do anything: Lua is failing to read files. More specifically, lua_load is using Lua_SAtt_Reader to read Lua code from a Pascal list of strings, and something goes wrong in the second call to Lua_SAtt_Reader. I don't know what, but I fixed the code so that now it uses luaL_loadstring instead (very inefficiently). Also it reintroduces newlines that were stripped on reading the file. Patch attached.

Now to look into actual hacking on the game...

Offline DudeGuyMan

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: GearHead: ArenaR First Release. Merry Christmas!
« Reply #35 on: January 27, 2012, 10:33:39 PM »
Ooh, a better random suggestion: Can we have a way to change a mecha's designation, description, and even sprite via the engine as well as the name? I do it all the time via save editing in vanilla GH1. Because you know, when you strip that Chimentero down to a bare torso and build an agile MV 0 flying mecha around that sweet Class 5 Gyroscope, it's not really a Chimentero anymore.

Offline Daemonward

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Re: GearHead: ArenaR First Release. Merry Christmas!
« Reply #36 on: January 28, 2012, 11:52:16 AM »
After downloading the latest SVN of ArenaR (/pluslua branch, revision 721, found here: http://gearhead2.svn.sourceforge.net/viewvc/gearhead2/pluslua/?view=tar) and applying peridot's patches, I can confirm that ArenaR now runs properly on Ubuntu 11.10 64-bit (and presumably on 64-bit Debian systems as well).

Thanks, peridot. Good job!

Edit: I just noticed that checking rumors no longer causes the game to crash to the desktop. I am not sure if this was fixed by Joseph or if peridot's patches somehow resolved the issue.
« Last Edit: January 28, 2012, 12:02:33 PM by Daemonward »

Offline Joseph Hewitt

  • Administrator
  • Hero Member
  • *****
  • Posts: 2552
    • View Profile
    • http://www.gearheadrpg.com
Re: GearHead: ArenaR First Release. Merry Christmas!
« Reply #37 on: January 28, 2012, 06:55:36 PM »
Thanks, peridot! I'll add that to the next release- probably along with a config file option to use the efficient Lua loading or the LoadString loading. I'll also add your info to the readme file.

I probably committed to SVN in an uncompilable state by accident. I'll fix that.

Offline Petra

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: GearHead: ArenaR First Release. Merry Christmas!
« Reply #38 on: January 28, 2012, 09:05:21 PM »
This. is. SO. COOL. Yay!

Offline magic.coding.fairy.peridot

  • Full Member
  • ***
  • Posts: 162
    • View Profile
Re: GearHead: ArenaR First Release. Merry Christmas!
« Reply #39 on: January 28, 2012, 11:55:21 PM »
Thanks, peridot! I'll add that to the next release- probably along with a config file option to use the efficient Lua loading or the LoadString loading. I'll also add your info to the readme file.


De rien.

The inefficient version doesn't actually take any appreciable time, it just offends me because it's a quadratic-time algorithm. If you keep the lua_load version you may want to arrange to return a newline after each string; as far as I can tell, your current code effectively joins the whole chunk into one line, and as I understand Lua syntax, that's going to change its semantics if the user doesn't end every line with a semicolon.

As for what's wrong with lua_load, I never managed to track down the problem exactly, but I did note that the string returned by the reader function needs to stay alive even after the reader function returns. This should be fine, since I think it's just the original string cast to a PChar, so it lives on inside the gear. Another possibility is that the error message, "unexpected symbol", is what you get when there's trailing junk on the line in Lua. Since it happens on the second callback, could that be introducing some leading junk? I don't know.

Offline PlaintextMan

  • Full Member
  • ***
  • Posts: 106
  • Amo ergo gemo
    • View Profile
Re: GearHead: ArenaR First Release.
« Reply #40 on: February 06, 2012, 11:56:31 AM »
Yes! I've actually managed to compile and run GHAR on my Ubuntu Lucid x64 system, with the help of peridot's patches (thanks!). It wasn't so hard, save for the fact that I had to download a 50MB fpc compiler to get a <10MB bunch of sources going. ::)

List of things I did, sans various failed attempts.
  • Downloaded GHAR-0101-source.zip and unpacked it
  • Installed FPC version 2.4.4 from SourceForge. Version 2.4.0 that comes with my OS doesn't have the required Lua bindings to run the new GH.
    The install shell script in the package fpc-2.4.4.x86_64-linux.tar did the job perfectly. One must select to install the Pascal units/packages besides the compiler.
  • Downloaded and applied Peridot's patches. I put them in the subdirectory patches/.
Code: [Select]
$ patch plotbuild.pp patches/0001-Move-IsAQuest-check-outside-PlotGenContext.patch
$ patch gears.pp patches/0002-Replace-lua_load-with-luaL_loadstring.patch
  • Compiled Arena_R.pas with fpc (free pascal compiler).
Code: [Select]
$ fpc Arena_R.pas
  • Run Arena_R.  :)

I haven't found a crash so far, by the way. I've explored a little, and died in a cave at Calmegie. To my pleasant(?) surprise, there was no "You die. Someone rescues you and takes you to the hospital." That was a good part of GH1. That was a very bad part of GH1. Although I think the idea should be expanded, such as that you are taken to the hospital upon dieing in or near town, or in places that aren't too hostile and where someone might find you. It would also be cool if you were actually to encounter people in that same kind of distress here and there, and be able to "call emergency services", rescue them, etc. But I digress!

I haven't played or tinkered with GH in a long while (and I never really got to playing GH2, especially since it's not "at version 1.0 yet"). So I have a question: how do I compile or run Arena_R with the text/ncurses interface? Yeah, I'm one of those...
EDIT: I found a way: define the preprocessor macro "ASCII" to compile with text interface by invoking fpc with the argument -dASCII

Dear content-making type people: I totally want to join the Bone Devil Gang and smite the forces of good.

DudeGuyMan, keep up the occassional suggestion. I like some of them.

- A new world map system, which I hope you'll like.

It certainly be liked.

Now, I think I'll be on to hacking around with the game content...

EDIT 2: My, my! Coming from that ancient GH1.100, I'm impressed with the GH engine's development so far.
« Last Edit: February 06, 2012, 12:41:42 PM by plaintextman »

Offline PlaintextMan

  • Full Member
  • ***
  • Posts: 106
  • Amo ergo gemo
    • View Profile
Re: GearHead: ArenaR First Release. Merry Christmas!
« Reply #41 on: February 07, 2012, 11:58:59 AM »
(Sorry for double posting)

I am now trying to start populating the Snake Lake region with some of the stuff from GH1. First thing that comes to mind is Elric's shop, of course.

I'm trying to wrap my mind around the system, and also the system around my mind. So far neither is working very well, but I might be making some progress. The Lua parts in the design/setting/scene/rancon files are fairly obvious, the rest not so much (nudge, nudge). I like the mystery machine.

An important issue comes to mind: I've added a lame copy-paste-modify attempt at Snake Lake to ATLAS_Earth.txt after starting a game. Will I need to start a new RPG campaign to see the effects every time I modify the world?

I should probably be posting/asking about all this in a new thread, right? Under User Created Content?

Later EDIT: OK, this is seriously bugging me. Why are clips seemingly treated as fixed, attached objects? And what's with the redundant ammo/clip definitions in design/ directory? I'm busy trying to make a magazine dispensing vending machine for Elric's shop that pops out a few standard clip/ammo types for you (and maybe special extended mags). I want moar functionality right nau *rants and raves on* etc.
« Last Edit: February 07, 2012, 03:44:16 PM by PlaintextMan »

Offline magic.coding.fairy.peridot

  • Full Member
  • ***
  • Posts: 162
    • View Profile
Re: GearHead: ArenaR First Release. Merry Christmas!
« Reply #42 on: February 11, 2012, 07:26:29 PM »
EDIT 2: My, my! Coming from that ancient GH1.100, I'm impressed with the GH engine's development so far.


I have to say I much prefer the old engine's graphics and click-to-go. I'm also not sure I like the new city layout - they feel blander, somehow - there is no SF0 "outdoors", which feels weird for a post-apocalyptic small-villages setup. I do like the possibility of having a very large world map; it makes intercity travel feel like a longer voyage, and it motivates the intercity bus service.

An important issue comes to mind: I've added a lame copy-paste-modify attempt at Snake Lake to ATLAS_Earth.txt after starting a game. Will I need to start a new RPG campaign to see the effects every time I modify the world?


I'm not sure exactly hou the world map is supposed to be built - it starts from image/ghr.png, and worldmaker.pas reads it in and constructs a grid of modestly-sized patches with terrain based on the pixel values. Its output is a tmp_ATLAS_Earth.txt. I don't know how things like buildings and quests get attached. But there's a problem.

I can't compile worldmaker.pas on my linux x86_64 system, using fpc-2.4.4, because the sdlutils unit is not included on this platform (apparently there was a data size issue and the unit was dropped on this platform). It's needed at least for SDL_getPixel; if necessary that could be worked around.

Offline PlaintextMan

  • Full Member
  • ***
  • Posts: 106
  • Amo ergo gemo
    • View Profile
Re: GearHead: ArenaR First Release. Merry Christmas!
« Reply #43 on: February 12, 2012, 03:13:50 PM »
Glad to see activity.

I have to say I much prefer the old engine's graphics and click-to-go.

I'm having trouble figuring out whether the graphics are 2D, 3D or a combination of the two.

Heh, that's why I prefer (semi-)plain text interfaces over graphical ones when it comes to roguelikes. Definitely not the best in all respects, but their simplicity and stability are way underrated IMO. Put me on a graphical version and I can't make head from tail. Just saying :-P

I'm also not sure I like the new city layout - they feel blander, somehow - there is no SF0 "outdoors", which feels weird for a post-apocalyptic small-villages setup. I do like the possibility of having a very large world map; it makes intercity travel feel like a longer voyage, and it motivates the intercity bus service.

I feel the same; missing the SF:0 outdoors is a bummer considering the setting (and we need a minimap now). Even though in GH it was seriously somewhat unpolished, and I got tired of having almost *every single scenario* from drain cleaning to mecha fights handed to me on a single size of game board. I truly hope we can change that with GHAR. I guess mr Hewitt can help us with some advice or something when he has more time on his hands again.

I'm not sure exactly hou the world map is supposed to be built - it starts from image/ghr.png, and worldmaker.pas reads it in and constructs a grid of modestly-sized patches with terrain based on the pixel values. Its output is a tmp_ATLAS_Earth.txt. I don't know how things like buildings and quests get attached. But there's a problem.

I think I've figured some of it out: worldmaker generates a load of SF:world (SF:3?) sized 30x30 tile fragments from image/ghr.png. These are each dumped into setting/MAPS_EARTH_XxY.txt, in some format the engine understands as terrain. I'm slightly confused on the next part, but my tinkering mostly confirms that: The file setting/ATLAS_Earth.txt is where the world comes together; this file is not touched by worldmaker.pas but instead modified by hand. It contains references to each of the MAPS_EARTH* fragments for defining terrain, and includes some of its own code/markup/stuff for the actual cities. Static 'prop' buildings on the world map are actually just terrain features. I think the system is kind of neatly done. Well kind of :-P

I can't compile worldmaker.pas on my linux x86_64 system, using fpc-2.4.4, because the sdlutils unit is not included on this platform (apparently there was a data size issue and the unit was dropped on this platform). It's needed at least for SDL_getPixel; if necessary that could be worked around.

Strange. IIRC, worldmaker.pas compiled fine on my Ubuntu x86_64 system with fpc-2.4.4. I think though, that you will only need worldmaker if you actually want to modify the world terrain, and I haven't needed that so far. I'll too experiment with worldmaker some more some other day.

Subforum for GHAR?
I think we really need a better place to discuss and organize all this, even though (ATM?) it's not like the project is flying right off the ground. I'd suggest a GHAR discussion/developoment subforum.

Offline DudeGuyMan

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: GearHead: ArenaR First Release. Merry Christmas!
« Reply #44 on: February 13, 2012, 03:06:52 AM »
I kinda wish the focus had stayed on GH1, adding content/features, rather than a sequel that was never quite ready for primetime, and a reboot using the engine from the sequel. Just my two cents.