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

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



> 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.

> 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
> 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
> always in the middle of the visible portion (we had a fix to 0.6 or so that
> did that)).

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

In the future, a possible solution could be to have an array of GC's
in each player structure.

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.

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.