Page 1 of 2

New improvements???

Posted: 01 Jun 2005, 04:10
by Javila
Hi all,

I need some opinions about this questions:

1 - It is acceptable to create a "in game" help system based in reading some text files??? I've an interesting and "simple" solution in mind...

2 - It is acceptable to create a system that permits the input keys to be configured only by "config.xml" file, without a "in game" window for it??? I could only think in this option...

3 - Coming soon... ;)

Best regards,

Javila

Posted: 01 Jun 2005, 10:14
by Bjørn
In game help system based on text files would be fine. I think it was already planned but I don't think any progress has been made with it yet.

Configuration of keys through config.xml would be a first step, just keep in mind it will be preferred to have an in game setup dialog for this later.

Answer to number 3... coming soon. ;-)

Posted: 01 Jun 2005, 15:14
by Javila
Bjørn,

I'll translate my ideas in some codes so...

But, I'd read the SDL and Guichan API and I guess to create a game setup for keys will be a great challenge... :(

Cya

Posted: 02 Jun 2005, 03:55
by Javila
Bjørn,

In game help system done I think. Please check your mailbox...

Questions:

3 - Are ther another way to draw a text in a window, instead of use a ImageFont??? If not, can we use at least about four diferent colors (black/red/green/blue) or these four ImageFont will overload the client???

4 - Coming soon...

Cya

Posted: 02 Jun 2005, 14:17
by Bjørn
Yes we still need to improve the font rendering. One solution would be to make several custom fonts in different colors and another would be to go with TrueType fonts. We used to plan SDL_ttf but that doesn't work nicely with OpenGL in which case using Freetype 2 directly would be an option, but I think I'd rather stick with ImageFont now and just do some different colors and maybe sizes. This would give us the most freedom in how the font looks.

Help system looked fine, check your mailbox... ;-)

Posted: 02 Jun 2005, 20:40
by Javila
In game help system was commited to CVS!!!
Waiting for comments...
;-)


It's really a pity that there aren't a way to draw the string directly in screen instead of render each char as a small image... But, if you can add some image fonts will be nice. Please add at least the red/green/blue ones ;-) I'd done some modifications in chat window to support colors, but unfortunately I don't know how (or where) is the best way to include these new fonts...


Back to question #2:

I can implement (I hope ;-) a system that read some input keys configuration from config.xml file, but I guess I can't create a system to write the config to file. In this case, the config.xml will have just an int (ascii value) for each input key. This is very limited.

Another solution is save the "name" ("a", "F3", "SPACE", "LCTRL" and so on) of input key (or combo like "LCTRL+SHIFT" and "LALT+E") as a string. This way we can handle more options and create a GUI too, but we need a table (as an 2D array, by example) of conformity between each string and your correlated "key".

What do you think???

Posted: 02 Jun 2005, 23:04
by Bjørn
About drawing strings, well, that's basically always on a per-character basis whatever method you use. I think using an image font will allow us to have a nice font, just somebody has to draw something better than our current fixed width one.

Actually now that you mention modification keys, it occurs to me we might not want to allow every key to be customized. Still I think your idea of using key names that can include combos would be fine. I would prefer to use the naming Java uses as well, which is like:

"INSERT"
"control DELETE"
"alt shift X"

Then finally about the help window. It looks like a very good start. I had three problems which was that it simply crashed when it couldn't find the text files (cause I didn't do make install yet), the fact that make install is actually needed (we'll make it load the files through resource manager I think), and finally somehow I couldn't move the window. On IRC somebody mentioned a back button, which would imply a page history, and I think this would be a good thing to add.

Posted: 03 Jun 2005, 04:16
by Javila
Hummm... Are there not a way to draw strings as is done in Java??? Just setting the color before draw its??? BTW, I like monospaced fonts. It's more readable...

And I'm thinking in just some keys customizations, not all... The name to use is a minor problem, because I'll need an array with all pair string/key. We need think about what events can be customized and what cannot...

About help window... Here the window never crashed... And without install the text files also worked fine... I can't understand... Really I can't move the window too... I'll check this... About back button, all help pages has a "Back to Index" link!!! I thought this was enough... Is it not??? :(

My fault: The help window is created "on the fly" every time you press F1 key. This allows multiple windows... I'll change the code soon, to the way that window is created together with others windows and show/hide with "setVisible(bool)" function...

Posted: 03 Jun 2005, 06:51
by Javila
Now you can move the help window... Bug fixed! ;-)

No one crash here yet...

Finally, as I was talking with nym, a back button will turn necessary to use a history. This will allocate machine resource without necessity. This feature can be done with a simple addition of a link "Back to xxx" or something like this... Simple and powerful!!!

Posted: 03 Jun 2005, 15:54
by ElvenProgrammer
Very nice work Javila, I just tryed the help window and it worked nicely...

Posted: 08 Jun 2005, 19:33
by Javila
Hi all,

My new BrowserBox and PopupMenu is almost done... Just some actions to be implemented (add buddy, follow) and a minor bug to fix...

Browserbox supports links and color and can be used in Help and Chat windows...

Clicking over monster:
Image

Clicking over NPC:
Image

Clicking over player:
Image

Clicking over tile:
Image

Clicking over floor item:
Image

Posted: 08 Jun 2005, 23:31
by Bjørn
I think you're showing some nice progress here. In terms of user interface I think a lot of the one-option cases can be left out. Probably a control system where right click spawns the menu and left click does a default action (target a monster, walk to location, talk with NPC, pick up item) would be best.

Keep in mind though that the menu will also need keyboard input. In this regard, and also in regard to general functionality, I'm wondering why you are not extending a Guichan ListBox.

Posted: 09 Jun 2005, 03:11
by Javila
I think you're showing some nice progress here.
Tnx Bjørn... ;-)
In terms of user interface I think a lot of the one-option cases can be left out. Probably a control system where right click spawns the menu and left click does a default action (target a monster, walk to location, talk with NPC, pick up item) would be best.
Indeed... Who never "killed" a buddy when attacking a monster together, while right click on buddy instead on monster... This will start several trade requests and a big trouble to buddy...

Well... I always desired that we can use left click for defaul actions (as you said) and right click for selective menu... Also, I guess we can handle left click in game.cpp instead gui/gui.cpp... Maybe it will be better keep all user input handler together...
Keep in mind though that the menu will also need keyboard input. In this regard, and also in regard to general functionality
I guess it will be a big problem create a menu that can handle keyboard input...Imho, we can create some slash commands (like: /addbuddy DareDevil or /trade Bjorn) for this task...

Also we can use some function keys (F2-F4,F8-F12) with a little range (5 tiles???) ahead our character... This way, we can execute an action (depends of slash comand or pressed key) with the first being in our range...
I'm wondering why you are not extending a Guichan ListBox.
In fact, the BrowserBox extends Guichan Widget directly... The PopupMenu extends Window, but without title bar... For handle links I've used a improved system (better then I'd made in In-game Help system... Now we can have: text and links in the same line, several links per line, highlighted links (I can implement the mouse change when over link if necessary)... For colors I've used just one single ImageFont and just four colors (black/red/green/blue/link color), but I can easily extend the widget to use all colors we want... Finally I discover how coloring the TMW texts without load several fonts... You will see how easy it is... ;-)

BTW, a screenshot showing the Chat using BrowserBox instead of TextBox:
Image

.

Posted: 09 Jun 2005, 03:34
by Sull
wow really nice work,impatien to get it on the next cvs =)

Posted: 09 Jun 2005, 12:03
by nym
Hmmm, nice :)

Maybe you should think about contributing the BrowserBox to Guichan also. As it is possibly quite a useful widget (and Guichan doesn't really have a large set of widgets). :)