Window engine

A TTD clone that was under development. Development has now been stopped.
Locked
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Window engine

Post by Zuu »

I have som tips for the window engine. I have written a window engine for my own game, so I have some experience.

I don't know the strcture of your window engine but my suggest is:
* Use a script engie (for exampel lua) for initiation of the windows and actions.

* Have predefined actions wich you can asign a button. (for exampel: Select tool 12)


With litle work you can then make a mod wich replace all windows if you use a script engine. (or a simple input-file where all windowses are declarated.)
Last edited by Zuu on 20 Jan 2004 12:56, edited 1 time in total.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

I have written a GUI engine aswell.
I am interested in GUI related designs aswell ...
TBOT
Route Supervisor
Route Supervisor
Posts: 441
Joined: 30 Jul 2003 18:36
Location: The Codecave

Post by TBOT »

We will use our own 'language' (it's not scripting, more like configuration) for loading in everything about the gui.
In the end it will all come down to creating a new instance of a window class given a identifier for which window it should be.
"Peace cannot be kept by force. It can only be achieved by understanding." - Albert Einstein
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

I've updated my orginaly post now.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
TBOT
Route Supervisor
Route Supervisor
Posts: 441
Joined: 30 Jul 2003 18:36
Location: The Codecave

Re: Window engine

Post by TBOT »

zuu wrote:* Have predefined actions wich you can asign a button. (for exampel: Select tool 12)
That also was already in our plans, we image the configuration a bit like this:

Code: Select all

Window JukeBox
{
    Title = "Jazz Jukebox";
    
    Items
    {
        //      x,  y,  w,  h, ..., Action
        Button(10, 10, 25, 25, ..., JUKEBOX_PLAY);
        ...
    }

}
"Peace cannot be kept by force. It can only be achieved by understanding." - Albert Einstein
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

Looks good. Reson why I started this was that many people don't know how much work that is behind a good window system.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

Just a guess from someone who just started a tutorial in C++: that is C++ huh?
TBOT
Route Supervisor
Route Supervisor
Posts: 441
Joined: 30 Jul 2003 18:36
Location: The Codecave

Post by TBOT »

Hyronymus wrote:Just a guess from someone who just started a tutorial in C++: that is C++ huh?
Nope, it's a structure that might resemble the syntax of C++ a bit though, but it's certainly not C++ :)
"Peace cannot be kept by force. It can only be achieved by understanding." - Albert Einstein
Rexxie
Engineer
Engineer
Posts: 109
Joined: 07 Jan 2004 18:37
Location: Norway
Contact:

Post by Rexxie »

Looks good to me TBOT. Should be really easy to create your own mods for your engine with nice, easy scripting like that.
Hope you try to do the rest of the engine the same way, so we can all add our own little extentions or changes :)
- Rexxie
Sanity is a full time job.
BobXP
Tycoon
Tycoon
Posts: 2720
Joined: 04 May 2003 11:00
Location: Torquay, England
Contact:

Post by BobXP »

It looks like POV-Ray to me.
<!-- End Of Post !-->
Image
Locked

Return to “Transport Unlimited”

Who is online

Users browsing this forum: No registered users and 7 guests