Google Groups Home
Help | Sign in
The Doryen Library 1.3.2 + The Doryen Arena 0.7 released
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 28 - Collapse all   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
jice  
View profile
 More options Jul 14, 5:31 am
Newsgroups: rec.games.roguelike.development
From: jice <jice.nos...@gmail.com>
Date: Mon, 14 Jul 2008 02:31:13 -0700 (PDT)
Local: Mon, Jul 14 2008 5:31 am
Subject: The Doryen Library 1.3.2 + The Doryen Arena 0.7 released
libtcod 1.3.2 is a bugfix release. It also adds documentation for the
fast generic container TCODList.

http://jice.nospam.googlepages.com/thedoryenlibrary

arena 0.7 has slightly improved and easier gameplay :
* more player feedback (you can see if a creature is stunned without
looking at its conditions)
* increased difference between weapon classes through special effects
(swords make bleed, hammer stun, masses stun and weaken, axes stun,
weaken and make bleed)
* a new adrenaline bar allowing you to use a powerful weapon-specific
special attack
* a new "custom fight" game mode making it possible to fight any
opponent panel
* new weather lightning effect

http://jice.nospam.googlepages.com/arena

--
jice


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
stu  
View profile
 More options Jul 14, 10:15 am
Newsgroups: rec.games.roguelike.development
From: stu <yakumo9...@gmail.com>
Date: Mon, 14 Jul 2008 07:15:15 -0700 (PDT)
Local: Mon, Jul 14 2008 10:15 am
Subject: Re: The Doryen Library 1.3.2 + The Doryen Arena 0.7 released
On Jul 14, 5:31 am, jice <jice.nos...@gmail.com> wrote:

> libtcod 1.3.2 is a bugfix release. It also adds documentation for the
> fast generic container TCODList.

neat you re-invented a basic data structure.. The Array!
Why call it a list when its really an array and not a list at all?

Are you going to implement for us

TCODSingleLinkList
TCODDoubleLinkList
TCODBucketList
TCODQueue
TCODStack
TCODRingBuffer
TCODSuperFastSort
TCODBTree
TCODRedBlackTree

?

I think you should cap the new list size to say 64 entries growth
each time rather than count * 2, it will reduce a lot of empty
entries when the array starts to grow.

also, you should have a call back for destroying the list
to help with memory management.

Implementing as an array makes insertion/removal of anything
but the tail a long process, which as implemented by a for loop
is much longer than a straight up memmove.

The only time a List implemented as an Array as you have pays
off is if you know the arbitrary index of an item you want to
access.

-Stu


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nathan D. Jerpe  
View profile
 More options Jul 14, 10:47 am
Newsgroups: rec.games.roguelike.development
From: "Nathan D. Jerpe" <nos...@roguelikefiction.com>
Date: Mon, 14 Jul 2008 10:47:50 -0400
Local: Mon, Jul 14 2008 10:47 am
Subject: Re: The Doryen Library 1.3.2 + The Doryen Arena 0.7 released
"stu" <yakumo9...@gmail.com> wrote in message

news:e953e000-24a0-4b83-a772-4bccabc61f9b@y21g2000hsf.googlegroups.com...
On Jul 14, 5:31 am, jice <jice.nos...@gmail.com> wrote:

> libtcod 1.3.2 is a bugfix release. It also adds documentation for the
> fast generic container TCODList.

>neat you re-invented a basic data structure.. The Array!
>Why call it a list when its really an array and not a list at all?

C'mon now nobody's paying jice to do this.

You've got some valid criticisms, and I'm willing to bet that jice will
consider them. But a little encouragement goes a long way too.

Nathan
http://roguelikefiction.com


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
zaim...@zaimoni.com  
View profile
 More options Jul 14, 11:12 am
Newsgroups: rec.games.roguelike.development
From: zaim...@zaimoni.com
Date: Mon, 14 Jul 2008 08:12:41 -0700 (PDT)
Local: Mon, Jul 14 2008 11:12 am
Subject: Re: The Doryen Library 1.3.2 + The Doryen Arena 0.7 released
On Jul 14, 4:31 am, jice <jice.nos...@gmail.com> wrote:

> libtcod 1.3.2 is a bugfix release. It also adds documentation for the
> fast generic container TCODList.

> http://jice.nospam.googlepages.com/thedoryenlibrary

It would be nice to have a more confidence-inspiring URL for the
download link (one that doesn't claim 1.3.1, etc.)

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
zaim...@zaimoni.com  
View profile
 More options Jul 14, 11:56 am
Newsgroups: rec.games.roguelike.development
From: zaim...@zaimoni.com
Date: Mon, 14 Jul 2008 08:56:36 -0700 (PDT)
Local: Mon, Jul 14 2008 11:56 am
Subject: Re: The Doryen Library 1.3.2 + The Doryen Arena 0.7 released
On Jul 14, 9:15 am, stu <yakumo9...@gmail.com> wrote:

> On Jul 14, 5:31 am, jice <jice.nos...@gmail.com> wrote:

> > libtcod 1.3.2 is a bugfix release. It also adds documentation for the
> > fast generic container TCODList.

> neat you re-invented a basic data structure.. The Array!
> Why call it a list when its really an array and not a list at all?

While I empathize (cf my flamewar on the converse notation error in
Python: calling an array a list), I would not have mentioned that
here.

> ....

> Implementing as an array makes insertion/removal of anything
> but the tail a long process, which as implemented by a for loop
> is much longer than a straight up memmove.

IMO, the C version should be rewritten to use memmove and realloc.
(However, I don't actually use libtcod, I just archive it locally for
reference.)

The C++ version is trickier (but then again, std::vector is a moderate-
weight TCODList).  algorithm is one of the moderate-weight headers on
GCC, so std::copy isn't a real option for a lightweight class.  (A
competent implementation of std::copy will reduce to memmove when
appropriate).

> The only time a List implemented as an Array as you have pays
> off is if you know the arbitrary index of an item you want to
> access.

I wish.  An array is also useful for avoiding dynamic memory manager
overhead, by minimizing the total number of pointers allocated.
However, I'm not sure this is actually a concern for libtcod.

(Yes, a properly implemented non-robust general C/C++ memory manager
can be sublinear in the number of already existing pointers for both
allocation and deallocation.)


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jice  
View profile
 More options Jul 14, 12:37 pm
Newsgroups: rec.games.roguelike.development
From: jice <jice.nos...@gmail.com>
Date: Mon, 14 Jul 2008 09:37:02 -0700 (PDT)
Local: Mon, Jul 14 2008 12:37 pm
Subject: Re: The Doryen Library 1.3.2 + The Doryen Arena 0.7 released
On 14 juil, 16:15, stu <yakumo9...@gmail.com> wrote:

> neat you re-invented a basic data structure.. The Array!
> Why call it a list when its really an array and not a list at all?

Hey put down the big guns ! The list is already used internally by the
library, so I just thought it would be cool for it to be documented,
so that developers that are looking for a simple container don't
bother creating it from scratch in C or use STL in C++. Of course it
could be a little faster, but everybody knows a container can't be
faster for all operations. Either you have fast push operations, or
fast insertions, or fast index access... This implementation is "fast
enough" for most common operations and very simple to use. That's the
whole philosophy behing libtcod. Nobody is forced to use it.

On 14 juil, 17:12, zaim...@zaimoni.com wrote:

> It would be nice to have a more confidence-inspiring URL for the
> download link (one that doesn't claim 1.3.1, etc.)

Err right, they were pointing to the old 1.3.1 packages. It's fixed
now. Thanks.

--
jice


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jota...@hotmail.com  
View profile
 More options Jul 14, 12:59 pm
Newsgroups: rec.games.roguelike.development
From: jota...@hotmail.com
Date: Mon, 14 Jul 2008 09:59:53 -0700 (PDT)
Local: Mon, Jul 14 2008 12:59 pm
Subject: Re: The Doryen Library 1.3.2 + The Doryen Arena 0.7 released
I think it's neat you put in the list, simply because if this is also
meant to be a good RL starter kit (covering all aspects of building a
RL, not just for experienced programmers, but also for beginners),
many could start with a giant mess of arrays and/or pointers (home-
made linked lists) as I did a while back, and while that's good as a
learning experience, it can break an otherwise decent RL. Not to
mention the morale buster of dealing with such "complex" issues, in
the mind of a wannabe programmer.

I'd like to be able to introduce people to coding a RL and not go "oh,
then there's this thing with lists... arghh.. use an array.. here's
now to insert and delete elements.. index minus one... etc". It's much
better to just say "here's a simple list you can use, call these
functions, then when you're comfortable with programming you can take
up other stuff".

Yes I tutor a lot.
:)

Jotaf


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jice  
View profile
 More options Jul 14, 2:29 pm
Newsgroups: rec.games.roguelike.development
From: jice <jice.nos...@gmail.com>
Date: Mon, 14 Jul 2008 11:29:41 -0700 (PDT)
Local: Mon, Jul 14 2008 2:29 pm
Subject: Re: The Doryen Library 1.3.2 + The Doryen Arena 0.7 released
On 14 juil, 18:59, jota...@hotmail.com wrote:

True. I believe a pretty important part of the developers using
libtcod are C/C++ beginners. Having a container out of the box will
probably save them a lot of pain. But that doesn't mean it's low
quality stuff. This is the only container I use in Arena and TCOD and
I don't think they are beginner programs...

--
jice


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
stu  
View profile
 More options Jul 14, 9:22 pm
Newsgroups: rec.games.roguelike.development
From: stu <yakumo9...@gmail.com>
Date: Mon, 14 Jul 2008 18:22:42 -0700 (PDT)
Local: Mon, Jul 14 2008 9:22 pm
Subject: Re: The Doryen Library 1.3.2 + The Doryen Arena 0.7 released
On Jul 14, 2:29 pm, jice <jice.nos...@gmail.com> wrote:

> True. I believe a pretty important part of the developers using
> libtcod are C/C++ beginners. Having a container out of the box will
> probably save them a lot of pain. But that doesn't mean it's low
> quality stuff. This is the only container I use in Arena and TCOD and
> I don't think they are beginner programs...

Well, I didnt say the rest of the lib was bad, I think its quite cool.
I'd be using it if it came out before I started writing cnc and rolled
my own sdl interface. I'd rather see people use it over curses, its
time
we all moved from curses to SDL! :)

I think the list code is low quality compared to the rest of TCOD,
your using for loops to move large chunks of contiguous memory
around, thats plain lazy when you can just memmove and be done.

if it works, it works right, its just one of those things I happened
to look at and go aaargh during my teabreak at work :), and I'd rather
look at TCOD than SAP....

-stu


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jota...@hotmail.com  
View profile
 More options Jul 14, 9:30 pm
Newsgroups: rec.games.roguelike.development
From: jota...@hotmail.com
Date: Mon, 14 Jul 2008 18:30:50 -0700 (PDT)
Local: Mon, Jul 14 2008 9:30 pm
Subject: Re: The Doryen Library 1.3.2 + The Doryen Arena 0.7 released
On 14 Jul, 19:29, jice <jice.nos...@gmail.com> wrote:

> True. I believe a pretty important part of the developers using
> libtcod are C/C++ beginners. Having a container out of the box will
> probably save them a lot of pain. But that doesn't mean it's low
> quality stuff. This is the only container I use in Arena and TCOD and
> I don't think they are beginner programs...

> --
> jice

I didn't say anything about its quality, it seems pretty good; my main
point is that it's beginner-friendly. A programmer will eventually
learn linked lists and array operations, etc. Not to "code something
better", but (most importantly) because they need to know how these
things work, and (least importantly) to be able to design a library
that fits a demanding system better than a generic list. But IMO this
knowledge isn't needed when starting out; that's like starting to
build a house from the top.

Jotaf


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jice  
View profile
 More options Jul 15, 5:37 am
Newsgroups: rec.games.roguelike.development
From: jice <jice.nos...@gmail.com>
Date: Tue, 15 Jul 2008 02:37:37 -0700 (PDT)
Local: Tues, Jul 15 2008 5:37 am
Subject: Re: The Doryen Library 1.3.2 + The Doryen Arena 0.7 released
On 15 juil, 03:22, stu <yakumo9...@gmail.com> wrote:

> its time we all moved from curses to SDL! :)

(warning, troll inside...) Honestly, I can't understand how one can
use a library as user-unfriendly as curses... Some like their code
being plagued with mvaddchnstr and mvwadd_wchnstr... This sounds like
mordor's black speech for me... :P

> I think the list code is low quality compared to the rest of TCOD,
> your using for loops to move large chunks of contiguous memory
> around, thats plain lazy when you can just memmove and be done.

I don't think it matters :
* memmove is nothing else than a for loop moving large chunks of
contiguous memory. Ok, it will be faster than an optimized C loop, but
not that faster, so the gain will be noticeable only if you intend do
do billions of insertions.
* TCODList has blazing fast push/pop operations, iterators and index
access. It will never have fast insertions. So if I had to do billions
of insertions, I would certainly not use it because it will be slow,
even with memmove. If you definitely need those billions of
insertions, then you'll have to write your own container, specifically
designed for this use because a general all-purposes container can't
be used in every performance-intensive scenario.

Now I'll replace the loop with a memmove call just to keep you from
aaarghing, but there won't be any noticeable change in the programs
using TCODList :P

Concerning the list reallocation, I think adding a constant amount of
entries, like 64 is bad. Try to allocate a list with 10 000 elements
and you need 156 reallocations... This is slow and will have
noticeable impact on the game performances. And you will lose lots of
memory too if you have a lot of small lists with only a few elements.
On the other hand, by doubling the size each time, you can allocate in
the worst case twice the amount of memory actually needed. This is
bad, but it can be an issue only if you allocate a 256Mb container.
I'll add a constructor allowing you to preallocate the right size.

Finally, for the memory callback, you can free the memory by
destroying the TCODList object. If you mean freeing memory when you
remove elements from the list, I think it's bad too. If your list
contains 1000 elements at some point, then only 50, there's a good
chance it will grow up to 1000 again