Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible speedup in draw() (crossfire0.8) (fwd)



Hello, this is Tyler, I am the one that has been developing the color system.
Had a couple of comments:




> > Instead of changing foreground and background colors within the GC before
> > using XDrawImageString to print the item/player/whatever with the right
> > colors, a faster and more in the spirit of what GCs are for, would be to have
> > a separate GC for each foregound/background color combination and just use the
> > correct GC.
> 
> Yes, I agree, that is a much better solution.




At present there are 13 colors including black and white, what you are purposing
is to create 169 GCs, hmmm, interesting idea, This would definately, put more
flexability in the color system. We would be able to define colors to specific
objects with the same font characters quickly, this was one of my concerns 
when messing with the color. I will look into it and get back to you. 
Good Idea.

I am relatively new to X windows, so I have one question: How much memory will
be required to define 169 GCs??, Also consider that colors may be added, which
would require yet more GCs to be defined. If there is not a large constraint on
memory, this is definately the way to go with colors.


> 
> > It would also be nice to let players override the color selection (via
> > resources).   (I find the yellow objects hard to see).  Also, it would be nice

Very easy to do, I will make this possible, get back to you on that one too.



> > if each player was a different color (handy when several people choose the
> > same class).  It is actually very easy to at least make other player's
> > characters a different color than your own character (since your character is


Yes, it would be nice to be able to determine who is who in the game, the 
other day, we had a person's character killed, because another player thought
he was an Ogre, instead of a barbarian.


Another possible way of determining the different players apart would be to
attack a number to the character's bitmap, much like is done in netrek.



> If you all send fixes to me, they will probably be incorporated into the game.

Ditto here: although I do not have access to the ftp site at Frank's site, I
can post new updates to my ftp site as well.



> 
> Unfortunately I'll be gone for 1 1/2 months soon, but maybe someone else,
> possibly Tylor, can come up with something in the meanwhile.


Yes, I will be here all summer, don't hesitate(sp?) to send me some mail.


> 
> There are still 100 things to do in the game...one of them is to make
> a TODO list...
> Let me try a short summary:
> - optimize the inventory and look windows so that they don't draw the
>   same item more than once.
> - make it possible to have an archtype which consist of two or more
>   objects (like the dragon and the giant)
> - make it possible to have an endless linked list of joined objects.
>   (currently there are a couple hooks in the game which makes it possible for
>   the dragon and giant to exist.  The find_free_spot() function handles
>   only one object.)
> - put some security and user-friendlyness in the map-editor.
> - make it possible to have more than 256 different graphical bitmaps.
>   This can be done either by converting to XDrawImageString16 or by
>   using bitmaps instead of a font  (Currently, though, the speed of
>   the color-version of draw() is as slow as it would be with bitmaps).
> - decide what to use the lower-right window to and put that into it.
> - use X-resources more extensively
> - fix the bugs in the above mentioned improvements
> 
> At this point I'll post v1.0.alpha to alt.sources and later v1.0 to
> comp.sources.games.  But the TODO list will never stop...:
> 
> - make a string allocating system.  This way all objects will have a
>   (char *) pointer instead of an array and all objects with similar
>   names will just point to the same string.
> - make more items!  Imagine all the items in nethack/moria/ularn/omega...
> - make more graphics.
> - make more spells.
> - make spellbooks, maybe of different classes.
> - put the wisdom stat to use.
> - make more move/fight routines which the monsters can choose between.
>   the current move_monster() just aimlessly tries to move towards the
>   players, and then try to hit them.  The move_friendly_monster(),
>   move_smart_monster() and move_pet_monster() routines are sorely needed.
> - make more maps.
> - make a client/server system
> - make some login system, with passwords, like the muds have, and save
>   the player object between logins.
> - make easier to make new object-types.
> - maybe even make a simple interpreting programmin language to be used by
>   the objects. [object ob;ob=environment();set_speed(ob,3);sleep(30);
>   set_speed(ob,default_speed(ob));destruct(this_object());]
>   (sleep(30) is the easy part: speed_left=-1,speed=1/30.0)
> - make DOCS!
> - make even more items/graphics...
> 
> 
> Obviously this is more than I can handle, so any help will be greatly
> appreciated.
> 
> -Frank.
>
To add to this list:  A message editor, for each level.
Right now, it is difficult to put a message in with each level.

I have built some routines for rings, if anybody is interesting in getting them
please write me. The rings add and subtract points from your abilities: Str,
Int, Dam, Ac, etc.



Please keep in touch, via the mailing list, don't want to have several
different versions of crossfire floating around, that would make it harder to
to merge ideas together and to prevent from people spending lots of time on
the same areas.


Also I think it is wise to maybe to make a standard for all new maps as far as
names. I have already metioned this to Frank. Also needed is someone to keep
track of allocating slots to put maps, Example : levels 30-39 <Skud>
                                                 levels 40-49 <Andreas>
                                                 levels 50-59 <Lars> 


This will make it easier to incorporate another site's maps into a "global
version."


Ok, thats about all for now, any comments welcome.



Tyler.
Skud. 
tvangod@ecst.csuchico.edu