MTM2 Source Code
Re: MTM2 Source Code
I am gonna work on getting it to compile tonight. Haven't messed with it other than browsing the code for some info for MFR. But I will work on it tonight. I'll keep you posted. I am going to be working on MFR, got the framework all setup with new code and whatnot, rewrote everything from the original. Hopefully it will become a real game that uses trucks/tracks with multiplayer and racing and all, the legacy MFR was just pretty much freestyle but I am going to keep the name anyways. But I now have the information I need to make MFR better.
Re: MTM2 Source Code
File, how are you trying to do it with VS 2015? Did you start your own project and start adding stuff? Or did you import it somehow?
Re: MTM2 Source Code
I tried importing using the "new project from existing code but I don't think it's the right way.
Have managed to install and get Watcom C++ 11 to work in the meantime
I've got no clue what I'm doing honestly but I know more today than I knew yesterday. lol
Have managed to install and get Watcom C++ 11 to work in the meantime
I've got no clue what I'm doing honestly but I know more today than I knew yesterday. lol
Re: MTM2 Source Code
I created a new project in Code::Blocks and added all the files and directories and whatnot and linked the libraries as well. I got several errors but I managed to get it down to 2. I can't figure it out, cause the error is about a template that has a namespace that I tried to make public in the support folder I believe it was it had something to do with an array. I hate templates. It makes it so hard to read. Anyways, the other error was a string type? Don't have a string type? I don't know. I'll work on it tomorrow. Keep on truckin'
-James
-James
Re: MTM2 Source Code
Let me know if you get it to compile before I do. I'll probably have to ask you for help with how you did it 
Re: MTM2 Source Code
Still no go on my end, worked on it off and on. Any luck on your end Fila? I am gonna try and get it to compile in VS 2013, almost had it in Code::Blocks. I was never in favor of VS for the simple fact of all the stupid dependencies that are needed. The IDE is amazing don't get me wrong, and the debugging. But I can't understand how you have to have all these different prerequisites for a program to function, and then versions and so on and so forth. Now I am in a ramble. Anyways, still working on my monster truck game, it is coming along nicely.
Re: MTM2 Source Code
Had no time whatsoever the past 5 days and won't have time to touch it until next week 
I decided to try and give a go in Code::Blocks too. It seems very friendly to me but I'll see if I can get it as close as you were able to.
I decided to try and give a go in Code::Blocks too. It seems very friendly to me but I'll see if I can get it as close as you were able to.
- Kmaster
- MTM2 Engineer
- Posts: 1369
- Joined: Fri Oct 10, 2003 6:19 pm
- Location: Valparaíso, Chile.
- Contact:
Re: MTM2 Source Code
I would take a different approach, try to get it to compile using Visual C++ 4.0/5.0 with the directx sdk which is probably what they used back then.
Re: MTM2 Source Code
Beat me to it but yeah. 1998 would have been VS6 era. Fire up C++ 6 and then reference the DX7 SDK which should contain the dx4/5 stuff MTM2 was written on.Kmaster wrote:I would take a different approach, try to get it to compile using Visual C++ 4.0/5.0 with the directx sdk which is probably what they used back then.
Might be easier to to this in a windows 98 or XP vitual machine.

Re: MTM2 Source Code
Probably would be easier yeah :/
Based on the code I think they used a combination of Watcom C++ (maybe Watcom 11) and whatever Visual Studio was out in '97.
Jpez, are your errors coming from dsarray.hpp?
Based on the code I think they used a combination of Watcom C++ (maybe Watcom 11) and whatever Visual Studio was out in '97.
Jpez, are your errors coming from dsarray.hpp?
Re: MTM2 Source Code
Jpez, just wanna make sure we both got the same code and/or correct code.
Do you have the file winrun.h and/or winrun.cpp in wincore?
Do you have the file winrun.h and/or winrun.cpp in wincore?
Re: MTM2 Source Code
SUCCESS!!!!!!!!!!!! COMPILATION ACHIEVED!!!!!!!!!!!
Had to do the following:
1. Install Win 98SE
2. Install Microsoft Developer Studio 4.10 (aka Microsoft Visual C++ 4.10. NOT 4.20 but exactly 4.10)
3. Had to install the Directx5 SDK (6 or 8 might work too) because there's a missing library file.
4. Had to do some very small changes to a file setting and add a line of code.
5. PROFIT!
The version is 2.00.41 which I assume was the retail one correct?
Had to do the following:
1. Install Win 98SE
2. Install Microsoft Developer Studio 4.10 (aka Microsoft Visual C++ 4.10. NOT 4.20 but exactly 4.10)
3. Had to install the Directx5 SDK (6 or 8 might work too) because there's a missing library file.
4. Had to do some very small changes to a file setting and add a line of code.
5. PROFIT!
The version is 2.00.41 which I assume was the retail one correct?
Re: MTM2 Source Code
Mark sent me the updated source files for the patched version as well \o/
Re: MTM2 Source Code
So I've been playing around with it and I got some good news.
- Bumped up maximum render distance from 20 to 50 units. (same as render patch)
- The maximum render distance is now fully customizable from within the game.
- Max Verts increased from 800 to 1200 (same as render patch)
- Maximum number of objects increased from 256 to 512 (same as render patch #2. this initially caused crashes on tracks like duality and razzle dazzle)
- Mark finally increased the box count - or otherwise known the infamous ground box error. Limit increased from 600 to 800. Tracks like Razzle Dazzle can now be completed with 8 running trucks.
- Most likely related to the groundbox error, tracks like Castle Rock Too and Spring Valley can now be succesfully played with any number of trucks \o/
So in short. All the issues that I know of, that the render patch has brought, have been resolved!
To Do list:
- Work on the resolution and aspect ratios. This was the first thing I wanted to do but it proves to be A LOT more complex than I expected.
Stay tuned for some beta testing ;)
- Bumped up maximum render distance from 20 to 50 units. (same as render patch)
- The maximum render distance is now fully customizable from within the game.
- Max Verts increased from 800 to 1200 (same as render patch)
- Maximum number of objects increased from 256 to 512 (same as render patch #2. this initially caused crashes on tracks like duality and razzle dazzle)
- Mark finally increased the box count - or otherwise known the infamous ground box error. Limit increased from 600 to 800. Tracks like Razzle Dazzle can now be completed with 8 running trucks.
- Most likely related to the groundbox error, tracks like Castle Rock Too and Spring Valley can now be succesfully played with any number of trucks \o/
So in short. All the issues that I know of, that the render patch has brought, have been resolved!
To Do list:
- Work on the resolution and aspect ratios. This was the first thing I wanted to do but it proves to be A LOT more complex than I expected.
Stay tuned for some beta testing ;)
Re: MTM2 Source Code
Hmmm. Turns out I can only increase the render distance to 35 and not 50. Wonder why.
Re: MTM2 Source Code
Fila, I know you're early in this, but as a truck maker it would be nice if we could get some extra options in the .trk files as well, namely a second set of axle bars and different front and rear tires.
Also curious to know if there's anything in there about the physics...
Also curious to know if there's anything in there about the physics...
- Kmaster
- MTM2 Engineer
- Posts: 1369
- Joined: Fri Oct 10, 2003 6:19 pm
- Location: Valparaíso, Chile.
- Contact:
Re: MTM2 Source Code
Ready to beta test!
Re: MTM2 Source Code
There is. It's hidden in there but there is. I've not gone over it yet but the whole game engine is in there. Also I noticed stuff like the mtm1 drag racing code is still there. There's a code for you to overrev and blow up your engine as wellCale wrote:Fila, I know you're early in this, but as a truck maker it would be nice if we could get some extra options in the .trk files as well, namely a second set of axle bars and different front and rear tires.
Also curious to know if there's anything in there about the physics...
Just a reminder, I'm a total noob at this stuff so the process will be slow. While i'm looking/working on this I'm also learning at the same time so it just takes a lot longer.
Initially I just want to try and get rid of some of the more common and annoying errors (like the groundbox one), then update the resolution option, then look into improving the game. Such things as the axle bar and stuff, re-adding drag races etc I'm totally up for trying to implement. Also at some point I want to try and port the game to directx 9. That should open up further game changing possibilities as well.
Edit: basically right now I want to figure out why I can't bring visibility to 50 (like in the render patch). Once I have that figured out (or if it takes too long) I'll do some beta testing to see how the game works on other PC's as well
Jpez, have you had any luck with it? Turns out mingw doesn't know how to use asm files so that's a dead end.
Re: MTM2 Source Code
OK here it is.
http://www.mtm2.com/~mtmg/misc/Beta0.1.zip
Beta 0.1 Changelog:
- Bumped up maximum render distance from 20 to 34 units.
- The maximum render distance is now fully customizable from within the game.
- Max Verts increased from 800 to 1200 (same as render patch)
- Maximum number of objects increased from 256 to 512 (same as render patch #2. this initially caused crashes on tracks like duality and razzle dazzle)
- Mark finally increased the box count - or otherwise known the infamous ground box error. Limit increased from 600 to 800. Tracks like Razzle Dazzle can now be completed with 8 running trucks.
- Most likely related to the groundbox error, tracks like Castle Rock Too and Spring Valley can now be succesfully played with any number of trucks \o/
Make sure you create a back-up of the original files before you overwrite them.
Otherwise, let me know whatever issues you come across.
I have managed to increase the distance to 40 tiles but ONLY in the developer release. I've no idea why I can't make it happen in the regular release.
Basically from 35 tiles to around 45 tiles the game crashes with a "Integer - Divide By Zero" error. I can't for the life of me find where that divide happens. However in the developer release this does not happen and I've no idea why.
http://www.mtm2.com/~mtmg/misc/Beta0.1.zip
Beta 0.1 Changelog:
- Bumped up maximum render distance from 20 to 34 units.
- The maximum render distance is now fully customizable from within the game.
- Max Verts increased from 800 to 1200 (same as render patch)
- Maximum number of objects increased from 256 to 512 (same as render patch #2. this initially caused crashes on tracks like duality and razzle dazzle)
- Mark finally increased the box count - or otherwise known the infamous ground box error. Limit increased from 600 to 800. Tracks like Razzle Dazzle can now be completed with 8 running trucks.
- Most likely related to the groundbox error, tracks like Castle Rock Too and Spring Valley can now be succesfully played with any number of trucks \o/
Make sure you create a back-up of the original files before you overwrite them.
Otherwise, let me know whatever issues you come across.
I have managed to increase the distance to 40 tiles but ONLY in the developer release. I've no idea why I can't make it happen in the regular release.
Basically from 35 tiles to around 45 tiles the game crashes with a "Integer - Divide By Zero" error. I can't for the life of me find where that divide happens. However in the developer release this does not happen and I've no idea why.