From boot to play. What should it "do"?

Development discussion about Transport Empire. Other discussion to General forum please.

Moderator: Transport Empire Moderators

Hellfire
Transport Empire Developer
Transport Empire Developer
Posts: 699
Joined: 03 Feb 2003 09:30
Location: Back at the office

From boot to play. What should it "do"?

Post by Hellfire »

Hah! I've cought your attention! :P


I've been coding along nicely and quietly (no posts for almost a week...), but I've been thinking about initialization: the things that should be done before we can start laying track and buying vehicles.

I was thinking about the following use cases:

Single player, new game
  • The Gamer starts TransportEmpire.exe, which spawns a server and a client
  • The server is running in an INIT state
  • The client displays a menu, which has at least a "new game" and "load game" option.
  • The Gamer clicks on "new game"
  • In a next screen, the Gamer chooses the options for generating the map.
  • The server generates the map and goes into SINGLE PLAYER GAME mode.
  • The client displays a piece of the map and allows the Gamer to start building his empire.
Single player, load game
  • The Gamer starts TransportEmpire.exe, which spawns a server and a client
  • The server is running in an INIT state
  • The client displays a menu, which has at least a "new game" and "load game" option.
  • The Gamer clicks on "load game"
  • The server loads the saved game data from disc and goes into SINGLE PLAYER GAME mode.
  • The client displays a piece of the map and allows the Gamer to extend his empire.
Multi player game
  • The Gamer starts TransportEmpire.exe, which spawns a server and a client.
  • The server is running in an INIT state
  • The client displays a menu, which has at least a "network game" option.
  • The Gamer clicks on "network game".
  • Assuming a LAN game, the Client broadcasts for other available servers. Each is listed to the Gamer.
  • The Gamer selects a multi-player server or creates his own and enters a chatroom.
  • Players are selected by the host Gamer (or kicked :twisted:), who also initiates the game.
  • The host server goes into MULTI PLAYER GAME mode (which for example forbids the Pause button)
  • The clients all use the same server to play the game.
  • The local (unused) servers still remain in the INIT state.

Now, for the reason why I opened this topic: I'd like some discussion about this. Feel free to express yourselfs. Concept art and menu structures are very welcome. Chatbox layouts even more. But especially, I'd like to discuss the things that you expect to happen when you doubleclick on the Transport Empire icon, right up to the moment when you start building on the map.
Feel free to contact me over Email! My current timezone: Europe/Amsterdam (GMT+1 or GMT+2)

Code: Select all

+------------Oo.------+
| Transport Empire -> |
+---------------------+
[ General TE Discussion ] [ TE Development ] [ TE Coding ]
Under construction...
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

I think I'll spend tomorrow looking at the RRT2 menu style. I always thought it was very player-friendly. Right now it's a tad bit late to install RRT2 and analyse it.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Would it possible for the client to spawn the server only when a server is required?
So, instead:

Clients behave as follows:
  • The Gamer starts TransportEmpire.exe, the client
  • The client displays a menu, which has at least a "new game", "load game", "join network game", and "host network game" options.
  • The user selects one of the four options:
    • If "new game" or "load game" is selected, a server is spawned, listening only to localhost.
    • If "join network game" is selected, the client searches for available servers and the user selects one of them to join.
    • If "host network game" is selected, a server is spawned in listen-to-all mode
  • The client joins the server.
  • If the server supports this, any user not connected from 127.0.0.1 or ::1 may log into the server as a host or an owner (All users connected from 127.0.0.1 or ::1 are automatically owners.)
  • Hosts may then request a new game, a game load, and make other changes to the global config.
  • Owners may stop the server, and do perform other similar actions.
  • All clients adjust local and user-based config and indicate that they're ready to start.
  • Once all clients are ready to start, any host may instruct the server to start the game (In SP mode, the client software should do this automatically when the player indicates he is ready.)
Servers behave as follows:
  • TransportEmpire_server.exe is started, and depending on how it is started will listen to some subset of the available network interfaces.
  • The server waits for clients to join.
  • Any client connecting from 127.0.0.1 or ::1 is considered a owner.
  • If enabled in the server config, any client not connecting from 127.0.0.1 or ::1 may enter the host password, and become a host.
  • Any host may enter the owner password and become an owner.
  • Hosts may set global config, and do admin-type things, such as "kick user". Hosts may not kick each other.
  • Owners may do anything a host can do, and may also kick hosts, kick other owners, and issue commands such as "stop server", "add/remove listen", &c.
  • All clients adjust user-based config and indicate that they're ready to start.
  • Once all clients are ready to start, a host instructs the server to start the game, and the server does so.
The reasoning here is that an idle server will do nothing but waste memory and processor time, and I don't have any extra of either of those.

Obviously the client has to have a pretty good idea how the game plays, so is it really necessary to have a client/server system for SP?
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

When looking from the menus (aka gamers) perspective, either you can make a clear split between multiplayer and singleplayer by having their menu paths split already at top-level. Or you can have a common new game dialog where one option can be play on a remote server (MP) or local game (SP).


I'll do an atempt to make a menu layout of the later case in VS C#.

EDIT:

Even thought I like the idea that MP and SP shall not be threated as two totaly separate things, I have to admit that it's probably good to make that seperation as we then won't need a "super dialog" for creating new games (and joining games) of both kinds. A such dialog could probably be handeled by having tabs or something similar for MP and SP. But then it might be simplier and less consuming to have two different dialogs.

The attachment shows a main-menu of the aproach with SP/MP selection in the main menu.

EDIT 2:

This is what the DD says about interface:
Interface of the game includes such properties:
* All player buildings are built first in survey mode (planning), then the player acquires land, and latest construction ensues.
Attachments
Menu is centered on the screen in the x-axis. centered or a bit above in y-axis.
Menu is centered on the screen in the x-axis. centered or a bit above in y-axis.
main.png (7.48 KiB) Viewed 8277 times
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 »

I like that menu you made, Zuu. I think it's better to have buttons with menus 'behind it' than to have menus appearing 'next to the buttons' (like RRT2 has). The clear disctinction between normal and MP games is something you find in many games.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

@Hyronymus: Yep. Probably it's a good thing to step away to far from the de facto standards, as long as our idea isn't significant better.

---

For the visual part. I made a concept art (attachment), which ilustrates a main menu. Note, the buttons are not meant to look like that, but I didn't wanted to spend mutch time on them so I used GIMPs buttons.

The main idea is that first you have the background, then you have a solid or half transparent surface with or without a border, then you have the buttons on this surface.

The good thing with this variant is that it's simple, and it's easy to change the background image later on when we got a better image.

I have taken the background image from the graphics thread, link. The artist is Hellfire.

[EDIT: Added link to post with background source image. ]
Attachments
visual.png
visual.png (160.2 KiB) Viewed 8238 times
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 »

The choice of a Dutch 1600 engine alone satisfies me already :D.
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

Except for the fact that such an undetailed 3d model looks pretty ugly at such a large scale, IMO.
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
User avatar
Arathorn
Tycoon
Tycoon
Posts: 6937
Joined: 30 Nov 2002 17:10

Post by Arathorn »

Gives me a good reason to finish my higly detailed NS 1300 some time. ;)
And to start making 3d models for TE again.
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

Does that mean TE will include Dutch vehicles by default?
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

If people provide them, sure. But let's not go too much OT (I know I started it, sorry).
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

For this concept menu, I did just pick an image as background. I didn't care that mutch about quality nor the actual scene. I actually scale it up a bit to make it 800x600.

So the fact that there is a yellow engine that you say is a german engine (see I have little knownledge of train sets etc.) does not mean anything.

I think it is best to focus on the concepts rather than the exact background image etc. as that can be selected/rendered later on. But thats just my view on it.
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 »

Wasn't the topic about the game startup system? I only wonder.

A very conceptional question, what speaks against moveing a singleplayer to multiplayer game?
I mean I would really like joining a nice game at later stage aswell.
(Consindering I think TE should support cooperative play right from the start)

So I don't think it's a problem to start a client server model even for singleplayer mode, atleast you support then dual core cpu's aswell :wink:
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

eis_os wrote:Wasn't the topic about the game startup system? I only wonder.
As far as I understod it was about startup, including the menusystem. To keep things more clear a split up might be good perhaps. Or we at least forget about the graphical parts for a while and focus on the structural things.

If someone wants to talk about pure graphical things (such as my last post with an attachment) it might be better to have that in another thread..
eis_os wrote:A very conceptional question, what speaks against moveing a singleplayer to multiplayer game?
I mean I would really like joining a nice game at later stage aswell.
What speeking against is that the Multiplayer/Singleplayer concept is well known and does not need any explanations. It will require some work to get a uniform dialog work good from the users point of view.

From developers/advanced users point of view it's probably nice if SP and MP is integrated well.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Hellfire
Transport Empire Developer
Transport Empire Developer
Posts: 699
Joined: 03 Feb 2003 09:30
Location: Back at the office

Post by Hellfire »

Zuu wrote:I have taken the background image from the graphics thread, link. The artist is Hellfire.
Oooh... I'm flattered. :) Nice menu's, by the way.
DaleStan wrote:Would it possible for the client to spawn the server only when a server is required?
[...]
The reasoning here is that an idle server will do nothing but waste memory and processor time, and I don't have any extra of either of those.

Obviously the client has to have a pretty good idea how the game plays, so is it really necessary to have a client/server system for SP?
It's possible to spawn a server only when needed. If we want to show in-game shots while browsing the menus, we'd probably need something server-ish or similar functionality at the client side. I'm not a fan of such approach. I'd like to keep the clients as simple as possible. Besides, an idle server takes a few microseconds of processor time once every 100ms, which does not influence the performance of current computers. Also, the memory usage (I estimate between 2Mb and 8Mb) is not much. (If this is all the memory you've got, you shouldn't run Transport Empire anyway. ;) ) It'll be swapped to disk when memory runs out anyway, so why care too much about that?

Nevertheless, I'll take your Client/Server behaviour in consideration. :)

Now why oh why is Sourceforge's CVS server down. I have stuff to commit!
Feel free to contact me over Email! My current timezone: Europe/Amsterdam (GMT+1 or GMT+2)

Code: Select all

+------------Oo.------+
| Transport Empire -> |
+---------------------+
[ General TE Discussion ] [ TE Development ] [ TE Coding ]
Under construction...
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Hellfire wrote:Also, the memory usage (I estimate between 2Mb and 8Mb)
On my current computer, those 8MB can make or break a game.

Some games I've played require that I shut down everything, including my firewall, to keep them out of the pagefile.

(256MB of RAM, 1.8GHz processor. Three and a half years old.)
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

Maybe we can ship 256MB ram with the game :roll: .
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

DaleStan wrote:
Hellfire wrote:Also, the memory usage (I estimate between 2Mb and 8Mb)
On my current computer, those 8MB can make or break a game.

Some games I've played require that I shut down everything, including my firewall, to keep them out of the pagefile.

(256MB of RAM, 1.8GHz processor. Three and a half years old.)
No offence, but I don't think that's a good argument. My 3.5 year old computer can't neither run TE, since it lacks a decent 3D-card. Shall we go 2D becuse of that? In your case it sounds like it's as easy as buying another memory module, which shouldn't be any expensive at all.

If you don't agree please PM or keep it as little OT as possible. I think we already have had discussions about hardware requirements. [EDIT: This thread Please take all HW discussions there. ]
Last edited by Zuu on 01 Apr 2006 21:49, edited 1 time in total.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Fair enough.

If my computer doesn't meet the minimum specs, then it doesn't meet the minimum specs. But buying new memory isn't particularly likely to happen; it requires increasing the size of my pagefile and hibfile, which basically means I have to get a bigger HD too, and that's when things start getting interesting, because I don't have a free drive bay. (I could do external USB, but those were, last I checked, notably more expensive than internal.)

(I don't remember seeing min-specs discussion, but I haven't gone searching for it either.)
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

Again my two cents about it.

Consindering I don't think you will have a fully functional game in the next 6 months, I won't worry much about memory requirements.

If you do some general memory saveings in design (so it's fast aswell, if you waste A LOT space, the cpu needs to fill the cache more often) it should fit in 256MB RAM.

If you have finished the whole game I think 512MB memory can be used without a problem.
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
Locked

Return to “Transport Empire Development”

Who is online

Users browsing this forum: No registered users and 21 guests