The International Simutrans Forum

Development => Extension Requests => Topic started by: NightElfik on August 05, 2012, 12:34:44 PM

Title: Few suggestions
Post by: NightElfik on August 05, 2012, 12:34:44 PM
Hello, I've played Simutrans Experimental and posted general feedback with suggestions and bug reposts: http://forum.simutrans.com/index.php?topic=10308.0 (http://forum.simutrans.com/index.php?topic=10308.0). Since the most of sugestions are not experimental-only (as jamespetts says), I am reposting appropriate ones here.

In mentioned topic are also some bugs, which I will repost to appropriate section too.


Thanks for nice game!
Title: Re: Few suggestions
Post by: Ters on August 05, 2012, 01:13:13 PM
6: there is a button for retiring all vehicles on a line. The vehicles will stop loading new passengers/cargo, and will be sold automatically when empty. Just remember to click this before assigning the new vehicles to the line.

8: Print Screen is bound by the operating system, so it might be against some guidelines to use it.

9: This was fixed already in the previous century by adding a light on the keyboard. ;D

I also think the choppiness is due to the internal workings of the game, so it would be just as bad with more rendered frames per second. I might have misunderstood some earlier post on this point, though.
Title: Re: Few suggestions
Post by: NightElfik on August 05, 2012, 01:42:21 PM
Quote from: Ters on August 05, 2012, 01:13:13 PM
9: This was fixed already in the previous century by adding a light on the keyboard. ;D
Some notebooks do not have hardware signalizations of CapsLock whatsoever! There is only software overlay which shows only if funky utilities from manufacturer are installed (which I really hate).

Anyways I really don't know why so lucrative place on keyboard is taken by so useless key as CapsLock. I would rather see it completely gone OR to be somewhere near scroll lock/numlock.
Title: Re: Few suggestions
Post by: prissi on August 05, 2012, 09:18:02 PM
There are some nice tools the chance caps lock to a shift key. I would have rather control there too, liek in old times ;)

About choppy movement: The smallest amount a sprite in an isometric engine along a string (NS) way can be moved is two horizontal, one vertical. No matter of FPS, this will be choopy. Thus fps beyond 25 are meaningless. Moreover, every frame ALL vehicles on the map must be moved. Thus fps beyond 30 will not work in later games.

Finally, with large screens, we are reaching the bandwidth of the main memory to screen more or less (with cache missis) as in the larges zoomout level you could easily have 1 million objects on the screen. (Which is more than most 3D games have.) Even hardware assisted OpenGL did not improve rendiering speed. So fps 25 is already a very meaningful limit. Thus in pause only 10 fps, otherwise CPU consumption would not be reduced much.

to 4) You can easily define a tool to open it. However, it could ruin your savegame economy completely, when activated the wrong settings. Thus such a tool is hidden at the moment.


Title: Re: Few suggestions
Post by: Ters on August 05, 2012, 10:25:21 PM
One thing I didn' think of with caps lock earlier: Should Simutrans really pay attention to that for other things than text input? If a shortcut is Shift+A, you should have to press Shift+A, no matter what the caps lock state is. I don't think any other program I've used lets caps lock affect keyboard shortcuts. Alt+tab doesn't go backwards with caps lock on; shift must be pressed to go backwards.
Title: Re: Few suggestions
Post by: prissi on August 05, 2012, 10:31:14 PM
Problem is, if you are asking for the "scan code" then you need different scan codes for different keyboard layouts.

And SDL in "text mode" is required to handle unicode correctly. It aparently also uses caps-lock.

Windows uses also caps lock for login. Just after failing, it reminds you, that caps lock is on ...
Title: Re: Few suggestions
Post by: Ters on August 06, 2012, 11:39:44 AM
The sym field in the SDL key event structure seems to hold unshifted character, but only according to some default (probably US) layout. For Win32 and Allegro backends, it's seems possible to get the "correct" character for a virtual key.

But how robust is it to bind to ASCII (or Unicode) values, rather than keys? Wouldn't almost all of them be inaccessible on a Cyrillic keyboard? Though I know from first hand experience how annoying it is to hunt for the key on my keyboard that has the same scan code as a certain letter/symbol on the US layout. Yet binding to virtual keys seems to be the standard, even in post-internationalization-awareness APIs like Java AWT, and there must be some reason for it. Java even uses virtual key codes to specify mnemonics (the underlined character on buttons, menu items, etc.), which annoy me as a programmer, as I'm trying to tell Java that one of the letters in a string I just passed it is the mnemonic, not that a specific key is.
Title: Re: Few suggestions
Post by: prissi on August 06, 2012, 07:06:19 PM
Binding keys to a letter instead to their scancode means, that you can could use those directly in the menuconf.tab files. And while for shooter A instead of a could mean sure dead, it is rather harmless in SImutrans.

Furthermore, only windows has scancodes at all.
Title: Re: Few suggestions
Post by: Ters on August 06, 2012, 07:25:18 PM
Well there are scancodes, and there are virtual key codes. Since not all keys have an associated ASCII value, all keyboard APIs must have the latter (though some may call those scancodes).

I guess it also depends on whether the hot key for rotate is R or shift+r. (I also discovered that some keyboards have a shift lock instead of caps lock, which is meant to affect non-letters and hot keys.)
Title: Re: Few suggestions
Post by: NightElfik on August 06, 2012, 10:01:03 PM
I support the idea that CapsLock should not affect keyboard shortcuts at all. Only writing of text (like name of saved game).
Title: Re: Few suggestions
Post by: isidoro on August 06, 2012, 10:55:11 PM
Maybe an intermediate solution.  Forget it if it is nonsense: if SDL detects 'A' and Shift key is not pressed (configurable, of course in simuconf), turn it into an 'a'...

The same if SDL detects 'a' and Shift is pressed, since in some configurations, when CapsLock is on, pressing SHIFT and a letter gives the lowercase one.

Title: Re: Few suggestions
Post by: Ters on August 06, 2012, 11:02:45 PM
I have briefly considered that, but I'm not sure there's any cross platform reliable way of finding out what the lower case of any given letter is. For pure ASCII, there should be, but I think we're in the Unicode world here.
Title: Re: Few suggestions
Post by: prissi on August 07, 2012, 07:42:01 PM
For most commands it would work. But this leaves shift lock, when all numbers give special characters. Since some of them on some keyboards are without shift or with shift, this detection is aalmost impossible then.