[Request] SteamOS support for Tourqe 2D
by Benjamin Stanley · in Torque 2D Beginner · 12/11/2013 (9:33 pm) · 26 replies
Hey everyone!
IF you have not heard Steam OS is being released this Friday the 13th 2013, So we will finally have a spec for the SteamOS platform as well as a Working OS! :)
Also - if possible can we get support for the Steam Operating System providing that it is a viable platform?
I am currently working on a title for SteamOS and later Android devices. This would be a great help to me and I assume others. :)
- Ben
IF you have not heard Steam OS is being released this Friday the 13th 2013, So we will finally have a spec for the SteamOS platform as well as a Working OS! :)
Also - if possible can we get support for the Steam Operating System providing that it is a viable platform?
I am currently working on a title for SteamOS and later Android devices. This would be a great help to me and I assume others. :)
- Ben
About the author
My name is Benjamin Stanley. I am a Procedural World enthusiast, 3D artist, and Generally Awesome Guy. I have worked on various projects and Modifications in the past and I am currently looking at making a Free Game with Torque 3D or Torque 2D.
#2
12/12/2013 (5:14 am)
Since T2D is an OpenGL engine, a Linux port would probably be a bit easier than the work that is or was needed for T3D. Perhaps some smart person out there with a bit of free time could look at the platform code that Luis Anton Rebollo used for his T3D Linux port and figure out how to bring that to T2D.
#3
12/12/2013 (8:28 am)
I posted about raising money to port T2D to linux for the upcoming steam OS but there wasnt much response at all.
#4
12/12/2013 (11:08 am)
@Tim - I did not see that... I know that I would pay for something like that. :)
#5
http://steamcommunity.com/groups/steamuniverse/discussions/1/648814395787298909/
12/13/2013 (8:06 pm)
Steam OS Just launched a few hours ago. Here you go.http://steamcommunity.com/groups/steamuniverse/discussions/1/648814395787298909/
#6
I haven't managed to test the existing platform code that is there (not sure what the state of it is, maybe from TGE days?)
12/15/2013 (2:17 pm)
Built up a makefile to try and build torque2d. One of the biggest problems I see is that includes are not case sensitive. Box2D is referred to as 'Box2D/..', 'box2d/..', and other variations, which makes things frustrating. Do mac builds not suffer from the same problems or does it just depend on the filesystem there?I haven't managed to test the existing platform code that is there (not sure what the state of it is, maybe from TGE days?)
#7
12/15/2013 (5:33 pm)
Eclipse complained about case sensitivity when I was setting up on mint linux to compile for android. I fixed it in my fork: https://github.com/practicing01/Torque2D/tree/development
#8
12/15/2013 (9:34 pm)
Well I spent a few hours cleaning stuff up for linux since I wasn't sure if there was already anyone doing so. Added makefiles for Torque2D and the libs, all objects are building now in gcc 4.8. Now to wade through the missing symbols and fix the various problems associated with openal. The x86UNIX code is as ugly as I remembered it to be :)
#9
12/16/2013 (10:27 am)
@Frogger - I am not aware of anyone else actively working on Linux stuff for T2D so your efforts aren't going to waste and are appreciated. Once things are running without any major issues, we can talk about getting this in the development branch for community testing - similar to the Android port.
#10
12/16/2013 (10:58 pm)
Thanks. Got it to build fully, tracked down a few segfaults, starts up, but then dies in the texture manager. Looks like there's also problems with how relative paths on script execs are handled. Might be a while before things get stabilized :)
#11
But thankfully a (very unexciting) screenshot can exist now!

Also enjoy the slightly hilarious console output below! :P
so suffice it to say, I need to spend some more time figuring out why the path handling isn't correct.
12/29/2013 (6:20 pm)
Hm, so the TextureManager error is because canvas.cs wasn't being loaded, so a window wasn't being initialized, which caused gl calls like glGenTextures to not work since a context didn't exist :-/But thankfully a (very unexciting) screenshot can exist now!

Also enjoy the slightly hilarious console output below! :P
Processor Init: Intel Pentium III, 0 Mhz FPU detected MMX detected SSE detected Math Init: Installing Standard C extensions Installing Assembly extensions Installing FPU extensions Installing MMX extensions Installing SSE extensions InitSDL called Input Init: WARNING: Application is using X11_KeyToUnicode(). This is not an official SDL function, please report this as a bug. No joysticks found. Input initialized Video Init: -------------------------------------------------------------------------------- Video initialization: OpenGL display device detected. Console trace is off. Adding path expando of 'AppCore' as '/home/home/torque/Torque2D/modules/AppCore/1'. Missing file: /scripts/constants.cs! Missing file: /scripts/defaultPreferences.cs! Missing file: /scripts/openal.cs! Platform::initWindow called InitOpenGL called Activating the OpenGL display device... Setting screen mode to 800x600x32 (w)... OpenGL Attributes: DoubleBuffer: 1 BufferSize: 32, DepthSize: 24, StencilSize: 0 Red: 8, Green: 8, Blue: 8, Alpha: 0 Accum Red: 16, Green: 16, Blue: 16, Alpha: 16 OpenGL driver information: Vendor: NVIDIA Corporation Renderer: GeForce GTX 260/PCIe/SSE2 Version: 3.3.0 NVIDIA 319.60 OpenGL Init: Enabled Extensions ARB_multitexture (Max Texture Units: 4) EXT_blend_color EXT_blend_minmax EXT_compiled_vertex_array EXT_texture_env_combine EXT_packed_pixels EXT_fog_coord ARB_texture_compression EXT_texture_compression_s3tc (ARB|EXT)_texture_env_add EXT_texture_filter_anisotropic (Max anisotropy: 16.000000) OpenGL Init: Disabled Extensions EXT_paletted_texture NV_vertex_array_range 3DFX_texture_compression_FXT1 WGL_EXT_swap_control Max Texture Size reported as: 8192 Selected resolution not available: 320 320 32 modules/AppCore/1/main.cs (177): Unable to find function initializeOpenAL Adding path expando of 'ToyAssets' as '/home/home/torque/Torque2D/modules/ToyAssets/1'. Adding path expando of 'Sandbox' as '/home/home/torque/Torque2D/modules/Sandbox/1'. Missing file: /scripts/sandboxPreferences.cs! Missing file: /scripts/console.cs! Missing file: /scripts/toolbox.cs! Missing file: /scripts/customToolboxGui.cs! Missing file: /scripts/manipulation.cs! Missing file: /scripts/scene.cs! Missing file: /scripts/toys.cs! Missing file: /gui/guiProfiles.cs! modules/Sandbox/1/main.cs (40): Unable to find function CreateSandboxWindow Can't open file: /gui/ConsoleDialog.gui.taml File IO error: No such file or directory Taml::read() - Could not open filename '/gui/ConsoleDialog.gui.taml' for read. TamlRead() - Could not read object from file './gui/ConsoleDialog.gui.taml'. Set::add: Object "" doesn't exist Can't open file: /gui/ToolboxDialog.gui.taml File IO error: No such file or directory Taml::read() - Could not open filename '/gui/ToolboxDialog.gui.taml' for read. TamlRead() - Could not read object from file './gui/ToolboxDialog.gui.taml'. Set::add: Object "" doesn't exist Can't open file: /gui/MainOverlay.gui.taml File IO error: No such file or directory Taml::read() - Could not open filename '/gui/MainOverlay.gui.taml' for read. TamlRead() - Could not read object from file './gui/MainOverlay.gui.taml'. Set::add: Object "" doesn't exist modules/Sandbox/1/main.cs (53): Unable to find function scanForToys modules/Sandbox/1/main.cs (56): Unable to find function initializeToolbox modules/Sandbox/1/main.cs (59): Unable to find object: '' attempting to call function 'initialize' GL Err: 1
so suffice it to say, I need to spend some more time figuring out why the path handling isn't correct.
#12
Using the example above when doing
exec('./scripts/constants.cs');
Getting the full path to the script that is currently being executed works correctly (CodeBlock::getCurrentCodeBlockFullPath).
However, once we use dSprintf to combine:
pathBuffer = "/home/home/torque/Torque2D/modules/AppCore/1"
and
pSrc = "/scripts/constants.cs"
the result is incorrect, pathBuffer = "//scripts/constants.cs"
Replacing the call with sprintf ends up with the correct script path, "/home/home/torque/Torque2D/modules/AppCore/1/scripts/constants.cs"
Anyone have an idea why this might be happening? Replacing the call with snprintf also had the same trouble.
After replacing, things seem to be working very well!
12/29/2013 (7:36 pm)
Hmm. So I'm not an expert, but there seems to be something wrong with the way that the path string is formatted in Con::expandPath.Using the example above when doing
exec('./scripts/constants.cs');
Getting the full path to the script that is currently being executed works correctly (CodeBlock::getCurrentCodeBlockFullPath).
However, once we use dSprintf to combine:
pathBuffer = "/home/home/torque/Torque2D/modules/AppCore/1"
and
pSrc = "/scripts/constants.cs"
the result is incorrect, pathBuffer = "//scripts/constants.cs"
Replacing the call with sprintf ends up with the correct script path, "/home/home/torque/Torque2D/modules/AppCore/1/scripts/constants.cs"
Anyone have an idea why this might be happening? Replacing the call with snprintf also had the same trouble.
After replacing, things seem to be working very well!
#13
12/30/2013 (4:10 am)
Good news for T2D users :D
#14
12/30/2013 (4:47 am)
WHOOAA! This is just as exciting as the android port. Oh frabjous day, callooh callay!
#15
What I did was change the folder to 'Box2D'. However, I'm unsure how that will affect other ways of building T2D, such as for android and mac. I suppose the project files/makefiles for those can be corrected with the proper case, but I don't have a way of testing that it will work in XCode after the changes are made again, and I was trying to keep the changes linux-specific.
It's interesting that Box2D isn't built separately from T2D proper and put in the libs folder like the other libraries that T2D uses (unless there's some T2D-specific changes that I'm not aware of?), but I guess it's not too important.
12/30/2013 (6:13 pm)
Hmm, so looking at the way Box2D was included, the folder is named 'box2d' rather than 'Box2D', which is what the library expects, as well as a number of includes in T2D.What I did was change the folder to 'Box2D'. However, I'm unsure how that will affect other ways of building T2D, such as for android and mac. I suppose the project files/makefiles for those can be corrected with the proper case, but I don't have a way of testing that it will work in XCode after the changes are made again, and I was trying to keep the changes linux-specific.
It's interesting that Box2D isn't built separately from T2D proper and put in the libs folder like the other libraries that T2D uses (unless there's some T2D-specific changes that I'm not aware of?), but I guess it's not too important.
#16
12/31/2013 (5:53 am)
yeah should just be a name change and should be committed to repo IMO.
#17
12/31/2013 (3:57 pm)
i dont know if its been fixed, but 64bit ubuntu had issues with torque because of sdl 1.3. The issue was compiling a 32bit binary on 64bit ubuntu. There was an ubuntu package bug preventing installing the 32bit SDL 1.3 libraries. Might also be a good idea to upgrade torque's SDL code to 2.0.
#18
SDL 2.0 is certainly something that I'd like to get going. The unix platform code is quite a big mess at the moment, so we'll have to see how it goes.
The only bug that I've run into is adjusting the soldier count on the deathball toy, "Namespace:unlinkClass - reference count to parent is less than 0".
OpenAL seems to be initialized correctly, but I haven't tried checking to make sure that audio actually works yet.
Just as a quick test, the codebase seems to compile and run just fine using clang as well :D
12/31/2013 (4:30 pm)
Yeah, my desktop is a 64 bit install, so I use schroot as a nice build environment so that a 32 bit binary can be generated. Might be overkill since like you said it *should* be possible to do multiarch builds.SDL 2.0 is certainly something that I'd like to get going. The unix platform code is quite a big mess at the moment, so we'll have to see how it goes.
The only bug that I've run into is adjusting the soldier count on the deathball toy, "Namespace:unlinkClass - reference count to parent is less than 0".
OpenAL seems to be initialized correctly, but I haven't tried checking to make sure that audio actually works yet.
Just as a quick test, the codebase seems to compile and run just fine using clang as well :D
#19
12/31/2013 (7:53 pm)
Do you have the latest development branch? I fixed that unlinkClass error (or at least i think that was the one i fixed)
#20
01/01/2014 (1:05 pm)
Yeah, latest dev commit here (from Oct 31), and I do see the unlinkClass commit as well.
Torque Owner Lukas Joergensen
WinterLeaf Entertainment
Afaik T2D doesn't support Linux so I recommend you port it to Linux first, then do the specific port to SteamOS.
T2D shouldn't be far away from supporting Linux tho AFAIK. Try compiling it in a linux distro and see what issues arise.