Game Development Community

Torque 3D Windows X64 build

by Dusan Jocic · in Torque 3D Professional · 11/08/2012 (2:10 pm) · 19 replies

Hi guys, this is my first topic and post here, so maybe I posted this in wrong sub-forum (or how you call it)

So far my work on Torque 3D was successfully building it on Windows x64 (both debug and release) platform after "Mortal Kombat" my way with all of unfriendly code. :)

I am not much familiar with Torque3D engine, and would like that somebody who is more skilled then me point me in right direction in fixing this issue.

My problem with x64 build is breaking on parseArgs(); on main.cs and Visual Studio 20120 is reporting "inline void ExprEvalState::setCurVarNameCreate(StringTableEntry name)" on "if(name[0] == '$')".

I will provide my full log here, both from VS2010.

Visual Studio output while debugging -> http://pastebin.com/Fte4XL2H

Just one note, I don't believe but maybe I am wrong, that I made mistake with changing some other stuff, because same code with building it on x86 (both debug and release) is working fine.

I will send patch after this issue is resolved.

Pictures

img577.imageshack.us/img577/2230/problemwithx64build1.jpg

img6.imageshack.us/img6/8034/problemwithx64build2.jpg

img502.imageshack.us/img502/2742/problemwithx64build3.jpg

img703.imageshack.us/img703/6536/problemwithx64build4.jpg
EDIT: I don't know why my photos are small, all screenshots are taken on 1280x1024 (two monitors), but I can provide them again if needed.

EDIT #2: Uploaded pictures on ImageShack

#1
11/08/2012 (3:37 pm)
Your first image is showing a bad pointer.
const char *evaluate(const char* string, bool echo, const char *filename) // You are using a pointer to filename instead of const char

Looking again at the image, you have your pointers wrong in several places. ( * = pointer)
Same in your second image. The error showing <Bad Ptr> is telling you that you have bad pointers.
Same with your third image.
I can't answer the other error.
#2
11/08/2012 (3:44 pm)
T3D is a 32-bit application, not a 64 bit. Trying to build it in 64 bit will fail because it's not supported.
#3
11/08/2012 (3:49 pm)
My problem is not compiling it on x64 platform. I already fixed that part, and I can provide miniDump build along with compiled stuff if you wish.
#4
11/08/2012 (4:20 pm)
Sorry, I should have worded that differently. I meant the problem is that you built it on x64, which is not supported.
#5
11/08/2012 (4:24 pm)
OK. I understand. Can you at least tell me what is unsupported there so I have bigger picture of what could not working correctly, because for now how I see only reading scripted files is not working how it should (on x86 build is working like a charm).
#6
11/09/2012 (1:11 am)
In several places it is assumed that we're dealing with 32-bit pointers.
#7
11/09/2012 (1:27 am)
There are a few places in the console code in which it assumes pointers are 32bits in size. e.g. when loading strings from the code stream (which IMO is a bit of a code smell to start off with). To fix this you will certainly need to modify the compiler code, or generate some sort of lookup table instead of loading StringTable entries directly from the code stream.
#8
11/09/2012 (12:55 pm)
@James Urquhart
Thank you for your reply. I will post my updated on this topic about my progress on this.
#9
05/31/2013 (3:26 pm)
Sorry because this took so long, I had other work

Quote: T3D is a 32-bit application, not a 64 bit. Trying to build it in 64 bit will fail because it's not supported.

Quote: Sorry, I should have worded that differently. I meant the problem is that you built it on x64, which is not supported.

As I promise that I will post my progress on Torque x64 build.
I finally managed to make Torque3D more x64 OS friendly, as you can see inside provided pictures.

i218.photobucket.com/albums/cc300/Drago85/win64_zps5f166837.jpg

i218.photobucket.com/albums/cc300/Drago85/win64-1_zps53b62285.jpg
On second picture you can clearly see that there isn't anymore (32 bit - arch) in application name.

On provided pictures you can see loaded main menu inside Torque3D, I will update post with more info and screenshots.

I could soon provide x64 build of Torque3D for Linux.
#10
05/31/2013 (4:04 pm)
Id be very interested in the code for the x64 T3D for windows
pyoskowitz@winterleafentertainment.com
#11
06/01/2013 (2:35 pm)
Very nice work, will this be going onto github? :)
#12
06/01/2013 (6:35 pm)
Please submit it to the github. Maybe it could be a part of the main branch for a future release 4.0 or later..
#13
06/02/2013 (7:58 am)
Seeing T3D upgrade to 64bit would be extremely beneficial to the entire community. I'm really interested to see where this goes.
#14
06/02/2013 (4:26 pm)
Another picture of working Win64 build of Torque3D


picture 1
i218.photobucket.com/albums/cc300/Drago85/workingx64build_zpsec30f1a5.jpg

picture 2
i218.photobucket.com/albums/cc300/Drago85/workingx64build-1_zps4d88bf8d.jpg

picture 3
i218.photobucket.com/albums/cc300/Drago85/workingx64build-2_zpse720ae31.jpg

Full console output from Debug on Visual Studio
#15
06/02/2013 (6:50 pm)
I am impressed!
#16
06/03/2013 (3:04 am)
Nom nom nom this would be very tasty!
#17
08/07/2013 (10:17 am)
@Dusan

Great work!

Have you any plans to share the code?
I would love to get my version of T3D running x64.
Trying to do it myself now.
#18
08/07/2013 (2:06 pm)
I would love to see a x64 build of Torque. The more memory that is available the better!
#19
08/08/2013 (8:24 am)
Managed to do it on my own ))))


It wasn't that hard actually just few places where pointer were stored to S32 value or something.

Will play with it for a while and try to load more than 4 gig memory to prove it was really worth it.

My code patch is here:
www.garagegames.com/community/forums/viewthread/134868


imageshack.us/a/img542/8594/uwra.jpg