Discussion:
Sangband is back.
(too old to reply)
Leon Marrick
2007-04-07 03:51:12 UTC
Permalink
Sangband is back.

For pretty much all of last year, my health fluctuated between
poor and downright ugly; pretty much nothing got done between February
and December (except for an alpha-quality demo written in August that
I should have shared but didn't). Things got so bad, in fact, that on
several occasions I gave serious consideration to packing it in and
letting Sangband go to someone who could actually maintain the thing.

But I didn't. And, starting early this year, things have gotten
better. Enough better that a new release of Sangband is here. It's
the long-awaited Version 1. I'm not going to post up a changelog but
instead let you imagine what it took for me to be so bold.

Website:
http://runegold.org/sangband/

Source (for Linux, Windows, etc.):
http://runegold.org/sangband/files/sang100src.rar

Windows executable:
http://runegold.org/sangband/files/sang100swin.zip
--
S(all) W/D H+ D c+ f? PV++ s? d- P++ M+
C S !I !So SQ RQ V+ F:<<buffer overrun>>
http://angband.oook.cz/code
Nick McConnell
2007-04-07 05:00:29 UTC
Permalink
This is truly excellent news. I hope the good health continues.

As to the game, for the brief life of my first character it looked excellent.

Nick.
--
Nick McConnell
FA + "Ooog" DN L:42 DL:57 A+ R++ Sp w:Rog
FA*/A/NPP/O/Po/St/Un W/L H- D c-- f- PV+ s- d++ P++ M+
C-- S- I* So+ B+ ac GHB SQ? RQ+ V-/V+@ F:NPP notes, etc.
Diego Gonzalez
2007-04-07 16:57:21 UTC
Permalink
Hi Leon

Welcome back! I'm glad to hear that you are better and for having you with us
again.

BTW, the link to the source file seems to be broken :)

-Diego
Christer Nyfalt
2007-04-07 17:11:11 UTC
Permalink
Post by Leon Marrick
Sangband is back.
For pretty much all of last year, my health fluctuated between
poor and downright ugly; pretty much nothing got done between February
and December (except for an alpha-quality demo written in August that
I should have shared but didn't). Things got so bad, in fact, that on
several occasions I gave serious consideration to packing it in and
letting Sangband go to someone who could actually maintain the thing.
But I didn't. And, starting early this year, things have gotten
better. Enough better that a new release of Sangband is here. It's
the long-awaited Version 1. I'm not going to post up a changelog but
instead let you imagine what it took for me to be so bold.
I'm glad to hear that you're OK.
--
Christer Nyfalt
Timo Pietilä
2007-04-07 17:15:26 UTC
Permalink
Post by Leon Marrick
Sangband is back.
For pretty much all of last year, my health fluctuated between
poor and downright ugly; pretty much nothing got done between February
and December (except for an alpha-quality demo written in August that
I should have shared but didn't). Things got so bad, in fact, that on
several occasions I gave serious consideration to packing it in and
letting Sangband go to someone who could actually maintain the thing.
But I didn't. And, starting early this year, things have gotten
better.
Good to hear. I hope you get well soon. Sangband is one of my all-time
favorite variants.
Post by Leon Marrick
http://runegold.org/sangband/files/sang100src.rar
This one is missing one "1" ..../sang100src1.rar

Timo Pietilä
The Wanderer
2007-04-07 17:41:29 UTC
Permalink
I'm not sure if this should go privately (since technically it's a bug
report), or if publicly is appropriate (since others may well have
encountered the same problem). Posting publicly, because the last time I
sent a private bug report to a maintainer of a variant I got no response
at all.
Post by Leon Marrick
Sangband is back.
For pretty much all of last year, my health fluctuated between poor
and downright ugly; pretty much nothing got done between February and
December (except for an alpha-quality demo written in August that I
should have shared but didn't). Things got so bad, in fact, that on
several occasions I gave serious consideration to packing it in and
letting Sangband go to someone who could actually maintain the thing.
But I didn't. And, starting early this year, things have gotten
better. Enough better that a new release of Sangband is here. It's
the long-awaited Version 1. I'm not going to post up a changelog but
instead let you imagine what it took for me to be so bold.
Though, of course, anyone capable of reading the sources can run a diff
and see for themselves.

(I can read the sources, but not nearly well enough to tell what effect
the changes will have on actual gameplay in most cases. From what little
I can tell, they mostly seem to each fall into one of two categories:
either "minor tweak" or "extensive surgery".)
Post by Leon Marrick
http://runegold.org/sangband/files/sang100src.rar
This does not compile under Linux for me, using Makefile.std, even after
I copy the files back from the unix/ subdirectory (since that is easier
than modifying the references in the Makefile appropriately). main-gcu.c
fails on undefined references to screen_rows, which is not defined
anywhere in the source; I would guess that it is supposed to be defined
in ncurses.h, but the copy on my system does not define that symbol.

In the last version I tried compiling (0.9.9), which I believe I was
able to compile successfully, screen_rows is referenced in all of:

birth.c
cave.c
changes.txt
cmd3.c
cmd4.c
cmd6.c
dungeon.c
externs.h
files.c
info.c
main.c
main-crb.c
main-gcu.c
main-gtk.c
main-ibm.c
main-mac.c
main-win.c
main-x11.c
monster1.c
obj_make.c
skills.c
store.c
talents.c
util.c
variable.c
wizard2.c

In the sources extracted from that RAR file, it is mentioned only in:

changes.txt
mac/main-crb.c
mac/main-mac.c
unix/main-gcu.c
unix/main-gtk.c
unix/main-ibm.c
unix/main-x11.c

I expect that all of these main-*.c files would fail in exactly the same
way as main-gcu.c My guess would be that the Windows port has been
modified to account for the fact that the variable is no longer
available, but the other ports have not.

I also tested compiling with makefile.sdl (any reason for the unusual
capitalization?), since main-sdl.c is the only main-*.c file other than
main-win.c to not reference screen_rows. That does compile successfully,
but fails in the linking stage with various missing FreeType symbols.
This may potentially be a problem with inconsistent SDL and/or FreeType
libraries on my system.
--
The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.
p***@gmail.com
2007-04-07 18:47:10 UTC
Permalink
I think Google Groups ate my previous post, so I'll summarize what I
did with similar issues here.
Post by The Wanderer
This does not compile under Linux for me, using Makefile.std, even after
I copy the files back from the unix/ subdirectory (since that is easier
than modifying the references in the Makefile appropriately). main-gcu.c
fails on undefined references to screen_rows, which is not defined
anywhere in the source; I would guess that it is supposed to be defined
in ncurses.h, but the copy on my system does not define that symbol.
I couldn't get it to compile either out of the box, but managed to
hack it up. I just defined screen_rows in the top of a header file to
make it compile. The functions it is used in never get called; as the
rows_hook has been removed as well. Another problem was that it
refered to wid and hgt in a struct where it had been changed to cols
and rows, but that was an easy fix.
Post by The Wanderer
I expect that all of these main-*.c files would fail in exactly the same
way as main-gcu.c My guess would be that the Windows port has been
modified to account for the fact that the variable is no longer
available, but the other ports have not.
I also tested compiling with makefile.sdl (any reason for the unusual
capitalization?), since main-sdl.c is the only main-*.c file other than
main-win.c to not reference screen_rows. That does compile successfully,
but fails in the linking stage with various missing FreeType symbols.
This may potentially be a problem with inconsistent SDL and/or FreeType
libraries on my system.
I had problems with the SDL version, since it requires version 1.2.11
for the SDL_VideoInfo->current_w and current_h values, and the most
recent Debian stable has only libs for 1.2.8.

Three other "major" problems I had are that the defines for graphics
(Adam Bolt, David Gervais, etc.) have been changed, but not in the x11
files, the X11 window is hard-coded to be 80x25 (specifically around
line 2850 near the comment "/* Main window min size is 80x25 */"), and
the 'M' command crashes both curses and X11. The obvious solutions
are "turn graphics off", "change the hard-coded size to 80x50", and
"don't do the M command".

Alex Power
Xiong Changnian
2007-04-07 17:45:48 UTC
Permalink
Post by Leon Marrick
Sangband is back.
Cool! Post a Mac OS 9 exec and I'll let you know how it goes.

A long time since I played Sang. I remember I used to fennel such studly
rings I had to keep track of them on paper.

Sorry to hear you've not been feeling well. Take care of yourself.
--
Xiong Changnian
xiong102ATxuefangDOTcom
--
Posted via a free Usenet account from http://www.teranews.com
magnate
2007-04-07 19:32:31 UTC
Permalink
Post by Leon Marrick
Sangband is back.
For pretty much all of last year, my health fluctuated between
poor and downright ugly; pretty much nothing got done between February
and December (except for an alpha-quality demo written in August that
I should have shared but didn't). Things got so bad, in fact, that on
several occasions I gave serious consideration to packing it in and
letting Sangband go to someone who could actually maintain the thing.
But I didn't. And, starting early this year, things have gotten
better. Enough better that a new release of Sangband is here. It's
the long-awaited Version 1. I'm not going to post up a changelog but
instead let you imagine what it took for me to be so bold.
Hi Leon - welcome back. Hope your health issues are permanently
solved. I look forward to trying the new Sang,

CC
Andrew Doull
2007-04-07 21:08:29 UTC
Permalink
Post by Leon Marrick
Sangband is back.
For pretty much all of last year, my health fluctuated between
poor and downright ugly; pretty much nothing got done between February
and December (except for an alpha-quality demo written in August that
I should have shared but didn't). Things got so bad, in fact, that on
several occasions I gave serious consideration to packing it in and
letting Sangband go to someone who could actually maintain the thing.
But I didn't. And, starting early this year, things have gotten
better. Enough better that a new release of Sangband is here. It's
the long-awaited Version 1. I'm not going to post up a changelog but
instead let you imagine what it took for me to be so bold.
Hi Leon,

I'm glad you're back. I hope you are feeling better and things are working out
for you. Looking forward to checking out the changes.

Andrew
--
The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
http://unangband.berlios.de http://roguelikedeveloper.blogspot.com
Andrew Doull
2007-04-07 21:23:52 UTC
Permalink
Post by Andrew Doull
Post by Leon Marrick
Sangband is back.
For pretty much all of last year, my health fluctuated between
poor and downright ugly; pretty much nothing got done between February
and December (except for an alpha-quality demo written in August that
I should have shared but didn't). Things got so bad, in fact, that on
several occasions I gave serious consideration to packing it in and
letting Sangband go to someone who could actually maintain the thing.
But I didn't. And, starting early this year, things have gotten
better. Enough better that a new release of Sangband is here. It's
the long-awaited Version 1. I'm not going to post up a changelog but
instead let you imagine what it took for me to be so bold.
Hi Leon,
I'm glad you're back. I hope you are feeling better and things are working out
for you. Looking forward to checking out the changes.
One thing I noticed going through the list of changes:

"- Some work on the palettes of 16x16.bmp and 32x32.bmp. Both suffer from
unbalanced palettes - excessive usage of slots for almost identical colors and
not enough shades and tones in useful hues. A small amount of color
re-assignment (be careful if you move graphics from Sangband's versions of the
bitmaps to Angband's). Some more comments in the /lib/xtra/graf directory."

For a long time, the 32x32.bmp distributed with Angband was using a
gamma-corrected version of the original David Gervais tiles. The only way to
fix this up was by manually re-adding all the tiles back in in the correct order
- I did this about 3 years ago and I believe Robert updated these. I just want
to confirm that you are using the 32x32 tiles that I had fixed - it sounds like
from the above comments that you may not have been.

The easiest way to tell if this was the case is that the ant legs disappeared in
the gamma-corrected set. They should be visible in the set I fixed.

Andrew
--
The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
http://unangband.berlios.de http://roguelikedeveloper.blogspot.com
Chris Wesling
2007-04-07 23:56:42 UTC
Permalink
Post by Leon Marrick
Sangband is back.
For pretty much all of last year, my health fluctuated between
poor and downright ugly; pretty much nothing got done between February
and December (except for an alpha-quality demo written in August that
I should have shared but didn't). Things got so bad, in fact, that on
several occasions I gave serious consideration to packing it in and
letting Sangband go to someone who could actually maintain the thing.
But I didn't. And, starting early this year, things have gotten
better. Enough better that a new release of Sangband is here. It's
the long-awaited Version 1.
Welcome back! Glad to hear your health is better; best wishes for it to stay so.

Chris W.
--
Replace the spamblock with sbcglobal [period] net to email me.

"My grandfather always said, 'Don't watch your money; watch your health.'
So one day while I was watching my health, someone stole my money. It was
my grandfather." -- Jackie Mason
Dave
2007-04-08 10:16:02 UTC
Permalink
Post by Leon Marrick
Sangband is back.
For pretty much all of last year, my health fluctuated between
poor and downright ugly; pretty much nothing got done between February
and December (except for an alpha-quality demo written in August that
I should have shared but didn't). Things got so bad, in fact, that on
several occasions I gave serious consideration to packing it in and
letting Sangband go to someone who could actually maintain the thing.
But I didn't. And, starting early this year, things have gotten
better. Enough better that a new release of Sangband is here. It's
the long-awaited Version 1. I'm not going to post up a changelog but
instead let you imagine what it took for me to be so bold.
Bravo! I've just managed to compiled a SDL version for Sharp Zaurus.
And it is terrific! 32x32 tiles, sound and music all work. And there
is even mouse support! The user setting interface is much better and
things can be modified easily also in ~/.sangband/config.txt. Now I
can really tell how much effort Leon has put on this one of the best
variants. Thanks!

There was only a small glitch in main-sdl.c about "current_h" and
"current_w" in my compilation and I did a very minor change:

First I added:
#define current_h 640
#define current_w 480
(because the Zaurus display is VGA)

Then I removed all the instances of "VideoInfo->" preceding
"current_w" and "current_h" in the file. Then make went through.

Here are my screencaps from my Zaurus:

Loading Image...
Loading Image...
Loading Image...

I am packaging it up now. Leon, are you interested in hosting the
port?

Dave
Peter
2007-04-08 17:01:02 UTC
Permalink
Post by Leon Marrick
Sangband is back.
Windows user here, that uses 800x600 resolution.
I'm sorry Leon, but for me this user interface is completely unfriendly. I like
to play in a movable window that takes ~70-80 % of entire screen, not a full
one. In this version I can't change window size, editing config.txt and changing
WindowWid/WindowHgt crashes or freezes the game. Also I don't need any black
space at the bottom of the game screen with a reminder of basic commands. Any
advice?

Cheers
Peter
camlost
2007-04-08 18:27:36 UTC
Permalink
from changelog.rtf
There are four basic display modes: fullscreen, larger map;
fullscreen, more sub-windows; windowed, larger map; windowed, more
sub-windows. Each of these causes the game to read from first a large
array of default window positions and then from the configuration file,
with the latter taking priority. The game can also automatically size
windows to fit a non-standard screen size. The resulting window layout
bears some resemblance to Master of Orion II.


To change the submenus at the bottom, try going to the display menu ("=4")

TO change whether there are windows or not, I don't know. Are you
quitting Sangband before you change config.txt?
Post by Peter
Post by Leon Marrick
Sangband is back.
Windows user here, that uses 800x600 resolution.
I'm sorry Leon, but for me this user interface is completely unfriendly. I like
to play in a movable window that takes ~70-80 % of entire screen, not a full
one. In this version I can't change window size, editing config.txt and changing
WindowWid/WindowHgt crashes or freezes the game. Also I don't need any black
space at the bottom of the game screen with a reminder of basic commands. Any
advice?
Cheers
Peter
Peter
2007-04-08 22:39:28 UTC
Permalink
Post by camlost
from changelog.rtf
There are four basic display modes: fullscreen, larger map;
fullscreen, more sub-windows; windowed, larger map; windowed, more
sub-windows.
Sigh...tried all of them. Windowed modes gives a full screen window that I can't
resize, and barely move, obviously no sub-windows can be seen in any mode.
Post by camlost
Each of these causes the game to read from first a large
array of default window positions and then from the configuration file,
with the latter taking priority. The game can also automatically size
windows to fit a non-standard screen size. The resulting window layout
bears some resemblance to Master of Orion II.
I don't get it. 800x600 is a non-standard screen size?
Post by camlost
To change the submenus at the bottom, try going to the display menu ("=4")
Black space at the bottom remains, only without basic commands. I can't find a
way to eliminate that space entirely.
Post by camlost
TO change whether there are windows or not, I don't know. Are you
quitting Sangband before you change config.txt?
Obviously.
After manually changing window size in config.txt, and running the game, all I
got is a black screen, or black window in windowed mode. No fonts, nothing, just
black space. Pressing Escape exits game, but sometimes program freezes.

Cheers
Peter
camlost
2007-04-08 17:28:17 UTC
Permalink
Welcome back!

Joshua
Post by Leon Marrick
Sangband is back.
For pretty much all of last year, my health fluctuated between
poor and downright ugly; pretty much nothing got done between February
and December (except for an alpha-quality demo written in August that
I should have shared but didn't). Things got so bad, in fact, that on
several occasions I gave serious consideration to packing it in and
letting Sangband go to someone who could actually maintain the thing.
But I didn't. And, starting early this year, things have gotten
better. Enough better that a new release of Sangband is here. It's
the long-awaited Version 1. I'm not going to post up a changelog but
instead let you imagine what it took for me to be so bold.
http://runegold.org/sangband/
http://runegold.org/sangband/files/sang100src.rar
http://runegold.org/sangband/files/sang100swin.zip
R. Dan Henry
2007-04-08 18:49:03 UTC
Permalink
Post by Leon Marrick
Sangband is back.
Well, it never actually went away.
Post by Leon Marrick
For pretty much all of last year, my health fluctuated between
poor and downright ugly;
That's too bad; I'd much rather you'd been missing because you were too
exhausted from great sex. Good to see you're well enough to return to
rgra.
Post by Leon Marrick
But I didn't. And, starting early this year, things have gotten
better. Enough better that a new release of Sangband is here. It's
the long-awaited Version 1. I'm not going to post up a changelog but
instead let you imagine what it took for me to be so bold.
Version 1? Maybe it is time to give your Sangband a try... well, after
the inevitable bugfix release.
--
R. Dan Henry
***@inreach.com
Paul is dead!
Andrew Doull
2007-04-08 20:45:24 UTC
Permalink
On Fri, 06 Apr 2007 23:51:12 -0400, Leon Marrick
Post by Leon Marrick
Sangband is back.
Well, it never actually went away.
Post by Leon Marrick
For pretty much all of last year, my health fluctuated between
poor and downright ugly;
That's too bad; I'd much rather you'd been missing because you were too
exhausted from great sex.
No, that's why Unangband is on hiatus at the moment...

Andrew
--
The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
http://unangband.berlios.de http://roguelikedeveloper.blogspot.com
Nick McConnell
2007-04-08 21:34:40 UTC
Permalink
Post by Andrew Doull
Post by R. Dan Henry
That's too bad; I'd much rather you'd been missing because you were too
exhausted from great sex.
No, that's why Unangband is on hiatus at the moment...
I thought it was just that you'd had so many releases recently .... I'll stop
now.

Nick.
--
Nick McConnell
FA + "Ooog" DN L:42 DL:57 A+ R++ Sp w:Rog
FA*/A/NPP/O/Po/St/Un W/L H- D c-- f- PV+ s- d++ P++ M+
C-- S- I* So+ B+ ac GHB SQ? RQ+ V-/V+@ F:NPP notes, etc.
Leon Marrick
2007-04-09 03:48:41 UTC
Permalink
OK. Got a collection of helpful bug reports and also some posts that
indicate I need to provide better documentation on compiling, porting
and such. Let's see if this post helps.

Some people seem to have arrived at the website right at the moment -
and I swear it was only a moment - that the source code release had a
temporary "1" at the end of its name. Pretty neat, that.


Rolling your own version of Sangband:

There are only two ports that I personally keep up-to-date. The first
is the Windows port, intended to serve everyone with a Windows PC
updated in the last decade. The second is the cross-platform SDL
(Simple DirectMedia Layer) port; SDL runs on a wide variety of graphical
platforms, but I have actually compiled and tested this port only on
Linux and Windows.

I do not guarantee that any other port will be up to date. You should
not try them unless the above two ports cannot be made to work correctly
on your system. I'm always grateful for additional and updated ports,
and will post them on the official website, but future changes in the
underlying game interface code can't help but break compatibility again
in the future. Sorry about that. :-/


Compiling for the Macintosh:

- If the SDL port does not compile on Mac OS X 1.2 or better, it is
unlikely to be SDL's fault.

Lacking a Mac to check this myself, I need help in either 1) verifying
that the SDL port already works on Macs, or 2) making the necessary
corrections to make it work.


Compiling for Linux:

- Only the SDL port is fully up to date. Getting it to run on my test
system involves:
1) Updating to SDL 1.2 (don't try earlier versions) and SDL_ttf (also
SDL_mixer if you want sound and music).
2) typing "make -fmakefile.sdl".

If things aren't so simple as that on your system, start by reading the
documentation in "makefile.sdl". I'm a Linux newbie so the docs
probably do need improvement. So does the overall packaging. I want
things to be as easy for Linux folks as possible, with a true one-click
install the eventual goal; suggestions for achieving this are welcome.

- The X11 and GTK ports are only partly up to date. They are correct
for Sangband beta 20, thanks to Christer and others, but the interface
code has changed some since then. I'm hesitant to ask him or anyone
else to update these ports again because any update would only be
temporary. I apologize for not being able to offer everyone their
accustomed ports.

- The GCU port is quite out of date.


Full control of windows in the SDL and Windows ports:

Recommendation: Give the new look and feel a fair sporting chance
before working too hard at tweaking it to look like other variants. I
understand that it is unfamiliar; new interfaces tend to be. ;-)


The one important feature of the Windows port that I broke was
interactive window placement and sizing. I need to do some polishing on
the new windowing code (every bugreport helps!) before being able to
restore this.

That said, everything is editable except window size. The game will
generate a file called "config.txt" the first time you use it. Open up
this file and you can edit visibility for all windows, as well as cause
the application to be either full-screen or windowed.

Note that the game saves your preferences for each display mode (and
also each resolution), and that it saves these preferences when it
closes. Editing after the section [800x600 resolution: Display mode 0,
Term-0] will change the first window, in display mode 0 (full screen,
larger map), 800x600 resolution.

See also the documentation in the user interface display (go into options).
Peter
2007-04-09 10:00:08 UTC
Permalink
(...many interesting things...)
Recommendation: Give the new look and feel a fair sporting chance
before working too hard at tweaking it to look like other variants. I
understand that it is unfamiliar; new interfaces tend to be. ;-)
The one important feature of the Windows port that I broke was
interactive window placement and sizing. I need to do some polishing on
the new windowing code (every bugreport helps!) before being able to
restore this.
Again, I'm sorry Leon, but this makes this game unplayable for me. I need
somewhat lighter and coloured space around game window, i.e. screen background,
otherwise looking at this completely black screen makes my eyes hurt. It is not
a matter of convenience for me, but a necessity...
Well, I've waited more than a year for a new version of my favourite variant, so
I can wait more...;)...
That said, everything is editable except window size.
Yep, learned that the hard way...:)...

Cheers
Peter
Dave
2007-04-09 11:11:57 UTC
Permalink
A few things when trying 1.0 on Mac:

1) SDL libs
I got the 1.0 SDL version compiled on my Macbook. The original SDL
library packages for Mac (from the SDL official site) do not fit, so I
had to install SDL, SDL_mixer and SDL_ttf via Macports in /opt/local,
and the add the correct paths in makefile.sdl. Then make succeeded.

2) Issue with music
The game plays (from the terminal), but will quit every now and then
when music is on, with errors like this:

sangband.exe(4429,0xa000d000) malloc: *** Deallocation of a pointer
not malloced: 0x164ca0; This could be a double free(), or free()
called with the middle of an allocated block; Try setting environment
variable MallocHelp to see tools to help debug

This doesn't seem to happen when music is off.

3) Display issues
a. Another thing is the screen display. Only display modes 0 and 1
work. Set to 2 or 3 the game won't launch. In mode 1, sometimes the
main screen will expand to the bottom area, mixing up with the
messages and the short key help parts.
b. The game only plays fullscreen. It would be nice if there is a
window frame, or some way to manipulate the window size, so that i can
switch to other programs while the game is loaded. But now i can't do
anything else unless I exit the game.
c. In shops, the list of items for sale will go dark when I switch to
some other lists, such as my own item list, and when I finish a deal.

4) Filename of the excutable
Is the binary hardcoded to be "sangband.exe"? I tried to change it to
"sangband" in makefile.sdl but the resulting binary won't run. Only
"sangband.exe" does. Why?

Thanks again and take good care!
Dave
Christophe Cavalaria
2007-04-09 11:33:59 UTC
Permalink
Post by Leon Marrick
- If the SDL port does not compile on Mac OS X 1.2 or better, it is
unlikely to be SDL's fault.
Lacking a Mac to check this myself, I need help in either 1) verifying
that the SDL port already works on Macs, or 2) making the necessary
corrections to make it work.
- Only the SDL port is fully up to date. Getting it to run on my test
1) Updating to SDL 1.2 (don't try earlier versions) and SDL_ttf (also
SDL_mixer if you want sound and music).
2) typing "make -fmakefile.sdl".
It seems you've used a feature that requires SDL 1.2.11 at least. THAT could
be the source of the problem.
The Wanderer
2007-04-09 16:56:36 UTC
Permalink
Post by Leon Marrick
OK. Got a collection of helpful bug reports and also some posts that
indicate I need to provide better documentation on compiling,
porting and such. Let's see if this post helps.
It does, indeed, but is not quite enough by itself.
Post by Leon Marrick
There are only two ports that I personally keep up-to-date. The
first is the Windows port, intended to serve everyone with a Windows
PC updated in the last decade. The second is the cross-platform SDL
(Simple DirectMedia Layer) port; SDL runs on a wide variety of
graphical platforms, but I have actually compiled and tested this
port only on Linux and Windows.
This is fine, or at least tolerable; the problem was that it was not
clear, and the natural expectation is that all ports made available as
part of a release will be up to date and functioning with the rest of
the release. (Though admittedly I may be slightly spoiled by the MPlayer
project, which is unusual in that even the latest mid-development code
is intended to be functioning and stable at almost all times.)
Post by Leon Marrick
I do not guarantee that any other port will be up to date. You
should not try them unless the above two ports cannot be made to work
correctly on your system. I'm always grateful for additional and
updated ports, and will post them on the official website, but future
changes in the underlying game interface code can't help but break
compatibility again in the future. Sorry about that. :-/
Entirely understandable. The problem could be somewhat rectified by
documenting what the changes in the underlying interface code are, so
that someone else could more easily keep the other ports up to date, but
I do understand that documenting even a program much less its code is in
some ways a much bigger task than actually writing it - and would a: be
less fun and b: take time away from development, in any case. (Also see
below.)
Post by Leon Marrick
- Only the SDL port is fully up to date. Getting it to run on my
1) Updating to SDL 1.2 (don't try earlier versions) and SDL_ttf (also
SDL_mixer if you want sound and music).
2) typing "make -f makefile.sdl".
Now that I've actually installed SDL_ttf (a library which I did not even
realize existed and which does not seem to be mentioned in the included
build documentation), it does compile and run, although only when both
named 'sangband.exe' *and* in a particular directory (the one to which
it is moved by the last step of that make command).

I have, if I'm not mistaken, configured it to run from any location; I
have changed the definition of DEFAULT_PATH in config.h from
'.${PATH_SEP}lib${PATH_SEP}' to '/usr/share/games/sangband/1.0.0'. The
version I got from compiling (with some source code tweaks) using
Makefile.std does pick up that path correctly, but the version obtained
by compiling with makefile.sdl does not. It also does not pick up my
redefinition of the "private user path" in the same file, but does if I
make the same redefinition in h-config.h; does the SDL port now ignore
config.h and use h-config.h instead, even though the latter does not
provide all of the same functionality (at least by default)?

Even if so, that still does not explain the fact that the same
executable does not run (that is, exits immediately with a return code
of 0, indicating no failure) even from its desired location, if its
filename does not end in '.exe'. The only mention of this string which I
find in the code is in main-sdl.c, and appears to be part of the code
which digs out the name of the directory from which the program was
run,j so I am not sure why this takes place.


A second issue is that the SDL port, even when run in its desired
location and with its desired filename extension, runs in fullscreen by
default and I see no mention of a way to switch that off. I prefer to
run windowed when running in a graphical environment, so that I can
easily make use of other windows for things like notes and calculations
(and even conveniently switch away to do other things, if necessary); if
I wanted to run fullscreen, I would do it from a console.

There is nothing inherently wrong with running in fullscreen, though
since it appears to be a change I don't think it should be automatically
made default, but there should definitely be a way to disable the
behaviour if the user does not want it.


There is also the minor issue that whenever I exit the program, I get:

==
*** glibc detected *** free(): invalid pointer: 0x0819bd00 ***
Aborted
==

Since this comes only on exit, it does not appear to affect actual use
of the program, but it is certainly not an intended or desirable thing.
Post by Leon Marrick
If things aren't so simple as that on your system, start by reading
the documentation in "makefile.sdl". I'm a Linux newbie so the docs
probably do need improvement.
One thing I have learned in even the comparatively limited time (several
years) I've spent following various open-source projects: the
documentation *always* needs improvement. Any exception is a momentary
aberration, which will inevitably be corrected by the inexorable pace of
development.
Post by Leon Marrick
So does the overall packaging. I want things to be as easy for Linux
folks as possible, with a true one-click install the eventual goal;
suggestions for achieving this are welcome.
One very useful step towards that goal - or the goal of a simple
install, at least, since "one-click" assumes a graphical interface which
does not really apply when compiling software under *nix - would be the
inclusion of a functional configure script (preferably *not* using
autotools, although that would be better than nothing), which performs
detection for libraries and so forth (and fails if they are not
available), and creates config.mak and config.h files with the
appropriate values for whatever system the script was run on. Such a
script would also accept arguments to specify desired locations for the
lib/ directories and for the private user path, whether or not to even
use private user paths, which port or ports should be compiled, and
(eventually down the line) anything else which can presently be
configured only by manually editing config.h and/or the appropriate
Makefile.

(Since you say you're a Linux newbie, a brief rundown of things which
you may in fact already know. The canonical installation method for
anything which is compiled from source is the simple sequence of:

<change to the directory where the souSince you sarce is>
./configure
make
<make sure that you are a user who has write access to the install
location set by the configure script>
make install

In practice it is frequently necessary to pass various options in the
./configure step, but in theory a basic probably-usable result should be
produced even with none at all.

It is reasonable to expect that anyone savvy enough to be attempting to
compile things under *nix is going to be familiar with this sequence. If
they are not, they will quickly become so as they look at various
projects.)


Another (and not directly related) step would be to have 'make install'
actually install the lib/ directories to the specified location, if they
are not already there or are out of date.

Closely related to that would be to come up with a saner default for the
location of those directories than assuming that the executable will
always be in the same location as the lib/ directory itself. This *may*
be a somewhat reasonable assumption under Windows, given its current
model of program installation, but it is not remotely reasonable under
*nix - or, I think, most other operating systems. As things stand, any
*nix user who does not want to either pollute directories in the PATH
with non-executable files or always specify the full relative path to
the sangband executable needs to edit config.h by hand.


I don't have a lot of free time for these purposes, but I would be not
unwilling to lend a hand in these veins - at the least testing and
advising, if not necessarily writing code myself.
--
The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.
Eddie Grove
2007-04-09 18:12:05 UTC
Permalink
Post by The Wanderer
Closely related to that would be to come up with a saner default for the
location of those directories than assuming that the executable will
always be in the same location as the lib/ directory itself. This *may*
be a somewhat reasonable assumption under Windows, given its current
model of program installation, but it is not remotely reasonable under
*nix - or, I think, most other operating systems. As things stand, any
*nix user who does not want to either pollute directories in the PATH
with non-executable files or always specify the full relative path to
the sangband executable needs to edit config.h by hand.
I gave up on messing with config.h long ago.
I always add a simple script to /usr/local/bin that
cd's to the directory in question and then runs the
program, pasing along any parameters.
Presumably that could be part of make install.

The other thing Wanderer left out is that there
are issues with permissions, because of the
score file and the way dumps are done. If doing
it right, you need to chown the executable to
games, make it suid, and make sure any file
or directory that ever gets modified is owned
by games.


Eddie
The Wanderer
2007-04-10 00:27:49 UTC
Permalink
Post by The Wanderer
Closely related to that would be to come up with a saner default
for the location of those directories than assuming that the
executable will always be in the same location as the lib/
directory itself. This *may* be a somewhat reasonable assumption
under Windows, given its current model of program installation, but
it is not remotely reasonable under *nix - or, I think, most other
operating systems. As things stand, any *nix user who does not want
to either pollute directories in the PATH with non-executable files
or always specify the full relative path to the sangband executable
needs to edit config.h by hand.
I gave up on messing with config.h long ago. I always add a simple
script to /usr/local/bin that cd's to the directory in question and
then runs the program, pasing along any parameters. Presumably that
could be part of make install.
It could, but I don't think it would necessarily be a good idea unless
the paradigm across *all* variants is changed such that having the named
executable be a script instead of the main binary is the expected thing.
(It's not unheard-of, even in big-name projects - Mozilla does it, for
one - but it is fairly unusual.)

In my case, since I have to modify the contents of the "private user
path" definition anyway, correcting this prior to compile time is easy
enough that the resultant drop in aggravation is more than worth it.
The other thing Wanderer left out is that there are issues with
permissions, because of the score file and the way dumps are done.
I didn't leave that out so much as I was unaware of it.

Does this apply to most/all variants, or just to Sangband? I haven't had
any problems that I've noticed in V...
If doing it right, you need to chown the executable to games, make it
suid, and make sure any file or directory that ever gets modified is
owned by games.
I am reflexively not of the opinion that setting the SUID bit on any
program which does not inherently *need* to mess with the internals of
the OS is the "right" way to do things. I am open to be convinced in any
given case, but that is not remotely an acceptable default to my mind;
the right solution in almost every case is to change the program so that
it does not need to access the restricted resources.
--
The Wanderer has actually been playing mostly V, and learning (by
some definitions) to dive

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.
Eddie Grove
2007-04-10 06:19:01 UTC
Permalink
Post by The Wanderer
I gave up on messing with config.h long ago. I always add a simple
script to /usr/local/bin that cd's to the directory in question and
then runs the program, pasing along any parameters. Presumably that
could be part of make install.
It could, but I don't think it would necessarily be a good idea unless
the paradigm across *all* variants is changed such that having the named
executable be a script instead of the main binary is the expected thing.
(It's not unheard-of, even in big-name projects - Mozilla does it, for
one - but it is fairly unusual.)
It's becoming more and more common. Or rather, I come across more
and more examples where binaries end up in strange places and the
best approach is a simple script in /usr/local/bin.
Post by The Wanderer
The other thing Wanderer left out is that there are issues with
permissions, because of the score file and the way dumps are done.
I didn't leave that out so much as I was unaware of it.
Does this apply to most/all variants, or just to Sangband? I haven't had
any problems that I've noticed in V...
It applies to all variants, but does not apply if you go the private
paths approach.

If you have a global high scores file, and you want individuals
not to be able to modify it, but you want the game to be able
to update it, the answer is suid. That also applies to bones
files if you want ghosts of one user to haunt games of another,
and also comes up with poorly coded screendumps
[all to same place] etc.
Post by The Wanderer
If doing it right, you need to chown the executable to games, make it
suid, and make sure any file or directory that ever gets modified is
owned by games.
I am reflexively not of the opinion that setting the SUID bit on any
program which does not inherently *need* to mess with the internals of
the OS is the "right" way to do things.
We're not talking about suid root, but suid games.
Technically, sgid games is enough.
If you're really paranoid, add a new angband group or user,
but that's beyond what most people will put up with.

SUID to games should be fairly innocuous. If you want to protect
the scores file, SUID/SGID is the obvious way to do it. It is the
kind
of thing SUID was invented to do. You can avoid it by keeping
the high scores on a per-user basis, rather than a systemwide
basis, but that goes against the history of games on unix systems.
Perhaps it is time to insist on private paths for everyone,
but until that decision is made multi-user installs require suid/sgid.

ll /usr/games | grep r-sr | wc
17 136 1009
On my linux system, there are at least 17 games
that come preinstalled with sgid games.
It really is a standard thing to do.


Eddie
magnate
2007-04-10 12:53:46 UTC
Permalink
Post by Eddie Grove
Post by The Wanderer
I gave up on messing with config.h long ago. I always add a simple
script to /usr/local/bin that cd's to the directory in question and
then runs the program, pasing along any parameters. Presumably that
could be part of make install.
It could, but I don't think it would necessarily be a good idea unless
the paradigm across *all* variants is changed such that having the named
executable be a script instead of the main binary is the expected thing.
(It's not unheard-of, even in big-name projects - Mozilla does it, for
one - but it is fairly unusual.)
It's becoming more and more common. Or rather, I come across more
and more examples where binaries end up in strange places and the
best approach is a simple script in /usr/local/bin.
Personally I don't want anything which is not a Debian package to
install itself anywhere except /usr/local/...

I will happily devote my time to making a working .deb package of the
SDL port to contribute towards Leon's goal of one-click install. This
will have to wait until the electrician has finished rewiring my
house, since I don't have access to Linux at work. But I'll get there.
Post by Eddie Grove
It applies to all variants, but does not apply if you go the private
paths approach.
Is this something which can be chosen in the configure script? It
should be. A multi-user system will need files kept locally in
~/.angband/Sangband as per other variants, but a single-user system
could happily leave them in installpath/lib/save.
Post by Eddie Grove
If you have a global high scores file, and you want individuals
not to be able to modify it, but you want the game to be able
to update it, the answer is suid. That also applies to bones
files if you want ghosts of one user to haunt games of another,
You only need setgid games, not setuid. Much safer and has the same
effect (allows the game to modify the highscore and bones files,
without allowing players to do so).
Post by Eddie Grove
Post by The Wanderer
If doing it right, you need to chown the executable to games, make it
suid, and make sure any file or directory that ever gets modified is
owned by games.
I am reflexively not of the opinion that setting the SUID bit on any
program which does not inherently *need* to mess with the internals of
the OS is the "right" way to do things.
We're not talking about suid root, but suid games.
Technically, sgid games is enough.
Yes, and the most sensible approach.
Post by Eddie Grove
If you're really paranoid, add a new angband group or user,
but that's beyond what most people will put up with.
A new angband user still requires the game to run setuid angband,
which is the same as setuid games. A new angband group is a fine idea,
but once all allowed players are members of group angband, they will
have write access to anything which is group writable (like highscores
or bones files), so you haven't achieved much.
Post by Eddie Grove
SUID to games should be fairly innocuous. If you want to protect
the scores file, SUID/SGID is the obvious way to do it. It is the kind
of thing SUID was invented to do. You can avoid it by keeping
the high scores on a per-user basis, rather than a systemwide
basis, but that goes against the history of games on unix systems.
Perhaps it is time to insist on private paths for everyone,
but until that decision is made multi-user installs require suid/sgid.
Private paths for everyone still doesn't solve the problem of common
highscore and bones files, but it does at least make sure everyone
knows where to find their own dumps, saves and pref files (and can't
find anyone else's).
Post by Eddie Grove
On my linux system, there are at least 17 games
that come preinstalled with sgid games.
It really is a standard thing to do.
Agreed.

CC
Eddie Grove
2007-04-10 15:55:27 UTC
Permalink
Post by magnate
Post by Eddie Grove
If you're really paranoid, add a new angband group or user,
but that's beyond what most people will put up with.
A new angband user still requires the game to run setuid angband,
which is the same as setuid games. A new angband group is a fine idea,
but once all allowed players are members of group angband, they will
have write access to anything which is group writable (like highscores
or bones files), so you haven't achieved much.
You misunderstand. For the paranoid solution, there is only
one member of group angband. It exists only for sgid purposes.
The point being that if someone can crack it, they cannot
use the stolen rights to do dastardly things to high score
files for other games!


Eddie
The Wanderer
2007-04-11 00:12:51 UTC
Permalink
Post by magnate
Post by Eddie Grove
It applies to all variants, but does not apply if you go the
private paths approach.
Is this something which can be chosen in the configure script? It
should be. A multi-user system will need files kept locally in
~/.angband/Sangband as per other variants, but a single-user system
could happily leave them in installpath/lib/save.
There *is* no Sangband configure script at present - and, although I've
seen mention of one in the install instructions for some other variants,
I've yet to see one for any of those either. This is, in fact, a
significant part of the problem.
--
The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.
Andrew Sidwell
2007-04-11 00:26:19 UTC
Permalink
Post by The Wanderer
Post by magnate
Post by Eddie Grove
It applies to all variants, but does not apply if you go the
private paths approach.
Is this something which can be chosen in the configure script? It
should be. A multi-user system will need files kept locally in
~/.angband/Sangband as per other variants, but a single-user system
could happily leave them in installpath/lib/save.
There *is* no Sangband configure script at present - and, although I've
seen mention of one in the install instructions for some other variants,
I've yet to see one for any of those either. This is, in fact, a
significant part of the problem.
While I imagine the Angband newsgroup has a higher proportion of people
using Unix than many other groups, variants tend to be developed with a
bias towards Windows. Combined with the relative arcaneness of writing
configure scripts by hand, I'm not suprised that few variants have them.
There's no easy way to fix that, either.

Vanilla has a working configure script, FWIW, which I try to keep
working. I believe Zangband and FAA do, too. (I use Makefile.std
because configure is crufty.)


Andrew Sidwell
--
http://entai.co.uk/projects/angband/opensource
http://angband.rogueforge.net/

My email address changes monthly, and is the first three letters of the
month (in English), followed by the last two digits of the current year,
@entai.co.uk.
Christophe
2007-04-10 14:30:32 UTC
Permalink
Post by Eddie Grove
SUID to games should be fairly innocuous. If you want to protect
the scores file, SUID/SGID is the obvious way to do it. It is the
kind of thing SUID was invented to do.
Except when it doesn't work:

http://www.mhatt.aps.anl.gov/dohn/programming/gtk-2.0/gtk-faq/x402.html


GTK developers might be anal rententive about that topic, it doesn't
change the fact that you cannot get it to work like that :/
Joshua Rodman
2007-04-14 01:24:23 UTC
Permalink
Post by Christophe
Post by Eddie Grove
SUID to games should be fairly innocuous. If you want to protect
the scores file, SUID/SGID is the obvious way to do it. It is the
kind of thing SUID was invented to do.
http://www.mhatt.aps.anl.gov/dohn/programming/gtk-2.0/gtk-faq/x402.html
GTK developers might be anal rententive about that topic, it doesn't
change the fact that you cannot get it to work like that :/
It works fine when you aren't linking against GTK.
--
Grim. Grom. Grümmer.
Dave
2007-04-09 18:18:46 UTC
Permalink
Post by The Wanderer
I have, if I'm not mistaken, configured it to run from any location; I
have changed the definition of DEFAULT_PATH in config.h from
'.${PATH_SEP}lib${PATH_SEP}' to '/usr/share/games/sangband/1.0.0'. The
version I got from compiling (with some source code tweaks) using
Makefile.std does pick up that path correctly, but the version obtained
by compiling with makefile.sdl does not. It also does not pick up my
redefinition of the "private user path" in the same file, but does if I
make the same redefinition in h-config.h; does the SDL port now ignore
config.h and use h-config.h instead, even though the latter does not
provide all of the same functionality (at least by default)?
I am not savvy but what I did is to specify the path in config.h,
which is the same across most (if not all) variants and *bands. That's
how I compiled it for Sharp Zaurus (a linux handheld).
Post by The Wanderer
Closely related to that would be to come up with a saner default for the
location of those directories than assuming that the executable will
always be in the same location as the lib/ directory itself. This *may*
be a somewhat reasonable assumption under Windows, given its current
model of program installation, but it is not remotely reasonable under
*nix - or, I think, most other operating systems. As things stand, any
*nix user who does not want to either pollute directories in the PATH
with non-executable files or always specify the full relative path to
the sangband executable needs to edit config.h by hand.
Likewise, that seems to be the common default setting (usually in
config.h), even though I don't know why. ;-)

Dave
Dave
2007-04-09 19:45:03 UTC
Permalink
Three small bugs in my Zaurus and Mac (SDL) build:

1) Font size change unexpectedly
After switching back from the Character attribute screen, the fonts in
the left panel showing various info will scale down. (This doesn't
happen to my Mac build)

2) Blackout during shopping?
List of items for sale in shops got blacked out after selling things,
and also after pressing ESC after viewing other screens. Refresh the
screen will have a weird result: the main part shows the town, but the
left side stills display part of the (truncated) list of items for
sale. In any case I need to exit the shop to get the proper view, or
reenter the shop if I wanna shop again.
Same in my Zaurus and Mac builds.

3) Screenshot broken?
The "take a screenshot" function seems broken: it will switch to
"Interact with Visuals" and pressing ESC the screen flickers and
flashes back to the "interact with visuals" screen.
On Zaurus, I gotta press ESC many times to got the main display back.
Then the top of the screen prints "screenshot saved in the "lib/user"
directory as "dump.html/txt". But actually i can never find it. It is
just empty in lib/user.
On Mac, pressing ESC, the screen flickers and the game crashes and
quits.

Interestingly, play music will crash in my Mac build but not the
Zaurus one.

I don't want to post like in a bug tracker. But there is no other
space for me to report bugs. :-)

Dave
The Wanderer
2007-04-10 00:17:07 UTC
Permalink
A little unexpected to see Japanese here, but not uninteresting.
Post by Dave
Post by The Wanderer
I have, if I'm not mistaken, configured it to run from any
location; I have changed the definition of DEFAULT_PATH in config.h
from '.${PATH_SEP}lib${PATH_SEP}' to
'/usr/share/games/sangband/1.0.0'. The version I got from compiling
(with some source code tweaks) using Makefile.std does pick up that
path correctly, but the version obtained by compiling with
makefile.sdl does not. It also does not pick up my redefinition of
the "private user path" in the same file, but does if I make the
same redefinition in h-config.h; does the SDL port now ignore
config.h and use h-config.h instead, even though the latter does
not provide all of the same functionality (at least by default)?
I am not savvy but what I did is to specify the path in config.h,
which is the same across most (if not all) variants and *bands.
That's how I compiled it for Sharp Zaurus (a linux handheld).
If you look closely, I did that as well - and in the non-SDL port which
I managed to get compiled but not 100% working, it took. In the SDL
port, it didn't.
Post by Dave
Post by The Wanderer
Closely related to that would be to come up with a saner default
for the location of those directories than assuming that the
executable will always be in the same location as the lib/
directory itself. This *may* be a somewhat reasonable assumption
under Windows, given its current model of program installation, but
it is not remotely reasonable under *nix - or, I think, most other
operating systems. As things stand, any *nix user who does not want
to either pollute directories in the PATH with non-executable files
or always specify the full relative path to the sangband executable
needs to edit config.h by hand.
Likewise, that seems to be the common default setting (usually in
config.h), even though I don't know why. ;-)
I suspect it's because it's hard to come up with a path which you can a:
*know* will exist on the user's system and b: reasonably assume the user
and any appropriate administrators are OK with using for the purpose.

The standard location on *nix systems is /usr/share/<something
appropriate>/, but this will obviously not do on i.e. Windows systems,
and on Mac systems the current default of . may actually be the most
correct option for any ordinary user. (I do not know enough about other
OSes offhand to be able to say what is and is not reasonable for them,
but most which I can think of are more likely to be close to the *nix
model than to one of the others.)

One advantage of using a configure script is that it can detect the
operating system and pick a default on that basis, and can accept an
argument to override if the user wants to use something other than the
default.
--
The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.
Dave
2007-04-10 02:25:00 UTC
Permalink
Post by The Wanderer
A little unexpected to see Japanese here, but not uninteresting.
How do you know? Only the Americans use M$?
Post by The Wanderer
If you look closely, I did that as well - and in the non-SDL port which
I managed to get compiled but not 100% working, it took. In the SDL
port, it didn't.
Post by Dave
Post by The Wanderer
Closely related to that would be to come up with a saner default
for the location of those directories than assuming that the
executable will always be in the same location as the lib/
directory itself. This *may* be a somewhat reasonable assumption
under Windows, given its current model of program installation, but
it is not remotely reasonable under *nix - or, I think, most other
operating systems. As things stand, any *nix user who does not want
to either pollute directories in the PATH with non-executable files
or always specify the full relative path to the sangband executable
needs to edit config.h by hand.
No, what I meant is there is no need for me to modify anything in the
makefiles or anything apart from config.h to get the SDL port
compiled.
Post by The Wanderer
Post by Dave
Likewise, that seems to be the common default setting (usually in
config.h), even though I don't know why. ;-)
*know* will exist on the user's system and b: reasonably assume the user
and any appropriate administrators are OK with using for the purpose.
The standard location on *nix systems is /usr/share/<something
appropriate>/, but this will obviously not do on i.e. Windows systems,
and on Mac systems the current default of . may actually be the most
correct option for any ordinary user. (I do not know enough about other
OSes offhand to be able to say what is and is not reasonable for them,
but most which I can think of are more likely to be close to the *nix
model than to one of the others.)
One advantage of using a configure script is that it can detect the
operating system and pick a default on that basis, and can accept an
argument to override if the user wants to use something other than the
default.
Agree. Many roguelikes do have configure, such as Angband, ToME,
Xangband and the new(er) source of Slash'em.
It doesn't have to be a "one-click" solution, as long as it comes
close to the standard way, imho.
As for Mac, I have yet to learn how to compile *nix source codes with
Xcode. The official tutorial (the most accessible I've stumbled
across) is still far from clear to me:
http://developer.apple.com/opensource/opensourceuniversalframework.html
Any other good pointer? I would, if I could, do a true Mac port and
test it.
Bugs aside, I still like the game and its unique flavor alot.

Dave
The Wanderer
2007-04-11 00:26:00 UTC
Permalink
Post by Dave
Post by The Wanderer
A little unexpected to see Japanese here, but not uninteresting.
How do you know? Only the Americans use M$?
Nothing of the sort.

By "Japanese", I meant "the Japanese language". What your nationality
might be actually never even crossed my mind.

I see plenty of Japanese - from both native and non-native speakers
(more the latter than the former), as well as no few people who can't
really claim to speak it at all - in other newsgroups, but I did not
particularly expect to run across any on this one.
Post by Dave
Post by The Wanderer
If you look closely, I did that as well - and in the non-SDL port
which I managed to get compiled but not 100% working, it took. In
the SDL port, it didn't.
Post by The Wanderer
Closely related to that would be to come up with a saner
default for the location of those directories than assuming
that the executable will always be in the same location as the
lib/ directory itself. This *may* be a somewhat reasonable
assumption under Windows, given its current model of program
installation, but it is not remotely reasonable under *nix -
or, I think, most other operating systems. As things stand, any
*nix user who does not want to either pollute directories in
the PATH with non-executable files or always specify the full
relative path to the sangband executable needs to edit config.h
by hand.
No, what I meant is there is no need for me to modify anything in the
makefiles or anything apart from config.h to get the SDL port
compiled.
(I'm not at all sure exactly what you're replying to, here.)

I think one of us is misunderstanding the other. Let me try this again
from the beginning, and see if we can find out where the confusion is.

I was able to compile the SDL port without needing to make any changes
to the build system or to the part of the code which is specific to the
SDL port. All I needed to do was install the correct libraries.

I was able to compile the 'std' version (X11 and GCU and possibly
curses) by making various, possibly incorrect, changes to their main-*.c
files.

As a natural part of configuring the build, unrelated to any changes to
the port-specific files, I modified config.h to change a few settings.

When I compiled the 'std' version, it recognized that I had made those
changes, and the final binary used the modified paths.

When I compiled the SDL version, it did not recognize that I had made
those changes, and the final binary used the default unmodified paths.

When I made one of the same changes in h-config.h and recompiled, the
new copy of the SDL version recognized that change and used its matching
path - but there is no apparent place in h-config.h to make the other
change, and there are a number of other things which can be set in
config.h but cannot be set in h-config.h.
--
The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.
Joshua Rodman
2007-04-14 01:39:19 UTC
Permalink
Post by The Wanderer
Post by Leon Marrick
- Only the SDL port is fully up to date. Getting it to run on my
1) Updating to SDL 1.2 (don't try earlier versions) and SDL_ttf (also
SDL_mixer if you want sound and music).
2) typing "make -f makefile.sdl".
Now that I've actually installed SDL_ttf (a library which I did not even
realize existed and which does not seem to be mentioned in the included
build documentation), it does compile and run, although only when both
named 'sangband.exe' *and* in a particular directory (the one to which
it is moved by the last step of that make command).
Yeah, multiple users of different Linuxes (Ubuntu, Debian) can all
confirm the build exits without any action at all by default, we were
all trying this today in #angband.

Looking at the code suggests it is doing some silliness of trying to
parse its own filename, stripping off .exe in the process. I don't
understand why this is useful.


A second problem is that the program seems unable to load a save file,
giving the following error:

Error (Cannot read savefile) reading 0.0.0 savefile. (+)
Sorry, this savefile cannot be read by Sangband 1.0.0 (hotfix #1). (+)
Please choose another file or start a new game.

Although, on further inspection it seems that it is the save function
which is breaking, generating 0 byte save files.
Post by The Wanderer
A second issue is that the SDL port, even when run in its desired
location and with its desired filename extension, runs in fullscreen by
default and I see no mention of a way to switch that off. I prefer to
run windowed when running in a graphical environment, so that I can
easily make use of other windows for things like notes and calculations
(and even conveniently switch away to do other things, if necessary); if
I wanted to run fullscreen, I would do it from a console.
Given that I multitask on my computer, the fullscreen behavior is really
a problem for me.

Further, that it grabs the display entirely by default is not such a
great idea for software in flux. A strange bug may lock the user's
display entirely.

I have been shown how to configure it to "Display mode 2" which puts it
into a window, but still it is the size of my entire display, at
1600x1200, and the window refuses to respond to my resize attempts.

It's not terribly unusual to have games that run at fixed resolutions
using SDL, but quite unusual for that resolution to be the entire
screen, which makes it very difficult to manage in concert with other
windows.
Post by The Wanderer
==
*** glibc detected *** free(): invalid pointer: 0x0819bd00 ***
Aborted
==
This occurs here as well, though my address happens to be:
*** glibc detected *** free(): invalid pointer: 0x0000000000654e60 ***

That's a 64 bit invalid pointer, mind you. ;-)
Post by The Wanderer
Post by Leon Marrick
So does the overall packaging. I want things to be as easy for Linux
folks as possible, with a true one-click install the eventual goal;
suggestions for achieving this are welcome.
One very useful step towards that goal - or the goal of a simple
install, at least, since "one-click" assumes a graphical interface which
does not really apply when compiling software under *nix - would be the
inclusion of a functional configure script (preferably *not* using
autotools, although that would be better than nothing), which performs
detection for libraries and so forth
IF you wish to go down this path, I recommend you consider CMake, which
you can use to build Sangband for Windows as well. Some may chime in
that the end user may not have CMake installed, but the end user may not
have * installed, and this tool is a good one and becoming commonly
used by those of us who compile software to install it.
--
Grim. Grom. Grümmer.
Leon Marrick
2007-04-21 11:48:49 UTC
Permalink
Contact email:

See the Sangband website (www.runegold.org/sangband), or the top of
the Sangband Manual in any of the game releases.


Latest source and Windows executables:

www.runegold.org/sangband/files/sang100src.rar
www.runegold.org/sangband/files/sang100swin.zip


Screenshots:

Thanks to some very helpful reports, the new graphical interface
has gotten a whole lot more fun to play, especially on Linux. Players
who want a windowed game are invited to read the expanded readme. See
section 2.4 "Fine-tuning the display".

Here are some screenshots; all are of the SDL port (the Windows port
looks identical).

Loading Image...
A straightforward 800x600 full-screen shot, showing one of the
roman-style fonts that Sangband uses by default. No special fanciness;
this is what the game looks like out of the box on a relatively small
monitor.

Loading Image...
Disgraceful lack of character naming ability here, but the user
does know to get lots of sub-windows. The big sub-windows are used for
displays that need lots of room, the small ones host ones that are more
flexible. The user is also experimenting with a windowed application.

Loading Image...
Name sucks, but at least you turned on Adam Bolt graphics. The
map display is showing the graphics without any distortion, and it lies
on top of a main window that is using a 12x16 extended Roman font, also
shown without distortion.

Loading Image...
WHEN will you change that stupid character name, you dolt? The
user wants to show David Gervais 32x32 graphics in a 800x600 window -
undistorted, of course.

Loading Image...
Ah, we want to go Linux now? We're using the same config file but
running a different character. This one has a honest-to-goodness name...



Fixes and cleanup:

Lots of polishing going on of late. Most of Christer Nyfält's
fixes and code cleanup are now included, and a goodly portion of Joshua
Middendorf's corrections are as well. More will come in later releases.


Copyright corrections:

Reenen Laurie's corrections to his copyright statement are in.
Thanks, Reenen!


Development -- Interface:

The major focus is on making absolutely certain that the new
graphical interface lives up to its potential. I am firmly convinced
that, after a few more rounds of polishing, the total package - fonts,
graphics, sound and music, configuration, and windows - will be worth
the full attention of every single *band maintainer. This isn't a
"proof of concept", it is a cross-platform solution that is meant to *be
played*.

See a bug or glitch? Email me, and I'll fix it. Having trouble
getting this to work on your system? If you know how to use a debugger,
I will work hand-in-glove with you until it does. Angband has suffered
from crappy graphical interfaces long enough; it's time to bust open
some possibilities.
--
S(all) W/D H+ D c+ f? PV++ s? d- P++ M+
C S !I !So SQ RQ V+ F:<<buffer overrun>>
http://angband.oook.cz/code
Jack Bogonomy
2007-04-22 05:41:44 UTC
Permalink
Leon Marrick wrote...

Whoa. I thought this guy was a myth!
Matthew Collett
2007-04-22 22:00:31 UTC
Permalink
Post by Jack Bogonomy
Leon Marrick wrote...
Whoa. I thought this guy was a myth!
A myth _and_ a reality. It's probably quantum.

Best wishes,
Matthew Collett
--
Those who assert that the mathematical sciences have nothing to say
about the good or the beautiful are mistaken. -- Aristotle
magnate
2007-04-23 09:31:07 UTC
Permalink
Post by Jack Bogonomy
Leon Marrick wrote...
Whoa. I thought this guy was a myth!
Not a myth.

A legend, perhaps.

CC
Andrew Doull
2007-04-23 09:47:16 UTC
Permalink
Post by magnate
Post by Jack Bogonomy
Leon Marrick wrote...
Whoa. I thought this guy was a myth!
Not a myth.
A legend, perhaps.
CC
Indeed. A lot of what I know about writing Angband variants, I learnt from
reading Leon's documentation and studying the Sangband design.

Andrew
--
The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
http://unangband.berlios.de http://roguelikedeveloper.blogspot.com
Loading...