TechDemo 0.0.1 (Linux and W32 users! )

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

Moderator: Transport Empire Moderators

oliver
Engineer
Engineer
Posts: 57
Joined: 17 Apr 2003 20:32

TechDemo 0.0.1 (Linux and W32 users! )

Post by oliver »

Hi guys,

now this isn't conciderd to be TE code, however, this _is_ supposed to demonstrate how to easly incooperate SDL OpenGL and OpenAL.

It's just a little demo I copy pasted wrote while playing with the various libraries out there.

I tryed to use the examples of the OpenGL Red Book as these are the clearest and ported them to use SDL instead of GLUT. Then OpenAL was added using the panning2d demo from OpenAL.

Again this only demonstrates the incoropration of various libs to be used maybe as a base, nothing more nothing less. Just to let you guys know that gears are grinding : )

(The OpenAL libs should have been installed with your sound card accelerated drivers. I understand however that a lot of people might not have these. So here's the URL to Creative's version. nVidia has one too but it apears to be the same .exe anyhow. OpenAL
The SDL .zip file is at libsdl.org The sdl.dll should be copyed into the windows system folder or just put it right next to the binary.
Gentoo users just emerge sdl and openal : )

So to summirze what you need to run this bin in windows:
TechDemo.exe (included)
data/boom.wav
sdl.dll
openal32.dll
alut.dll
opengl32.dll
glu32.dll

You should have all of these right next to the binary or in the system folder.

For those who wanna look at the code and maybe even compile it yourself, the devcpp project file is included. Upgrade to the latest version (4.9.8.10) and use the integrated package update manager to install SDL, OpenGL and OpenAL to get all the libs integrated into the src. (runtime .dll's are then also in the dev-cpp\lib\*.dll dir so no need to install all the libs using the above mentioned installers.



That'll be all for today.
Attachments
TechDemo_0.0.1.tar.gz
(27.78 KiB) Downloaded 279 times
Last edited by oliver on 20 Jul 2004 02:25, edited 3 times in total.
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

Lots of reference to "this", but I can't see a "this" anywhere. Perhaps someone forgot to attach something ;)
User avatar
Arathorn
Tycoon
Tycoon
Posts: 6937
Joined: 30 Nov 2002 17:10

Post by Arathorn »

I think so too, but it's very encouraging to see that there is "something" in this project. ;)
oliver
Engineer
Engineer
Posts: 57
Joined: 17 Apr 2003 20:32

Post by oliver »

god damned.

I attached and later edited the post, obviously the attachment then went missing, I re-attach.
Last edited by oliver on 18 Jul 2004 16:16, edited 1 time in total.
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

I still don't see it. You have to hit the "Add attachment" at the bottom before you post
Bugzilla available for use - PM for details.
oliver
Engineer
Engineer
Posts: 57
Joined: 17 Apr 2003 20:32

Post by oliver »

ChrisCF wrote:I still don't see it. You have to hit the "Add attachment" at the bottom before you post
I figured it out : )

it was tar.bz2 which isnt' allowed?! and it doesn't warn you about an illegal extension.
It's there now.

P.S.
Installing my VMWare on this machine so I can make the w32 port work with mingw aswell.
Hellfire
Transport Empire Developer
Transport Empire Developer
Posts: 699
Joined: 03 Feb 2003 09:30
Location: Back at the office

Post by Hellfire »

I am testing the program right now on my Radeon 9600 powered laptop. It looks nice, and it doesn't seem to use much cpu power (current cpu usage: 0.3%)

And the very futuristic sound effect on the left and the right speaker when you click the mouse :D is really... umm... is "spiffy" a good word?

I haven't looked at the code yet though... :oops:

But I wonder, why haven't you used the audio library included with SDL?
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...
oliver
Engineer
Engineer
Posts: 57
Joined: 17 Apr 2003 20:32

Post by oliver »

Hellfire wrote:I am testing the program right now on my Radeon 9600 powered laptop. It looks nice, and it doesn't seem to use much cpu power (current cpu usage: 0.3%)

And the very futuristic sound effect on the left and the right speaker when you click the mouse :D is really... umm... is "spiffy" a good word?

I haven't looked at the code yet though... :oops:

But I wonder, why haven't you used the audio library included with SDL?
cos it was too much work, do all sorts of fancy mixing stuffs, and then ... why? I mean we are making a 3D game, so it kinda does need 3D sound effects.
OpenAL is to audio what OpenGL is to video. I know this wasn't 'discussed' before but We can do that in our next meeting : )

It _IS_ a cross platform library and it _IS_ used throughout quite some titles like Unreal, Unreal 2k3, Unreal 2k4, Harry Potter game, America's army etc etc. http://www.openal.org/titles.html has a bit longer list of titles, but I'm sure there plenty more.
It is supported by nVidia aswell as Creative labs.
Hellfire
Transport Empire Developer
Transport Empire Developer
Posts: 699
Joined: 03 Feb 2003 09:30
Location: Back at the office

Post by Hellfire »

Don't worry, I have no objections ;)

I was just wondering why you used another library :D
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
charlieg
Transport Coordinator
Transport Coordinator
Posts: 323
Joined: 08 Oct 2003 14:07
Contact:

Post by charlieg »

:D
Open source tycoon games
--
Free Gamer - open source and Free Software games
FreeGameDev forums - open source game development community
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

As a guide, posts consisting of nothing but a smiley are considered spam. ...
Hellfire
Transport Empire Developer
Transport Empire Developer
Posts: 699
Joined: 03 Feb 2003 09:30
Location: Back at the office

Post by Hellfire »

Come on, Chris... Let it go ;)
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...
oliver
Engineer
Engineer
Posts: 57
Joined: 17 Apr 2003 20:32

Post by oliver »

I updated the attachment instead of creating a new one to keep the first post nice, clean and updated.

I tested it here in my VMWare and everything seemed O.K.

I don't really like the way w32 deals with openAL but i think that we might init al this 'manual' way ourselfs anyhow because that would mean we could skip the entire alut lib out (Use SDL for file loading etc which is nicer and more platform independed) and keep everything more equal that way. Also I belive that SDL should init OpenAL anyhow, maybe in SDL2 will take care of that ...

(The reason that would make sense is glut was replaced by SDL so alut should be replaced by SDL aswell, keeps everything nice and orderly AND possibly faster with less dependancies)
User avatar
charlieg
Transport Coordinator
Transport Coordinator
Posts: 323
Joined: 08 Oct 2003 14:07
Contact:

Post by charlieg »

ChrisCF wrote:As a guide, posts consisting of nothing but a smiley are considered spam. ...
I hear ya. Tho' this was an exceptional circumstance. I'm sure you, of all people, can appreciate that. ;)
Open source tycoon games
--
Free Gamer - open source and Free Software games
FreeGameDev forums - open source game development community
User avatar
charlieg
Transport Coordinator
Transport Coordinator
Posts: 323
Joined: 08 Oct 2003 14:07
Contact:

Post by charlieg »

oliver wrote:I updated the attachment instead of creating a new one to keep the first post nice, clean and updated.
The version number seems to be the same.

As a rule of thumb, if there is any code difference the version number should change. Even if it's just to add an extra letter or number to show how minor the change is. (e.g. 0.0.1a or something similar.) Otherwise, there's lots of potential for confusion. Obviously this isn't really important just now and there's little to be confused about, but good habits etc etc.

Of course, if there is no code difference between the update and the previous upload then just ignore this post. :roll:
Open source tycoon games
--
Free Gamer - open source and Free Software games
FreeGameDev forums - open source game development community
oliver
Engineer
Engineer
Posts: 57
Joined: 17 Apr 2003 20:32

Post by oliver »

charlieg wrote:
oliver wrote:I updated the attachment instead of creating a new one to keep the first post nice, clean and updated.
The version number seems to be the same.

As a rule of thumb, if there is any code difference the version number should change. Even if it's just to add an extra letter or number to show how minor the change is. (e.g. 0.0.1a or something similar.) Otherwise, there's lots of potential for confusion. Obviously this isn't really important just now and there's little to be confused about, but good habits etc etc.

Of course, if there is no code difference between the update and the previous upload then just ignore this post. :roll:
There is no code difference, a makefile for windows was added, that be all : )

So people who donwloaded it before, and used it in linux, will have 100% identical binaries. I did this purposly and not change the version number for that specific reason.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

After I Installed OpenAL, I could sucessfuly compile your demo. However when I ran

Code: Select all

$ ./TechDemo
I got the following output, and then the application terminated with no delay.

Code: Select all

Initializing SDL.
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Video mode set failed: Couldn't find matching GLX visual
Probably I have done something wrong, or not done somthing that I shuld do. I have checked with my own aplications that SDL work, so that cant be the problem. A problem can be that trident microsystems not toshiba provides any linux drivers for my graphics card, which have low support for 3D.

I hope I distrube the maby ongoing discussion in this thread. (have been away for 3 weeks)
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 »

Try running glxinfo. Find a line that says "Direct rendering:"

If it says "no", (and I think it will) then you don't have the openGL extensions installed in your X-server.

Try finding a line in your xf86config file that says #Loadmodule "GLX" and remove the #.

Restart the X-server and try again :)
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
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

Thanks Hellfire. With your advice it worked fine. :D
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
oliver
Engineer
Engineer
Posts: 57
Joined: 17 Apr 2003 20:32

Post by oliver »

wether glxinfo says yes or no shouldn't matter I think. Direct or indirect rendering only indicates wether the actual hardware is going to be used for accelerated rendering. However you do need the GLX (openGL eXtensions) for you X server to be able to use _any_ form of openGL (hard or software based)

however as always, I could be wrong : )
Locked

Return to “Transport Empire Development Archive”

Who is online

Users browsing this forum: No registered users and 2 guests