Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Sep 25, 2018 2:26 am

All times are UTC




Post new topic  Reply to topic  [ 42 posts ]  Go to page 1 2 3 Next
Author Message
 Post subject: Graphics
PostPosted: Sun Oct 28, 2012 4:01 pm 
Offline
Chairman
Chairman
User avatar

Joined: Mon Oct 19, 2009 1:29 pm
Posts: 858
Location: Germany
I start this thread to discuss all general graphics aspects of P1SIM with you.

thphwh wrote:
OT: I like the graphics a lot, it reminds me of Simutrans Comic Pak. How are you making them?

All graphics are drawn pixel by pixel using GIMP. Thus I can use multiple layers and its very easy to duplicate game objects like cars and citizens. The multi layer system is also very helpful for restructuring buildings, roads etc. below the already placed moveable objects.

Attachment:
gimp.png
gimp.png [ 25.98 KiB | Viewed 6640 times ]

_________________
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!


Top
   
 Post subject: Re: Graphics
PostPosted: Sun Oct 28, 2012 11:16 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Jul 11, 2004 2:55 pm
Posts: 2236
Location: West Midlands
I just want to say that I'm freaking loving the graphics.

_________________
Last known as: Weirdy


Top
   
 Post subject: Re: Graphics
PostPosted: Mon Oct 29, 2012 8:32 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Jan 14, 2007 12:14 pm
Posts: 393
So far I like your graphic style. Older 2D-games are often very dark, but your choice of colours look good. I'm still playing on an old machine (P4), because I'm not interested in all these modern action/fantasy games with fancy graphics.
But two points are critical. The vehicle animations should look good, which may be difficult with larger vehicles and if you play with trains, you always want to zoom out and still want to see clean graphics. If you look for example at locomotion, graphics exspecially ground textures look ugly if you zoom out.


Top
   
 Post subject: Re: Graphics
PostPosted: Mon Oct 29, 2012 11:20 am 
Offline
Director
Director
User avatar

Joined: Fri Dec 23, 2011 1:50 pm
Posts: 516
Location: Letchworth GC
I'd like to see company colours implemented; other than that the graphics are very nice to look at. If addons are supported, it shall be easy to draw graphics. :grin:


Top
   
 Post subject: Re: Graphics
PostPosted: Mon Oct 29, 2012 6:10 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 2381
Location: Virgo Supercluster
Maybe not quite "graphics" technically, but will there be something similar to OpenTTD's NewObjects? Eye-candy basically?


Top
   
 Post subject: Re: Graphics
PostPosted: Mon Oct 29, 2012 8:32 pm 
Offline
Chairman
Chairman
User avatar

Joined: Mon Oct 19, 2009 1:29 pm
Posts: 858
Location: Germany
robo wrote:
want to zoom out and still want to see clean graphics

Fair point. I will see what I can do.

thphwh wrote:
I'd like to see company colours implemented

To be honest, I planned NOT to realize company colors, since there can be more companies on a map than easily distinguishable colors. But at the moment I'm also a fan of company colors. Even though there could be several companies with nearly the same color.

Company colors are associated with one performance problem. Since all sprites are drawn to 3D objects first, I cannot use the company color technique of OTTD (real time altering of multiple pink pixels to the final company color). Instead I have to split all vehicle sprites into two sprites. One for the (always same looking) frame, windows, tires etc. and one mono-colored sprite which will be replaced by the final company color through OpenGL algorithms. This means that there could be double the number of vehicles in P1SIM, when I wouldn't implement company colors. But again: Currently Im planning to realize this feature.

Pyoro wrote:
Maybe not quite "graphics" technically, but will there be something similar to OpenTTD's NewObjects? Eye-candy basically?

thphwh wrote:
If addons are supported, it shall be easy to draw graphics. :grin:

I opened a new thread "Modding" for discussing these issues.

_________________
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!


Top
   
 Post subject: Re: Graphics
PostPosted: Tue Oct 30, 2012 5:40 pm 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Wed May 26, 2004 4:37 pm
Posts: 1804
Location: Britain
If those sprites go through a OpenGL shader (whilst being drawn to '3D' objects), it might be possible to either take two sprites (one being a recolour mask) as input, or just recolour a specific colour range for those objects. Depending on your implementation, of course.

_________________
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."


Top
   
 Post subject: Re: Graphics
PostPosted: Wed Oct 31, 2012 8:31 am 
Offline
Chairman
Chairman
User avatar

Joined: Mon Oct 19, 2009 1:29 pm
Posts: 858
Location: Germany
Lakie wrote:
If those sprites go through a OpenGL shader (whilst being drawn to '3D' objects), it might be possible to either take two sprites (one being a recolour mask) as input, or just recolour a specific colour range for those objects. Depending on your implementation, of course.


I didnt touch shaders yet (for complexity reasons). Perhaps I will use them in future and then be able to recolor a specific color range of a sprite. At the moment, I can only blit sprites and recolor the complete sprite with a single overlay color (with variable intensity).

_________________
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!


Top
   
 Post subject: Re: Graphics
PostPosted: Mon Feb 17, 2014 7:12 pm 
Offline
Chairman
Chairman
User avatar

Joined: Mon Oct 19, 2009 1:29 pm
Posts: 858
Location: Germany
robo wrote:
you always want to zoom out and still want to see clean graphics. If you look for example at locomotion, graphics exspecially ground textures look ugly if you zoom out.


Hey robo! Just for you an option for high quality zooming ;)

http://www.p1sim.org/?p=623

_________________
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!


Top
   
 Post subject: Re: Graphics
PostPosted: Tue Feb 18, 2014 10:22 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Jan 14, 2007 12:14 pm
Posts: 393
I like it. A clean zoom in 2D is probably not very easy, because most old 2Dgames I know avoid it. One game which had a good zoom and ground textures which comes to my mind is Industry giant 2, apart from the deepest zoom. There's an unpack tool/nvidiamod available where you could analyse how the ground textures work, probably similar to what Lakie described, it's a mix of at least two larger sprites going over several tiles.
It may be enough to have two zoom levels, depending how large the maps turn out. What I like in general is that railroads and street roads have the same size (one tile for one direction), because trucks/roads look to small compared to trains in locomotion (this may be one reason nobody uses them in the game ;-) )
In generell it may be better to go for less intensiv colours and a less grainy look like for example age of empires online (only judging from the screenshots), but a feature I liked in the more creative game Rollercoastertycoon 2 is that you can change the ground textures in the game.


Top
   
 Post subject: Re: Graphics
PostPosted: Fri Feb 21, 2014 8:24 pm 
Offline
Route Supervisor
Route Supervisor

Joined: Wed Mar 27, 2013 8:58 am
Posts: 402
If you are not using shaders then you lose a whole world of possibilities. With shaders you could even emulate lighting with your graphics.
Really think about it. It's not much of a deal - you will spend maximally week refactoring your code.


Top
   
 Post subject: Re: Graphics
PostPosted: Sat Feb 22, 2014 7:33 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 02, 2013 2:03 am
Posts: 1423
2D means that there is only a view from the top, right?

_________________
Formerly known as UseYourIllusion.
Java Scenario Found Here - Version 2 out
[tweɪ̂ pû tɕʰì wɔ̀ mǐlɤ lû tɕʰìŋ nì pɑ́ŋmɑ̌ŋ]


Top
   
 Post subject: Re: Graphics
PostPosted: Sat Feb 22, 2014 9:09 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Jan 14, 2007 12:14 pm
Posts: 393
Another interesting question is how you want to deal with landscape in a topdown game (you once said that you want to go first for topdown and later for isometric view).
One idea I liked and found on the web with a simple approach and similar to games like for example caesar3 which could work for both views is this: http://www.bunpow.com/stock-graphic/123 ... 30837.html


Top
   
 Post subject: Re: Graphics
PostPosted: Sat Feb 22, 2014 12:00 pm 
Offline
Chairman
Chairman
User avatar

Joined: Mon Oct 19, 2009 1:29 pm
Posts: 858
Location: Germany
robo wrote:
It may be enough to have two zoom levels, depending how large the maps turn out.

The map size is nearly unlimited. You can scroll nearly forever in any direction. (Terrain size: Integer.MAX_VALUE tiles x Integer.MAX_VALUE tiles) Thus I implemented three zoom levels. Here is a preview of the maximum zoom-out level:
Attachment:
three_zoom_levels.png
three_zoom_levels.png [ 91.99 KiB | Viewed 4939 times ]


lukasz1985 wrote:
If you are not using shaders then you lose a whole world of possibilities. With shaders you could even emulate lighting with your graphics.
Really think about it. It's not much of a deal - you will spend maximally week refactoring your code.

Shaders are fantastic. And perhaps I will implement them later. But keep in mind that there are hundred (if not thousands) of light sources on the screen.
Attachment:
lights.png
lights.png [ 43.66 KiB | Viewed 4939 times ]

Currently I use an offscreen light map where all light sprites are drawn to. This light map is applied to the drawn terrain + vehicles layer. It took several weeks to implement that feature. At the moment I don't see, why I should use the rare development time for implementing shaders for light effects, when are still no trains, planes, ships, buildings on the screen. But again. I know about the existence of shaders. And I will have them in mind during the further development process.

TinyMusic wrote:
2D means that there is only a view from the top, right?

In this context, yes. P1SIM has a top down view.

robo wrote:
Another interesting question is how you want to deal with landscape in a topdown game (you once said that you want to go first for topdown and later for isometric view).

The landscape is already finished. Just have a look at the following screenshot. And if P1SIM gets an isometric view in the future, its not very hard to use the very same landscape.
Attachment:
terrain.png
terrain.png [ 159.31 KiB | Viewed 4939 times ]

_________________
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!


Top
   
 Post subject: Re: Graphics
PostPosted: Sat Feb 22, 2014 12:38 pm 
Offline
Route Supervisor
Route Supervisor

Joined: Wed Mar 27, 2013 8:58 am
Posts: 402
About the lighting: you don't have to take every light in the scene into account. What I actually meant is that you could put a directional light for a sun somewhere and give every object a normal map that would display objects as if they were sun-aware. What I mean is called "Cel shading" i guess : http://www.youtube.com/watch?v=4rUbSh04OZs&feature=youtu.be. That's a very neat trick - if of course it fit's the style you want to achieve.

And about the performance: I would like to ask you if you use immediate mode for rendering? I mean, I dont know if you use Slick or LibGDX or just LWJGL but if you are using glBegin() and glEnd() calls to draw things on the screen then it's very not effective. You could use vertex arrays to store data on the GPU or VBO's - the increase in performance is dramatic.


Top
   
 Post subject: Re: Graphics
PostPosted: Sat Feb 22, 2014 1:26 pm 
Offline
Chairman
Chairman
User avatar

Joined: Mon Oct 19, 2009 1:29 pm
Posts: 858
Location: Germany
lukasz1985 wrote:
And about the performance: I would like to ask you if you use immediate mode for rendering? I mean, I dont know if you use Slick or LibGDX or just LWJGL but if you are using glBegin() and glEnd() calls to draw things on the screen then it's very not effective. You could use vertex arrays to store data on the GPU or VBO's - the increase in performance is dramatic.

I am using Slick2D. I tried Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER) as well as the IMMEDIATE mode. No effect. Both runs at 960 frames per second on my machine. I will keep your hint in mind, if I get any performance problems in future.

_________________
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!


Top
   
 Post subject: Re: Graphics
PostPosted: Sun Mar 02, 2014 6:21 pm 
Offline
Chairman
Chairman
User avatar

Joined: Sat Nov 26, 2005 4:21 pm
Posts: 845
Location: Dresden (formerly Ruhr Area)
So, I have a few questions that came to my mind:

1. If the highest zoom level (the farthest out) covers an area of roughly 80*60 (I could be quite off on this value *Edit) squares and a runway has a length of 3.000m at 5m/square -> 600 squares length of a runway, so we see just about more than 10% on the highest zoom level - it seems a bit tough to keep track of your airport that way.

2. Integer.MAX_VALUE = 2 million something in java, right? That means, we have a side length of the map of more than 10 million meters - or 10.000 km, thus an area of more than 100 billion km² (100 Milliarden auf deutsch)? That's insane. Crazy - great! But there's only this one map, right?

3. If there is only this one large map, how are we gonna find back to our "home town", after scrolling in some direction? And how is the user going to get an overview of the whole map? To know, where he wants to plan his new railway tracks or airport? I'm guessing the distance between two airports will be kind of the same as in reality.

Edit:
I would think it's 128 squares in width that are shown? So 640m. That's much better, still - for a long runway, barely a fifth.

_________________
[REL] German n-Coaches
[REL] German n-Coaches "Silberlinge"
[REL] German Class 618 'Lirex' HQ REALLY GOOD!
[REL] Rhinegold coaches


Top
   
 Post subject: Re: Graphics
PostPosted: Sun Mar 02, 2014 10:11 pm 
Offline
Chairman
Chairman
User avatar

Joined: Mon Oct 19, 2009 1:29 pm
Posts: 858
Location: Germany
LocoMH wrote:
1. If the highest zoom level (the farthest out) covers an area of roughly 80*60 (I could be quite off on this value *Edit) squares and a runway has a length of 3.000m at 5m/square -> 600 squares length of a runway, so we see just about more than 10% on the highest zoom level - it seems a bit tough to keep track of your airport that way.

On my screen resolution 1680x1050, playing P1SIM in fullscreen mode, max zoom ("far"), there are 210 horizontal tiles visible. And the runways wont be 3.000m long in P1SIM. Probably 1.500m or less. Thus you will be able to see more than half of the runway or even the complete one. Depending on your screen resolution and the final decision about runway length.
Attachment:
fullscreen_zoom_far.png [469.47 KiB]
Downloaded 4 times

LocoMH wrote:
2. Integer.MAX_VALUE = 2 million something in java, right? That means, we have a side length of the map of more than 10 million meters - or 10.000 km, thus an area of more than 100 billion km² (100 Milliarden auf deutsch)? That's insane. Crazy - great! But there's only this one map, right?

Max integer value is 2.147.483.647 Thus the randomly generated map (you get a new map when starting a new game; except you decide to manually set the map seed) has a size of 4.611.686.014.132.420.609 tiles.

LocoMH wrote:
3. If there is only this one large map, how are we gonna find back to our "home town", after scrolling in some direction?

Select a train, a city or any object in one the many overview lists and the map view will jump to that object.

LocoMH wrote:
And how is the user going to get an overview of the whole map? To know, where he wants to plan his new railway tracks or airport? I'm guessing the distance between two airports will be kind of the same as in reality.

There is a minimap. And Im planning to implement a zoomable minimap, so that you can even zoom out the minimap.
Attachment:
minimap.png [379.23 KiB]
Downloaded 4 times


Attachments:
minimap_16x_zoom.png [526.82 KiB]
Downloaded 4 times

_________________
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
Top
   
 Post subject: Re: Graphics
PostPosted: Sun Mar 02, 2014 10:45 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Wed Mar 18, 2009 1:58 pm
Posts: 142
wow that's good questions i love it the mini map - i will look forward to be in Alpha


Top
   
 Post subject: Re: Graphics
PostPosted: Mon Mar 03, 2014 12:40 am 
Offline
Engineer
Engineer
User avatar

Joined: Fri Aug 16, 2013 12:44 am
Posts: 102
smallfly wrote:
There is a minimap. And Im planning to implement a zoomable minimap, so that you can even zoom out the minimap.


If in the full game screen, you can zoom in and out, and in the mini-map you can zoom in and out, why have a mini-map at all? I looks like being able to zoom out further would solve the problem.

In Trainz 2012 (a 3-D simulator) when you zoom out super far, the screen fades into the map. I don't know if this is possible in a 2-D game, but it would be cool if, after zooming out past zoom level "far", the screen automatically became the mini-map.

_________________
... but what do I know? I play with trains.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 42 posts ]  Go to page 1 2 3 Next

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-2018 phpBB Limited

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