Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old May 4, 2009, 19:37   #1
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 42
Posts: 367
Donated: $120
konijn_ is on a distinguished road
Hellband OnLine

Greetings,

just using this as a dumping ground for my efforts.

Basically I am converting/rewriting HellBand so it can work in a browser.

Why ? I had some good reasons but in the end it seems to be one of the projects I can come back to after a hiatus.

I wanted to share one of the 'design decisions' with regards to the evil cave*bold macros's.

//cave _floor_bold(y,x) -> cave[x,y].isLevel()
//cave_ empty_bold(y,x) -> !cave[x,y].isOccupied()
//cave _clean_bold(y,x) -> cave[x,y].isClean()
//cave _naked_bold(y,x)-> cave[x,y].isEmpty()

isLevel standing for 'flat' aka its a floor like cell. No walls or doors or bushes or trees or water. clean stands for no objects left. Empty means regular floor, clean and not occupied.

How would you call this stuff ?

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Old May 4, 2009, 22:51   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,862
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by konijn_ View Post
Basically I am converting/rewriting HellBand so it can work in a browser.
I think that's a brilliant idea. I've thought about doing that from time to time, but have never known if I actually could.

Quote:
//cave _floor_bold(y,x) -> cave[x,y].isLevel()
//cave_ empty_bold(y,x) -> !cave[x,y].isOccupied()
//cave _clean_bold(y,x) -> cave[x,y].isClean()
//cave _naked_bold(y,x)-> cave[x,y].isEmpty()

isLevel standing for 'flat' aka its a floor like cell. No walls or doors or bushes or trees or water. clean stands for no objects left. Empty means regular floor, clean and not occupied.

How would you call this stuff ?
It looks kind of neat, but I have no strong feelings about it. I'm sure others will
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old May 4, 2009, 23:05   #3
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,936
Donated: $40
takkaria is on a distinguished road
A quick history lesson from #angband-dev:

Code:
2:44 < konijn> greetings
22:44 < konijn> I have a question for historians
22:44 < konijn> cave_empty_bold
22:44 < konijn> why bold ??
22:44 < konijn> what does it stand for ?
... some time later ...
18:43 < ajps> Aw, konijn's gone
18:44 < ajps> That bold question intrigued me, so I did some digging
18:44 < ajps> It's bold because it makes assumptions about still being on the map, rather than cautious and doing 
              bounds-checking, etc
18:44 < ajps> Sorry, add "" liberally around words like "bold" for a proper Ben-like effect
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old May 5, 2009, 13:38   #4
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 42
Posts: 367
Donated: $120
konijn_ is on a distinguished road
Quote:
Originally Posted by takkaria View Post
A quick history lesson from #angband-dev:
Thanks, it is kind of bold. I might be a good idea to "unbold" those macro's ? Its not as if speed is a concern any more.

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Old May 7, 2009, 12:52   #5
PaulBlay
Knight
 
Join Date: Jan 2009
Posts: 657
PaulBlay is on a distinguished road
Quote:
Originally Posted by konijn_ View Post
Thanks, it is kind of bold. I might be a good idea to "unbold" those macro's ? Its not as if speed is a concern any more.

T.
From ...

Code:
#define cave_floor_bold(Y,X) \
	(!(cave_info[Y][X] & (CAVE_WALL)))
To ...

Code:
#define cave_floor(Y,X) \
	(!(cave_info[Y][X] & (CAVE_WALL)) && in_bounds_fully(Y,X))
?

Also note that in_bounds_fully should use TOWN_WID and TOWN_HGT when on dlvl 0.
__________________
Currently turning (Angband) Japanese.
PaulBlay is offline   Reply With Quote
Old May 9, 2009, 23:52   #6
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 42
Posts: 367
Donated: $120
konijn_ is on a distinguished road
Quote:
Originally Posted by PaulBlay View Post
From ...
Code:
#define cave_floor(Y,X) \
	(!(cave_info[Y][X] & (CAVE_WALL)) && in_bounds_fully(Y,X))
You would have to do in_bounds_fully first so that the cave_info access can be prevented if the x or y are out of bounds.

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Old May 10, 2009, 00:42   #7
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 42
Posts: 367
Donated: $120
konijn_ is on a distinguished road
I am working the conversion as if I start a new character , starting with birth.c which requires some form of input and output.

I am now in the last birth screen where mana calculation is done and where for the first time an equipment slot is mentioned ( wearing gloves is bad for mana ).

So I am integrating items now.

Base class is 'gizmo' which is anything that can be picked up by the player and be used somehow ( everything that is derived from k_info.txt ).

For this I am scripting k_info text , which takes an enormous amount of time.

One of the things that I have not found a good nomer for is 'pval' since its meaning is so different depending on the item type.

I am also reworking rarity :

1 Common
2 Uncommon
4 Special
8 Exotic
16 Rare
32 Very Rare
64 Ultra Rare

So that a:20/8:30/4:40/1

Becomes
.rarity1 = "exotic20";
.rarity2 = "special30";
.rarity3 = "common40";

I hope that is somewhat more understandable

Just did the rings, am advancing nicely.

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Old May 18, 2009, 13:32   #8
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 42
Posts: 367
Donated: $120
konijn_ is on a distinguished road
Quote:
Originally Posted by konijn_ View Post
1 Common
2 Uncommon
4 Special
8 Exotic
16 Rare
32 Very Rare
64 Ultra Rare
So,
I had to check my notes all the time for which value has which name.
New descriptions are in place

common
not_so_common
uncommon
not_so_rare
rare
very_rare
ultra_rare
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Old June 5, 2009, 13:39   #9
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 42
Posts: 367
Donated: $120
konijn_ is on a distinguished road
Post

All items are converted, quite a few bugs found in the k_info that were preventing items from being generated, there I was thinking I was just unlucky ;]

Finished the gear class which governs both equipment slots and the backpack.

'Finished' the evil mana calculation conversion, xcept it doesnt work so now am debugging for the first time Hellband in js...

I already wrote the town generation code, once I get mana calculaton right, I might have an @ working around on a screen somewhere this month.

Of note, I have contacted the author of spiderape and convinced him to port his javascript curses binding to the Google V8 engine. javascript can now use curses on linux machines and in some further future on Windows I assume.

That and XULrunner give any author the option to write standalone apps, online apps or even curses apps if one is so inclined.

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Old August 28, 2009, 14:12   #10
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 42
Posts: 367
Donated: $120
konijn_ is on a distinguished road
Hah, 1 month...

@ is now running around in the town, which is properly generated.
Big question is now, first items or first monsters ?
The 16 of RL says monsters first, so I am re-reading monster1.c and monster2.c

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Hellband] Birth item suggestions wanted konijn_ Variants 0 January 26, 2008 20:29
Hellband 0.8.6 is out! konijn_ Oook! 1 September 2, 2007 00:58
Oldtimer online? Search patch from 1999 TJA Vanilla 2 August 20, 2007 10:59


All times are GMT +1. The time now is 15:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.