Engine Progress (uzurpator)

Discussions related to programming Transport Empire.

Moderator: Transport Empire Moderators

User avatar
Purno
Tycoon
Tycoon
Posts: 16663
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno » 25 Mar 2007 16:50

eis_os wrote:I wonder where the other people of the Project are?
Trying to follow the code talk and not understanding much of it, while feeling a bit useless, even though I'm supposed to draw 128x128 textures for doors and such, which is damn huge, and that's why I didn't do it yet.

Crappy sentence, that was.
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: 6939
Joined: 30 Nov 2002 17:10

Post by Arathorn » 25 Mar 2007 16:55

Lol, I read this thread too, but I don't understand any of it. I just like the idea of progress. And Purno, you can put those textures on hold for now, I have to experiment with the ones you've already made, but I don't have time this weekend.

User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2134
Joined: 10 Jan 2003 12:21
Location: Wroclaw, Poland / Katowice, Poland

Post by uzurpator » 27 Mar 2007 09:22

Progress:

The logical flow of the terrain display is 80% ready.

Next:
Make the logical flow threadproof
Tile factory, Material factory
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
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2134
Joined: 10 Jan 2003 12:21
Location: Wroclaw, Poland / Katowice, Poland

Post by uzurpator » 29 Mar 2007 09:37

Terrain renedring pipeline is 70% complete

Now - conceptual work on tile factory
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
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2134
Joined: 10 Jan 2003 12:21
Location: Wroclaw, Poland / Katowice, Poland

Post by uzurpator » 02 Apr 2007 16:53

Progress:

Some framework and researach. I plan to upload my code to some SVN (either sourceforge or the TE SVN from the forums)
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
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2134
Joined: 10 Jan 2003 12:21
Location: Wroclaw, Poland / Katowice, Poland

Post by uzurpator » 11 Apr 2007 06:03

Please excuse lack of updates on progress :) I had... other things to attend to.

Nevertheless - I have fixed some minor bugs and am now working on the scene organisation scheme.
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
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2134
Joined: 10 Jan 2003 12:21
Location: Wroclaw, Poland / Katowice, Poland

Post by uzurpator » 15 Apr 2007 12:54

Light is abit wonky - now getting resolved.

Next: Controls
Attachments
scr1.jpg
(228.7 KiB) Downloaded 130 times
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
Purno
Tycoon
Tycoon
Posts: 16663
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno » 15 Apr 2007 13:22

Looks interesting... :)
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
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2134
Joined: 10 Jan 2003 12:21
Location: Wroclaw, Poland / Katowice, Poland

Post by uzurpator » 16 Apr 2007 06:32

Getting there
Attachments
Image1.jpg
(155.16 KiB) Downloaded 134 times
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
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2134
Joined: 10 Jan 2003 12:21
Location: Wroclaw, Poland / Katowice, Poland

Post by uzurpator » 22 Apr 2007 12:03

most recent source
Attachments
te - source.exe.rar
(123.1 KiB) Downloaded 188 times
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
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2134
Joined: 10 Jan 2003 12:21
Location: Wroclaw, Poland / Katowice, Poland

Post by uzurpator » 05 May 2007 17:43

latest news :)

I work on the gui. Mouse cursor now works, as well as zoom in/out. Moving map with mouse also works, but needs certain tweaks.
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: 13190
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus » 05 May 2007 18:09

Sounds good, surprise us with a screenshot when you think you have something solid :).

User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve » 05 May 2007 20:07

uzurpator wrote:most recent source
Is it still windows only?

User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2134
Joined: 10 Jan 2003 12:21
Location: Wroclaw, Poland / Katowice, Poland

Post by uzurpator » 05 May 2007 20:13

If you get the dependancies right & change the timing functions then it should compile under linux.
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
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve » 08 May 2007 23:06

Is the source going to be SVNed?

Edit: There's no makefile? What do I need to do to make it?

User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2134
Joined: 10 Jan 2003 12:21
Location: Wroclaw, Poland / Katowice, Poland

Post by uzurpator » 09 May 2007 08:49

Build the makefile I persume. I use Visual Studio - so I have .sln.

Ahyhow - The SVN is going to be created as soon as I get internet connection @ home.
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.

neroden
Engineer
Engineer
Posts: 13
Joined: 29 May 2005 10:30

I'm trying to port this to Linux.....

Post by neroden » 19 May 2007 21:37

So, uzurpator, I grabbed your last source code archive and am working on porting it to Linux, which hopefully shouldn't be too hard. Anyone else should feel free to try, though, since my free time is very limited right now.

So far I've hit the following snags:
-- Where's cwrap.h ? Edit: figured out this isn't used
-- Where's ttdvar.h ? Edit: figured out this isn't used
-- In main.c do you mean
#include <time.h>
since you've written
#include "time.h"
After all, time.h is a standard header and you haven't included your
own copy of time.h.... or it is another missing header?

I think I've found all the external dependencies:
-- the standard C++ library
-- BOOST
-- OGRE -- what version are you using?
-- OIS -- what version are you using?

(It will definitely be simpler if I use the same versions you're using)

It looks like I have to write a Linux version of timing.h to replace the Windows-centric version you have? That shouldn't be too hard.

There's probably more portability stuff worth doing, but right now I'm just trying to get it to a level where it builds and can be alpha-tested.
Last edited by neroden on 20 May 2007 03:54, edited 1 time in total.

User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve » 19 May 2007 23:00

Thanks for the work neroden, I too wish to get a Linux version working but wouldn't know where to start. Hopefully a good framework can be set up for all future versions too.

neroden
Engineer
Engineer
Posts: 13
Joined: 29 May 2005 10:30

Some tips for uzu

Post by neroden » 20 May 2007 03:49

First tip: "latitude" has only two of letter "T". It's misspelled "lattitude" throughout the code. I suggest a search-and-replace before it gets any worse. I didn't fix this.


Second tip: the sense of "framelimit" is backwards in main.cpp. I went through and swapped all the values (true/false) so that "framelimit=true" means that there *is* a frame limit.

Third tip: the option handling sucks. I fixed it by putting it in a loop.

A patch to main.cpp for the second and third tips is attached. I also added the copyright notice and license statement.

Update
Fourth problem: unsigned int(foo) does not work as a cast with the gcc compiler (it doesn't parse properly). This is done in several places. Change it to static_cast<unsigned int>(foo) and it will work. I can provide a patch if you like.
[/b]
Attachments
main.cpp.patch
Patch for silly things in main.cpp
(2.43 KiB) Downloaded 155 times

neroden
Engineer
Engineer
Posts: 13
Joined: 29 May 2005 10:30

Ported successfully

Post by neroden » 20 May 2007 22:32

Well, I ported it. And actually got it to run! I see the pretty terrain grid! :-) Good start.

I'm providing it in two forms.

(1) A working source tree, for those who want to test it, *with* the media directory from the binary alpha release. In .tar.gz form, so hopefully any Linux user will know what to do with it. :-)

(2) A big patch, which is hopefully the easiest form for uzu to add my changes into his source tree. This includes the new files README.LINUX, Makefile, and timing_posix.h. It also includes copies of resources.cfg and plugins.cfg, because the 'reasonable defaults' are different on Linux. This *doesn't* include the media directory.

There were a lot of changes necessary. Most of them are because GCC is a lot pickier about syntax than Microsoft C++ (like all those casts). Some are genuine portability (the ifdef WIN32). The changes in main.cpp weren't necessary but I couldn't resist. I also put 'standard' GPL headers on the files which I made significant changes to, just as a matter of 'best practice'.

One other things I noticed:
-- common/gridArray.c and common/themes.c MUST be compiled with C++, NOT with C. I put some hackery in the Makefile to force this, but it would be better to just rename them to have .cpp or .cxx extensions.

The Makefile is real hackwork. I promise I'll do something cleaner and more elegant next time (no promises when 'next time' will be though)
Attachments
te-source-linux.tar.gz
Working source code tree for testing on Linux
(496.2 KiB) Downloaded 157 times
te-source-linux.diff
Diff from uzu's last posted source
(20.82 KiB) Downloaded 160 times

Post Reply

Return to “Transport Empire Coding”

Who is online

Users browsing this forum: No registered users and 2 guests