Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Dec 18, 2017 5:21 am

All times are UTC




Forum locked  This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 
Author Message
 Post subject: Window engine
PostPosted: Tue Jan 20, 2004 9:05 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
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.)

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Last edited by Zuu on Tue Jan 20, 2004 12:56 pm, edited 1 time in total.

Top
   
 
 Post subject:
PostPosted: Tue Jan 20, 2004 9:52 am 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Fri Mar 07, 2003 1:10 pm
Posts: 3602
Location: Germany
I have written a GUI engine aswell.
I am interested in GUI related designs aswell ...


Top
   
 
 Post subject:
PostPosted: Tue Jan 20, 2004 10:35 am 
Offline
Route Supervisor
Route Supervisor

Joined: Wed Jul 30, 2003 6:36 pm
Posts: 441
Location: The Codecave
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


Top
   
 
 Post subject:
PostPosted: Tue Jan 20, 2004 12:57 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
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)


Top
   
 
 Post subject: Re: Window engine
PostPosted: Tue Jan 20, 2004 1:12 pm 
Offline
Route Supervisor
Route Supervisor

Joined: Wed Jul 30, 2003 6:36 pm
Posts: 441
Location: The Codecave
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:
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


Top
   
 
 Post subject:
PostPosted: Wed Jan 21, 2004 11:04 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
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)


Top
   
 
 Post subject:
PostPosted: Wed Jan 21, 2004 2:26 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 13161
Location: The Netherlands
Just a guess from someone who just started a tutorial in C++: that is C++ huh?

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10


Top
   
 
 Post subject:
PostPosted: Wed Jan 21, 2004 2:48 pm 
Offline
Route Supervisor
Route Supervisor

Joined: Wed Jul 30, 2003 6:36 pm
Posts: 441
Location: The Codecave
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


Top
   
 
 Post subject:
PostPosted: Tue Jan 27, 2004 1:13 pm 
Offline
Engineer
Engineer
User avatar

Joined: Wed Jan 07, 2004 6:37 pm
Posts: 109
Location: Norway
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.


Top
   
 
 Post subject:
PostPosted: Sun Feb 08, 2004 3:10 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun May 04, 2003 11:00 am
Posts: 2720
Location: Torquay, England
It looks like POV-Ray to me.

_________________
<!-- End Of Post !-->
Image


Top
   
 
Display posts from previous:  Sort by  
Forum locked  This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2017 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2017.
Hosted by Zernebok Hosting.