Roguelike Port: TomeNet?


klapse

Central Scrutinizer
Joined
Aug 30, 2012
Messages
1,932
Location
Germany
TomeNet port is possible


screenshot00.png


It is a very cool multiplayer roguelike http://www.tomenet.net/about.php


To get it to run i commented out


main-gcu.c:890://klapse if (i) quit("Angband needs an 80x24 'curses' screen")


then moved tomenet executeable into the tomenet-4.5.0 directory


and launched with


./tomenet -c to start the curses version.
 
I wanted to test this out and made a quick first compile without applying your fix. I only edit the makefile to add some optimisation-flags and modified one place from "-lcurses" into "-lncurses" because I was getting an error while compiling.


I was able to run the game by executing "./tomenet -c" in xterm. I tested it up to the point after the character-creation. Didn't know what to do there and d-pad didn't move, so I didn't try any further for now. After quiting I get a single line "Segmentation fault" though. Maybe a problem while writing some log or so.


Starting the game in "terminal" (the xfce-terminal) did not work. Produced some very strange bug where the terminal-output got messed up.


Starting the game without "-c" (in X11-mode) didn't work. Maybe because of a missing font (that's one of the error-messages shown).


I probably will try some more later.
 
I was able to run the game by executing "./tomenet -c" in xterm. I tested it up to the point after the character-creation. Didn't know what to do there and d-pad didn't move, so I didn't try any further for now.
You need to assign stats with "+", selet stat with Return and finish with Esc.

After quiting I get a single line "Segmentation fault" though. Maybe a problem while writing some log or so.


Starting the game in "terminal" (the xfce-terminal) did not work. Produced some very strange bug where the terminal-output got messed up.


Starting the game without "-c" (in X11-mode) didn't work. Maybe because of a missing font (that's one of the error-messages shown).
same here on all points.


Once you are in game, you can go to options with "=" and select roguelike keyset for movement. Arrow keys are broken for me.


screenshot01.png
 
What's also strange is that the config-file, which is normally (I tried it on my GentooPC as well) saved as "~/.tomenetrc", is named "~.tomenetrc.$$$" and always empty. Probably related to this is the segmenattion fault on exit (as it tries to write changes to the config-file) and the fact that I didn't manage to get the sound-fx-pack working, which did work with no effort on my GentooPC too.


Maybe these issues all can be solved my adjusting the makefile. I haven't got much experience with this compile-environment-configuration, but I might try around some more. I will report if I find a way to improve things.
 
Last edited by a moderator:
What's also strange is that the config-file, which is normally (I tried it on my GentooPC as well) saved as "~/.tomenetrc", is named "~.tomenetrc.$$$" and always empty. Probably related to this is the segmenattion fault on exit (as it tried to write changes to the config-file) and the fact that I didn't manage to get the sound-fx-pack working, which did work with no effort on my GentooPC too.


Maybe these issues all can be solved my adjusting the makefile. I haven't got much experience with this compile-environment-configuration, but I might try around some more. I will report if I find a way to improve things.
 
Thanks.


It's more important though to find the source of the problem.
 
Last edited by a moderator:
I get the segfault on exit and I have the .tomenetrc file. Needs someone with gdb-fu to debug.


EDIT: seems to happen in c-init.c line 1915


#ifndef WINDOWS


write_mangrc(); #endif


commenting it out resolves the segfault (have not found where WINDOWS got defined)
 
Last edited by a moderator:
No. The only thing I noticed was that I get segfaults on my GentooPC too when running the ncurses-version ("./tomenet -c").

Running the X11-version (without "-c") does not segfault. But I didn't manage to get that running on the Pandora. Might not even be a good idea doing so on the Pandora as it opens a couple of windows, which might be too much for the small screen.

How did you get rid of the segfault-message?

Edit: Doh! Didn't scroll backwards enough. Sorry. I found the answer myself.
 
Last edited by a moderator:
Segfault on exit seems to happen in c-init.c line 1915


#ifndef WINDOWS


write_mangrc(); #endif


commenting it out resolves the segfault (even though WINDOWS soes not seem to be defined)


I only get one window created with tomenet -c. Without -c I get many windows opened, but cannot input text into the main window.
 
#ifndef WINDOWS


write_mangrc(); #endif


commenting it out resolves the segfault (even though WINDOWS soes not seem to be defined)


Well that makes sense... the directive is #ifndef not #ifdef.  That line executes because WINDOWS is not defined.

- Neelix
 
After trying to understand what's going on in client.c for hours, I decided to ask in a tomenet-channel on irc. And someone helped me after a very few minutes. That was a great help on the one side, but on the other hand a bit frustrating regarding my long lasting efforts before. :)

Anyway, the fix will be in the next version, but since it's not clear when that will be released, he told me how to fix it myself. I tried it on my x86GentooPC and it works there. Now I will apply it on the Pandora, but compiling will take a while. So for now here is the fix:

[17:10] <TomeNET>  [Zop] ok, if you wan tto hotfix it (because we wont release a new client immediately because of this),
[17:10] <TomeNET>  [Zop] edit client.c, and in line 623 there should start a block of 'write_mangrc_aux()'  lines,
[17:11] <TomeNET>  [Zop] right after a line "#ifdef USE_X11"
[17:11] <TomeNET>  [Zop] between the use-x11 line and the first write_mangrc_aux(), you need to insert this line:
[17:11] <TomeNET>  [Zop] if (!strcmp("ANGBAND_SYS", "x11")) {
[17:12] <TomeNET>  [Zop] and also, between the last write_mangrc_aux() statement and the following '#endif' line, you need to insert a line just containing a closing bracket like this: }

After compiling tomenet for the Pandora, I will try to set up music and soundFX and will report back.
 
Last edited by a moderator:
After trying to understand what's going on in client.c for hours, I decided to ask in a tomenet-channel on irc. And someone helped me after a very few minutes. That was a great help on the one side, but on the other hand a bit frustrating regarding my long lasting efforts before. :)


Anyway, the fix will be in the next version, but since it's not clear when that will be released, he told me how to fix it myself. I tried it on my x86GentooPC and it works there. Now I will apply it on the Pandora, but compiling will take a while. So for now here is the fix:
Problem here is that the X11 version creates many windows, only one of which is visible at a time. If you use the curses version, you get all needed information on one screen (still needed are a few tweaks to relocate some text)


The curses version is what I am playing atm...
 
I just remembered, that you, klapse, said that your backspace key does not work in tomenet. You could try to exchange the /etc/inputrc as root with the one I posted here. Better backup yours first. That's at least one of the things I modified while sorting trying to get backspace/del working in various situations.
 
Last edited by a moderator:
I found that ctrl+h deletes text from chat window just fine. TYhanks
 
Back
Top