Welcome to GameHourz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

-MPRHB- Development proceeds...

 
Goto page Previous  1, 2
   Game Forums (Home) -> Roguelike -> Development RSS
Next:  libtcod 1.1 released  
Author Message
"Ulf_Åström

External


Since: Jan 27, 2008
Posts: 31



(Msg. 16) Posted: Fri Feb 01, 2008 12:31 am
Post subject: Re: -MPRHB- Development proceeds... [Login to view extended thread Info.]
Archived from groups: rec>games>roguelike>development (more info?)

On 30 Jan, 17:23, Jeff Lait <torespondisfut... DeleteThis @hotmail.com> wrote:
> 3) Confusing data with code.

In HASAD (my previous, discontinued RL) I used huge strings to
represent map elements such as rooms, houses and continents (on the
world map). In addition to this I had lists of coordinates to add
towns, people, treasure, etc. I don't recommend this approach.

OTOH, in TSL (the successor) I still use hard-coded monsters, items
and encounter tables; I haven't seen any reason to move it to data
files. In fact, I see several reasons to keep it this way.

I'm considering changing the way items are generated, though; I now
have a huge switch statement (for item number), that sets item
parameters. Would it be better to create a large array that kept a
copy of each item? Then I could just duplicate them and run some
"custom code" on certain item types (wands would need random charges,
for example).

I see several advantages, the most attractive that I could call an
item by name (wands of wishing here we come!) as well as item number.

-the ru

 >> Stay informed about: -MPRHB- Development proceeds... 
Back to top
Login to vote
Ido Yehieli

External


Since: Nov 29, 2007
Posts: 75



(Msg. 17) Posted: Fri Feb 01, 2008 1:22 am
Post subject: Re: -MPRHB- Development proceeds... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jan 31, 7:27 pm, Jeff Lait <torespondisfut... RemoveThis @hotmail.com> wrote:
> I think there is a lot of good to be said of having your secondary
> "languages" compile into your primary language. It certainly makes
> the whole question of setting up bindings rather trivial :>

Certainly.
Did you write the lexer/parser for your configuration/data language
yourself or used some tools like flex and bison/bison++?

 >> Stay informed about: -MPRHB- Development proceeds... 
Back to top
Login to vote
Ido Yehieli

External


Since: Nov 29, 2007
Posts: 75



(Msg. 18) Posted: Fri Feb 01, 2008 1:24 am
Post subject: Re: -MPRHB- Development proceeds... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Feb 1, 9:31 am, "Ulf Åström" <ulf.ast... RemoveThis @gmail.com> wrote:
> I see several advantages, the most attractive that I could call an
> item by name (wands of wishing here we come!) as well as item number.

To get that advantage I would assume the easiest way is to use an enum
for your item names.

-Ido.
 >> Stay informed about: -MPRHB- Development proceeds... 
Back to top
Login to vote
"Ulf_Åström

External


Since: Jan 27, 2008
Posts: 31



(Msg. 19) Posted: Fri Feb 01, 2008 1:48 am
Post subject: Re: -MPRHB- Development proceeds... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 1 Feb, 10:24, Ido Yehieli <Ido.Yehi....TakeThisOut@gmail.com> wrote:
> On Feb 1, 9:31 am, "Ulf Åström" <ulf.ast....TakeThisOut@gmail.com> wrote:
>
> > I see several advantages, the most attractive that I could call an
> > item by name (wands of wishing here we come!) as well as item number.
>
> To get that advantage I would assume the easiest way is to use an enum
> for your item names.

I already have that; what I want is to enter an arbitrary string and
the game would figure out what I wanted.

So, I had a look at this and found that it was much simpler to solve
than I hade expected. I've moved the item definitions to an array, so
now I can search it for an item name. My search function looks at both
the unidentified and identified names of both items and artifacts. If
there are several matches a random one is selected, so I can wish for
"sword" and get a generic sword, or I might get an artifact weapon.

This also lets me specify just "sword" during monster generation, and
some monsters will naturally end up with unique weapons.

It might need some special cases though; since my potions have colors,
just wishing for "potion" won't work. I should also come up with some
way of limiting the probability of it generating unique items, since
these are taken from a finite pool and the game will sooner or later
run out of them (probably sooner).

-the ru
 >> Stay informed about: -MPRHB- Development proceeds... 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Mirage Development Diary - I've started a new roguelike tentatively called Mirage. I've been lurking on the forums for awhile and have just decided to create a blog highlighting my progress through development. I hope everyone can check it out and follow me along as I create my..

7DRL: Invader - Well, I've talked myself into attempting a game for the 7DRL challenge. :-) Invader will be a sci-fi RL where the player is the planet's only hope of stopping a dread alien invasion ship. The character's base of operations will be their docked ship. ....

7DRL: TBA! :P - I'm going to throw my hat into the 7drl arena by taking on a project I've wanted to do for ages. I think it will get me past the mental block of actually getting started. My concept is based around the remains of a post apocalyptic world with gang..

7DRL : Commander - It is 13.40 in my time zone (GMT +100). Time to start my 7DRL project: Commander. I will do it in Free Pascal. Plans are quite big so there is real danger of failure. Good luck to all participants of 7DRL contest. -- Michal ''Ancient'' Bielinski

7DRL : Valley of Ge-Hinnom - Info : @ goes chase to Moloch, java, using my library, so if I fail at least I can post an updated library. T.
   Game Forums (Home) -> Roguelike -> Development All times are: Ekaterinburg, Islamabad, Karachi, Tashkent (change)
Goto page Previous  1, 2
Page 2 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]