new developer - offering graphical engine

Archived discussions related to Transport Empire. Read-only access only.

Moderator: Transport Empire Moderators

Monti
Engineer
Engineer
Posts: 26
Joined: 06 Feb 2005 12:49
Location: Dresden

new developer - offering graphical engine

Post by Monti »

Hello,

I'm following the transport engine since six month and I started to create a graphical demo.

Next week I will present you a fully operational graphicsdemo containing the following features:

- full sprite engine (16 & 32 bit engine)
  • pluggable rendering engines (eg. 3D-support), three demo engines
    (only ca. 1000 code lines required for a new engine)
  • alpha and indexed colors
  • animation of forest, water & waves
  • support of buildings (trains is partial covered by a house or tree)
  • subpixel scrolling (if needed)
  • optional background rendering for better response & scrolling
- ground representation (height, type), nearly no size limit (swaps to disk)

- abstraction layer for
  • things (eg. the business logic of a train or a factory)
  • visual objects (a whole train or the picture of a factory)
  • sprites (a waggon or a locomotive)
  • images (to separate the image formats from the gfx engine)
- runnable in linux & windows, maybe mac-os

- tools library
  • Abstraction layer for large objects (blobs - eg. landscape data)
  • Guidelines for exceptions and logging
  • Io-Tools (caching, swapping to disk, temporary files)
  • efficient Collections and sorting routines
- example world:
  • two whales swimming in the water
  • four trains driving through the wood (without tracks currently, but behind trees)
  • moving clouds
  • Woods, rivers and mountains
  • animated wood and waves
  • terrible graphics, because I'm not a good designer
- example world generator
  • very slow, but it can be easily exchanged with a better one
- in progress:
  • a tools for the translation of texts (with nearly no effort for the programmers)
but:
- needs still some optimization
  • less memory
  • faster rendering engine on slower computer
  • should be able without changing the abstraction layer
    gfx engine and the rest of the game may be programmed concurrently
- is currently using a square represantation, but can be changed

The licence is currently not ready, but it will allow the unlimited use in any GPL or open source
programs. Parts of the demo are used in a company, so I'm only allowed to make the
code free for all open source with some extra conditions - maybe like the netscape licence
- any problems?

Please, can anybody enable my login for the developer forum?

best regards & hoping for any positive response...

Monti McMannus
Attachments
A real screenshot from the demo. The real demo is following next week.
A real screenshot from the demo. The real demo is following next week.
bs1.jpg (182.45 KiB) Viewed 7263 times
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

Well, this was not what I exepted to see when I checked out the forum today after some programing. :D

Some questions...
  • Why do you release the engine?
  • Do you see this as an library that we might use, or something that will become a part of the code base?
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Paranoid Android
Tycoon
Tycoon
Posts: 2002
Joined: 15 Jun 2002 12:27
Location: lo:kay:shun - The site and/or situation of a settlement
Contact:

Post by Paranoid Android »

That looks really good.
r is a c***


will frequently check credit at (moral) bank (hole in wall)
RIP THE BETA BAND 1997-2004
Transport Empire's music-er.


So now I've closed my eyes, closing seconds of our time

My music
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

This certainly looks very nice but I have a question, Monti. Does the company who also uses this engine know you are offering this engine and what kind of a relation do you have to them? Did they sign a contract to use your engine (under GPL or whatever) or are you an employee?
Monti
Engineer
Engineer
Posts: 26
Joined: 06 Feb 2005 12:49
Location: Dresden

Post by Monti »

@zuu:
Most of the engine i wrote for transport empire. Its designed as a library so it may be used also in other projects. I will set the source code under a free licence (gpl or netscape-like), so anybody can use it for free projects, including TE. Personally I hope TE will get a complete open source projects without any closed source.

I think the code of the library will be developed together with (and maybe only for) TE. But it should be ok, if the engine code is still seperated. Its a question of good software design to split a programm into several layers when it is possible.

@tombe: thx :D

@Hyronymus: I'm system designer in a company and developing several frameworks (tools, web framework, database framework, translation framework), which belongs partly to me. This engine itself isn't developed for the company, but it use some code from the tools library and other code fragments which will boost the development a little. I'm the owner of a copy of the code, but I will convince my management to make the tools and frameworks completely free (like the gecko engine from netscape).
  • If this is possible, I can take some new code related to this engine from my daily work into this project, but I have to give the promise, that developed code related to the engine/tools/frameworks (not the whole TE - this should be protected by GPL eg) may be used by my company.
  • If this is not possible, I'm not allowed to use new developed company code into this project, but the code in this gfx engine or tools engines can't be used by the company. So TE & my company develop a little bit slower.
This is also another reason to part the engine from the TE. But only little reason.
No - I will not name the company.
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

I was just interested because of the probably well-known issue with 3DTT. I would hate to end up fighting over licenses, who created or owns what and under what license it should've been distributed.
User avatar
PJayTycy
Route Supervisor
Route Supervisor
Posts: 429
Joined: 09 Mar 2004 20:30

Re: new developer - offering graphical engine

Post by PJayTycy »

Monti wrote:I'm following the transport engine since six month and I started to create a graphical demo.

While your work is certainly nice, I don't really understand why you didn't come out earlier? You sure impress me with what you've done, but your work does raise some questions too.

Yesterday we had a quite important meeting about the basics of the game features, why do you present / give us this engine the day after it? To me it feels like most of our discussions for the past few months are by-passed by this prototype.

Well, most of my questions come down to one thing : how much did you care for what we were discussing and how much did you care for your own ideas? Is your engine abstract enough so everything we discussed and/or agreed on might be possible ?
User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2178
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Post by uzurpator »

full sprite engine
Thus useless...
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

Merely stating it's 'thus useless' is useless too. Maybe you can tell Monti why you think it's useless, uzurpator.
User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2178
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Post by uzurpator »

Didn't we settle for full 3d? That is 3d trains, 3d buildings, 3d trees... Sprites are nowhere near our needs.
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

Hello Monti

Thanks for shareing.
To make one point clear, I am not (currently) involved in the TE Dev..

I have some questions because I have my own design that I want to implement:

First, how fast is the internal framework? I mean without rendering,
you have to manage A LOT of objects...

Second question, if you use a Mozilla/Netscape like license,I can use it as framework for my closed source project aswell. For me it isn't a problem to use lgpl library and if I do improvements on the lib, shareing with the community is welcome, so it would be nice to know what license will you use.
I try to archive a true separation of game logic & output device/logic and want to have different output systems possible...

To the swap to disk feature with huge maps:

It's not a good idea to swap the map to the disk. You need the map data always for town and maybe industries aka the economic model. When you allow to have several views like in TTD the HDD wouldn't be fast enough to keep track of a running engine. (only my two cents on this point)


PS: I don't like graphic programming, I do like to make the internal logic :)
(http://www.inter-ee.net/allvb/winrt2/winrt2octree.png my slow octree test, which failed)
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
Monti
Engineer
Engineer
Posts: 26
Joined: 06 Feb 2005 12:49
Location: Dresden

Post by Monti »

@PJayTycy:
You are right, I should have spend more time following the community process to follow all requirements. But I'm convinced its abstract enough to meet most of the requirements, but I will make an analysis, which reqs are met, which can be achieved (the source code will be free and can be changed completely for TE) and which can't be met with this engine.
Problem is, I started programming some months ago and really bypassed some of the discussion.

Otherwise I want to speed up the developement a little bit so its possible to present a game in the next two/three years. Additional in heavy discussed projects the requirements seems to grow and grow and at some point it will be a very huge effort in development to achive all the goal.

The one thing my engine can't fullfill is a 3D world. The engine may use a 3D engine for faster rendering but the definition of the trains, landscape is currently image orientated. On the otherside I personally found it more difficult to create a good 3D-Model which looks good in a 40*40 pixel than a good drawn flat image.

@eis_os:
First: to achive a good speed, the things are seperated into two layer:
- things
- visual objects

Things handle the businesslogic: A train departs, looks for a route, drives the route, takes goods and so on. All of them have to be in memory.
Each thing may have on or more visual objects. The "things" itself may be changed totally. I've implemented them only for the demo.

Visual objects are responsible for the image incarnation of a thing: If a train is miles away from the screen, the visual object may not create any sprite information to draw. So its possible to have thousands of trains, and only the fifty currently visible trains create each 40 waggon sprites, 1-2 locs, some dust and so on.

I hope this is like your separation of logic & output. And maybe we can provide a 3D and a 2D output, and an XML for external computer players.


If the map is larger than 4000*4000 tiles, it has to swapped to disk. If each
tile has a height, a type, tree information, maybe an owner, you will need a memory requirement of 4*4*4000*4000bytes=256MB. Only for the map, without town and building.
Better is if the tracks have an abstract route graph and a very rough height model for plane routes for a faster route finding and less memory. Towns should also be an abstract "thing" and change the environment only from time to time.
Currently its realized by parting the tiles into groundtiles of 128*128 and loading only some of them into the memory.
Eg. every shown ground tile and the ground tile for the city which is currently building new houses.
But you may switch it off.

How long may it take to develope a 3D-engine (or use a free) with a good abstraction layer and a fast output?
User avatar
PJayTycy
Route Supervisor
Route Supervisor
Posts: 429
Joined: 09 Mar 2004 20:30

Post by PJayTycy »

Monti wrote:I'm convinced its abstract enough to meet most of the requirements, but I will make an analysis, which reqs are met, which can be achieved
...
The one thing my engine can't fullfill is a 3D world. The engine may use a 3D engine for faster rendering but the definition of the trains, landscape is currently image orientated.
A freeform system of tracks like in the 360° prototype will never work in a sprite oriented system. You mentionned pluggable 3D engines, would it be possible to have the moving objects (trains, cars, ships, planes, ...) in 3D ? I know some turn based strategy games use sprites for their buildings + landscape and 3D for the units.
Monti wrote:On the otherside I personally found it more difficult to create a good 3D-Model which looks good in a 40*40 pixel than a good drawn flat image.
That's true, in most cases 3D uses more resources and is uglier than sprites. But, 3D opens up more functionallity (especially concerning tracks, bridges, tunnels, ...).
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

Well, it's a question on how much sprites you want to create. Locomotion already give you more possible ways for rail curves then TTD.

Monti:
My design should nerver really depend on a certain output device / system
winrt2design.png is the component design.

Well the game logic hasn't really todo something with the engine as you see.
So under linux you could have xwinrt as slim client attaching to a game process :wink: Currently I see some limits and bugs in my design, like reducing the overall data send to the output client. But it would mean you you can even write text clients :P

Sorting out non visible stuff needs time aswell, thats why I tried octrees to reduce the calc count... It's more work to cull thousand independent objects then a fps player 3dmodell with thousand triangles...
(in my design this would be in the gamelogic to only give as much info as needed to the client when requesting a view)

A map object can have a attached route (aka vector to next node with status), so the path is calculated from map object nodes to map object nodes.

Well and you can say like a fps a room not seen doesn't need to do stuff,
a town need to produce things, take things, development, well you wouldn't do it every frame, but say every 200.
There a serveral ways to do it...

Ohh, how long I can't say because I never have written such software.
And I find most open source 3d engines to much fps centered. While they can cull mesh perfect, try to add 1024x1024 objects to it.
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
Monti
Engineer
Engineer
Posts: 26
Joined: 06 Feb 2005 12:49
Location: Dresden

Post by Monti »

Ok, its a little bit more than a sprite engine. The world is rendered in another routine and is allowed to paint no-sprites, eg to draw line. So it should be possible to use real round corners, and to provide a 360° track layout.
But the moving objects should be a bitmap sprite for performance reasons. Currently the sprites may be generated dynamically (eg. with a simple 3D-Renderer which turns a waggons by 5°) but this may be slower and should not occure every frame.

In this implementation sorting out saves time. Every "visual object" has a position and a size (may be calculated roughly). The engine itselfs asks
only the visual "visual object" to create a spritelist. But - optimisation can be done later.
Hellfire
Transport Empire Developer
Transport Empire Developer
Posts: 699
Joined: 03 Feb 2003 09:30
Location: Back at the office

Post by Hellfire »

I must admit that I'm a bit reluctant towards your demo. I've been lurking your two topics for a few days now, trying to figure out whether your intentions match your words. Popping up like this, showing a working demo tempts me to discard your work as "Not invented here", which would ofcourse be bad practice from my side.

Please try to see this post as constructive. I've volunteered to convert some of your code to C++ so I can see whether it would fit in the "Transport Empire" picture we've all been creating here for almost a year. Also notice the use of the words "me" and "I" in this post. I don't represent the team in this matter. It's just what I personally think.

Now that that's out of the way, I'd like to invite you to join one of our upcoming meetings. Introduce your self a bit more. Think along with us. If you really want to join the team, then by all means, work with us for a while.
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...
Alltaken
Tycoon
Tycoon
Posts: 1285
Joined: 03 Dec 2003 06:24
Location: Christchurch, New Zealand
Contact:

Post by Alltaken »

why didn't i see this earlier.

your your engine could be pushed towards using the GFX i am creating for 32bp 128pixel wide stuff i would be happy to have it developed.

in the GFX forum is a lot of stuff that i have been creating, ground sprites, trees, roads, have all be completed and could be put into your engine ASAP 9assuming your engine is a 2d engine, which form your firest post i understand it is)

if you are still around that is.

have a good one.

Alltaken
SHADOW-XIII
Tycoon
Tycoon
Posts: 14275
Joined: 09 Jan 2003 08:37

Post by SHADOW-XIII »

HI Monti
that's awesome, you will probably push the game development to next level ... at last :wink:
I wonder about the engine if it will be GPL'ed or not ? if it would ... we could stole ... I mean use OTTD new graphics :lol:
what are you looking at? it's a signature!
User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve »

SHADOW-XIII wrote:HI Monti
that's awesome, you will probably push the game development to next level ... at last :wink:
I wonder about the engine if it will be GPL'ed or not ? if it would ... we could stole ... I mean use OTTD new graphics :lol:
You may wish to check the date of the first posts.

Looks like Monti has gone.
SHADOW-XIII
Tycoon
Tycoon
Posts: 14275
Joined: 09 Jan 2003 08:37

Post by SHADOW-XIII »

dammit, srry :cry:
what are you looking at? it's a signature!
Locked

Return to “Transport Empire Development Archive”

Who is online

Users browsing this forum: No registered users and 1 guest