Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old July 6, 2010, 23:51   #41
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,863
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by Magnate View Post
If you can get Takk to use this as the base for this part of the V codebase, so much the better - it'll stay (more) up to date. Means a bit more work for him linking into his hg repo or whatever he sets up, but might be worth it.
We'll see. I just wanted to get something in place, and it can all be changed later if it's not working.
__________________
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 July 7, 2010, 14:59   #42
andrewdoull
Unangband maintainer
 
andrewdoull's Avatar
 
Join Date: Apr 2007
Location: Sydney, Australia
Age: 45
Posts: 872
andrewdoull is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
ajps made a whack at it with the new command function pointers (cmd0.c and game-cmd.c is a huge step in the right direction).
I'm not convinced that the command function pointers were abstracted at the right level - or more correctly, I think there's a huge opportunity to be had with a slightly different abstraction where the commands which select an object are a(nother?) set of function pointers.

In particular, transitive commands (apply x to y) are handled as two separate commands in the Unangband system, and it allowed an incredibly easy implementation of 'pick an object and choose which command to apply to it' which may be useful for various UI implementations.

Andrew
__________________
The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
In UnAngband, the level dives you.
ASCII Dreams: http://roguelikedeveloper.blogspot.com
Unangband: http://unangband.blogspot.com
andrewdoull is offline   Reply With Quote
Old July 11, 2010, 15:31   #43
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,863
Donated: $60
Nick will become famous soon enough
Progress:
  • Decided init*.c are too specific, and removed them.
  • Renamed cmd0.c to ui-cmd.c and marked most of it for removal.
  • Renamed (by sticking a ui- on the front of) pathfind.c, button.c, target.c.
  • Renamed cave.c to ui-view.c, with the intention of ripping everything but the update_view stuff out of it.

I'm not sure about the last one - maybe none of that should be in, or maybe more should. Also there's some specific terrain mentioned in the pathfinding, which will need to be replaced by a reference to a (variant-specific) list.

The idea is that exactly the src directory files from V with names starting with ui, game, main and z will be in AngbandBase. I guess I'm kind of assuming that takkaria etc are OK with some file splitting and renaming too - if we're tying to keep the two aligned, which seems like a good idea if it's easy enough.
__________________
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 July 11, 2010, 19:17   #44
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by Nick View Post
Decided init*.c are too specific, and removed them.
Interesting. I'd have thought that standardised cross-platform code for reading edit files was a big win.
Quote:
The idea is that exactly the src directory files from V with names starting with ui, game, main and z will be in AngbandBase. I guess I'm kind of assuming that takkaria etc are OK with some file splitting and renaming too - if we're tying to keep the two aligned, which seems like a good idea if it's easy enough.
It's fine with me. Haven't heard from Takk for a few weeks but don't suppose he will mind. I'll update the filenames after checking with him. (Though it might be better for him to give you commit access and cut out the middle man.)
Magnate is offline   Reply With Quote
Old July 11, 2010, 23:00   #45
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,863
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by Magnate View Post
Interesting. I'd have thought that standardised cross-platform code for reading edit files was a big win.
It would be, except for the differences in edit files. There are some cases (the cmd0.c list of commands is another) where there will be few differences, but enough that the file can't be used.

Quote:
It's fine with me. Haven't heard from Takk for a few weeks but don't suppose he will mind. I'll update the filenames after checking with him. (Though it might be better for him to give you commit access and cut out the middle man.)
I already have commit access, so I can do the dirty work once we have the OK.
__________________
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 July 12, 2010, 09:14   #46
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,367
AnonymousHero is on a distinguished road
Regarding the edit files:

I tend to think of the edit files as CSV+, and I think the actual parsing bits of that could be factored out relatively easily.

The only thing the parsing code really needs to know is
  • what field type signifies a new record? ('N', usually)
  • what (if any) separator character is used within a record field ('|', usually) for multi-valued fields (flags)
(or am I missing something? I'm only really familiar with the parsing code from ToME where I ripped out the *.raw generation.)

AFAICT this would also be sufficient for things like vault definitions.

Everything else could be treated as opaque strings and we'd at least get some sharing of code.

EDIT: Either that or just use a standardized human-readable format like, say, JSON or YAML. I'm sure there are libraries for C for both of those.
AnonymousHero is offline   Reply With Quote
Old July 12, 2010, 11:30   #47
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,863
Donated: $60
Nick will become famous soon enough
There's actually quite a lot of difference from variant to variant with what's in the edit files. While you could just take the line start and the rest as a string, most of the content in the init files is the parsing, so it wouldn't really help much.

I'm quite keen too to stick to things that are not in any way going to affect gameplay - so I'm even dubious about the view stuff and targeting. I think that it's best to start with a small core of common code and then expand it later if that seems like a good idea, rather than be pulling stuff out of variants and then having to put it back in.
__________________
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 July 12, 2010, 18:56   #48
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,367
AnonymousHero is on a distinguished road
Sure, I agree that it's best to start small and then expand as necessary/possible. I was just sayin'...
AnonymousHero 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
How many variant developers/maintainers have beaten their own variant? Delver Variants 12 June 5, 2009 10:08
TANG - Community Project Sirridan Vanilla 12 June 4, 2009 08:21
AngEdit - complementary project to JBand/Angband PaulBlay Development 0 May 29, 2009 16:13
Variant writing.. quickstart guide? Also, Hengband variant suggestions? dzhang Variants 34 April 1, 2009 01:45
New Variant Help bpleshek Variants 4 September 8, 2008 23:04


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


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