vike's GTA2 update patch enhancement upgrade fix v11.44

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: Vike's enhanced GTA2

Post by BenMillard » 16 Dec 2011, 15:14

Yellow firemen would be a nice visual improvement without much effect on gameplay.

+1

User avatar
Salamander
Janitor
Janitor
Posts: 145
Joined: 01 Apr 2009, 20:38
GH nick: Salamander
KingSalamander
Sally
[00]
Contact:

Re: Vike's enhanced GTA2

Post by Salamander » 23 Jan 2012, 23:50

Vike does your patched gta2.exe change the framerate in any way, or increase the maxframerate limit?

User avatar
Vike the Hube
Hitman
Hitman
Posts: 143
Joined: 28 Feb 2010, 22:34
GH nick: vike

Re: Vike's enhanced GTA2

Post by Vike the Hube » 24 Jan 2012, 00:18

It modifies the delay settings for "slow", "normal", and "fast" in multiplayer games. I believe they were fixed at 20, 25, and 30 FPS respectively originally, ignoring "turbo" mode when it would somehow glitch out and go faster. I modified them to be 20, 30, and 50 FPS respectively, seeing no one seemed to use "normal" and if 50 was a problem (e.g. in Europe with decent internet connections) they could always revert to "Normal" for the old "fast" setting. Make sense? ;)

(50FPS more reliably increases the game speed to "turbo" mode in places with shitty internet like Australia)

User avatar
Salamander
Janitor
Janitor
Posts: 145
Joined: 01 Apr 2009, 20:38
GH nick: Salamander
KingSalamander
Sally
[00]
Contact:

Re: Vike's enhanced GTA2

Post by Salamander » 24 Jan 2012, 00:42

Yeah, thanks!
I missed it in your first post; can you add the keywords "framerate" and "frame rate limiter" to that line? For searching and ctrl+f.

FYI, I always play your version at "normal". The way I see it, the ping I have with the people I play with usually limits FPS somewhere between 30-60 fps, and it's not constant during a game, so I'd rather cap it at 30fps and have FPS constant and the gameplay smooth than have it jerk and jump around between 30-50fps if I had it set to "fast".

jotab
Mugger
Mugger
Posts: 10
Joined: 23 Jan 2012, 23:08

Re: Vike's enhanced GTA2

Post by jotab » 24 Jan 2012, 18:31

Vike, at what level would you say your knowledge about the code is? Can you add more complex functions like new weapons? Improve network code etc? Would it be possible to decompile parts of the code to get a step further to a cloned/better version of GTA2? IMHO the whole network part of GTA2 needs to be rewritten in a way that lets ping over, say 50ms, still work smoothly.

Best regards!

User avatar
Vike the Hube
Hitman
Hitman
Posts: 143
Joined: 28 Feb 2010, 22:34
GH nick: vike

Re: Vike's enhanced GTA2

Post by Vike the Hube » 26 Jan 2012, 06:10

jotab wrote:Vike, at what level would you say your knowledge about the code is? <snip> Would it be possible to decompile parts of the code to get a step further to a cloned/better version of GTA2?
I work with a decompiled version in IDA Pro Free, where I notate it (badly :lol:). I also used Ollydbg to help me find things, and bEye as a hex editor to apply testing changes and final changes. It's not possible to use this copy to "recompile" so to speak, and I doubt we will ever have the time to do that completely; it's much easier to make a new one.

It's hard to describe where I'm at. I've labeled quite a lot of variables and functions, but I'm not sure percentage- commonly used utility functions it wouldn't be more than 50% of them, probably nowhere near that high. General functions I doubt it's even 5%. I've also figured out some key data structures (e.g. 50% of the player, ped, ped sprite structures), and the work we've done with decompiling has allowed me to decipher the majority of arbitrary constants that come from script, even if they're not labeled.

Generally speaking, I can find any piece of code that does anything in particular in a few hours to half a day's work. But there are still a lot of situations where I can't understand it once I've found it (e.g. the flamethrower crash bug).

Easiest way to figure out if I can implement something is to ask ;) It helps if there exists something similar I can find and copy; e.g. the changes to some of the script commands were about 2-3 days work each.
jotab wrote:Can you add more complex functions like new weapons? Improve network code etc? <snip> IMHO the whole network part of GTA2 needs to be rewritten in a way that lets ping over, say 50ms, still work smoothly.
New weapons are a possibility I reckon... [respect] There is one thing I want to try to fix the network code but I don't know if it will work yet: skip frames. If we skipped say every second or 2 out of 3 frames, it would proportionally increase the game speed, obviously at the expense of the framerate. No idea whether that would work though :D I suspect it would increase desyncs but maybe not too badly...

I hate to be a downer but in my opinion the only way to properly fix the network code is to rewrite the entire game. Doing network code "properly" is hard (e.g. in a modern FPS) because you have to do latency hiding, which is hard enough. But you also need to handle cheaters which makes it harder. Even without trying to handle cheaters (think GTA IV problems) it changes the entire way the GTA2 engine works to be reactive, instead of frame-by-frame which is easy. PLUS then across continents you'd have periodic corrections (like jumping lag in FPS) which may ruin close action, which kinda defeats the massive effort involved.

But hopefully skipping frames will work :D

User avatar
Vike the Hube
Hitman
Hitman
Posts: 143
Joined: 28 Feb 2010, 22:34
GH nick: vike

Re: Vike's enhanced GTA2

Post by Vike the Hube » 26 Jan 2012, 06:25

By the way I'll gladly hand over my IDA database to anyone who asks! But maybe I might force them to put anything they add public too... :twisted:

jotab
Mugger
Mugger
Posts: 10
Joined: 23 Jan 2012, 23:08

Re: Vike's enhanced GTA2

Post by jotab » 26 Jan 2012, 09:01

I wrote a comment at black phoenixs blog, he said he is working on another project with higher priority at the moment, but that this project will be sharing some code and structures with openGBH. Cant you ask him if he needs a co-coder? ;)

Im wondering, when you fix something, what is the process? Do you look in the decompiled db, and then code in in asm?

I think it might be way too hard, not to say impossible, but i imagined splicing out the whole network part from the game and rewriting it, but as you say it might be too deep into the game engine. It should be possible to get good close action, think about Quake1, i have played it at 200ms and it has still worked good.

User avatar
Vike the Hube
Hitman
Hitman
Posts: 143
Joined: 28 Feb 2010, 22:34
GH nick: vike

Re: Vike's enhanced GTA2

Post by Vike the Hube » 26 Jan 2012, 09:41

Yeah. I could offer assistance to Black Phoenix; but the problem is... Where I used to work the manager had a theory about engineers. He said there were starters and finishers. Starters like the big architecture, the big problems, etc. Finishers don't want to deal with that and just want to code. Black Phoenix and I are both starters :P I'd want to solve the same things he wants to solve and then we'd have all this left over stuff neither of us wanted :D

Process of fixing something goes something like this:
Educated guess about how it works. It helps that I already know a bit about the way the exe is structured, how that sort of game engine tends to work.
Try and find it in the code, test my guess so to speak. Normally I'll see if any of the things I've labelled in the database match up with some part of how I think it works... e.g. to do stuff in the chat text, I looked for references to "%s: %s_" which I'd already seen somewhere or other. Or i'll use some known constant or function call, like the directinput key constants, windows messages, or UI function calls. Otherwise I search through memory in the debugger and set breakpoints on access, watch where it's copied, etc. Very tedious.
Then I watch what it does with the data to figure out where the exact bit of code I want is, where variables are, etc.
THEN I code in asm, patch it in the debugger, test test test, give it to Sektor, we test together, release :D

Sektor suggested that we could write a wrapper around the single player game, kinda like SA:MP and MTA. That probably wouldn't help reducing latency but could help with port forwarding.. Main problem really is time constraints all aroundddddddd.

jotab
Mugger
Mugger
Posts: 10
Joined: 23 Jan 2012, 23:08

Re: Vike's enhanced GTA2

Post by jotab » 26 Jan 2012, 09:53

You both seem like starters, yes, but two f-ing great starters! BP made a working network version with walking around and prediction giving smooth performance up to 1000ms delay. You have patched the .exe to make it work a lot better than before. All great progress.

If you were to work together you could create something that is playable in a quite short time. As soon as it is playable and people start using it i think it will attract more coders etc that will be glad to help out with all the boring tasks =)

User avatar
Sektor
Boss
Boss
Posts: 1369
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Vike's enhanced GTA2

Post by Sektor » 26 Jan 2012, 10:06

Instant bullets, near instant aiming/turning and not being able to see EXACTLY where your opponent is aiming in an FPS make it much easier to hide lag. In GTA2, everyone turns slowly and the bullets move so slowly that you can dodge them. It's part of the fun but those features don't play well with lag.

jotab
Mugger
Mugger
Posts: 10
Joined: 23 Jan 2012, 23:08

Re: Vike's enhanced GTA2

Post by jotab » 26 Jan 2012, 10:26

Sektor wrote:Instant bullets, near instant aiming/turning and not being able to see EXACTLY where your opponent is aiming in an FPS make it much easier to hide lag. In GTA2, everyone turns slowly and the bullets move so slowly that you can dodge them. It's part of the fun but those features don't play well with lag.
But this would probably only be a problem when lag gets over 100ms? In the current version it can start to lag really bad on a LAN with <10ms actual network lag.

User avatar
Sektor
Boss
Boss
Posts: 1369
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Vike's enhanced GTA2

Post by Sektor » 26 Jan 2012, 10:33

If it lags on LAN then it is probably a video/audio driver incompatibility.

jotab
Mugger
Mugger
Posts: 10
Joined: 23 Jan 2012, 23:08

Re: Vike's enhanced GTA2

Post by jotab » 26 Jan 2012, 21:44

Yes, because the lag gets really bad when explosions are on screen, or just a huge number of cars. Is this something that is possible to patch Vike? Or maybe a debug patch that will let us localise the problem? I will test to see if i can pinpoint the problem further when i am at home, i understand that my error description at the moment is worthless :P

User avatar
Salamander
Janitor
Janitor
Posts: 145
Joined: 01 Apr 2009, 20:38
GH nick: Salamander
KingSalamander
Sally
[00]
Contact:

Re: Vike's enhanced GTA2

Post by Salamander » 26 Jan 2012, 22:08

Seen it on old computers - a carbomb or skidmarks and it jerks to hell. It's not a ping issue, and I doubt it's a bandwidth issue as GTA2 only needs a few kB/s. As Sektor said, most likely a video card drivers issue.

"(...) that lets ping over, say 50ms, still work smoothly."
GTA2 plays smoothly at 100ms. 50ms is mad-fast. If you say >50 is not smooth for you, then read above.

User avatar
T.M.
Immortal
Posts: 957
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: Vike's enhanced GTA2

Post by T.M. » 26 Jan 2012, 23:45

Try these settings:
Image

can be accessed from "gta2 manager.exe"

BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: Vike's enhanced GTA2

Post by BenMillard » 28 Jan 2012, 10:26

Lag during explosions is a video card issue. The way it rapidly swaps and moves large bitmaps just runs really slow on certain cards with certain drivers.

I had to find a middle-age driver for my old PC graphics card to make it run smooth. The original drivers and the newest drivers both lagged badly.

On my new laptop (mid-2010) it ran fine straight out of the box. It does have a 1GB card, though! :lol:

User avatar
Salamander
Janitor
Janitor
Posts: 145
Joined: 01 Apr 2009, 20:38
GH nick: Salamander
KingSalamander
Sally
[00]
Contact:

Re: Vike's enhanced GTA2

Post by Salamander » 26 Jun 2012, 19:30

Vike I unpacked the 11.42 patch exe to update the GTA2-GTAMP-Edition builds, a few points:
1- Please remove the space in "gta2 manager.exe" (we agreed to this a long time ago ;] )
2- $_OUTDIR/test/readme.txt, "Don't remove this folder. GTA2 v11.41 requires it." Should be 11.42.
3- Some files had upper-case extensions, other lower. Problem for non-Windows users. Stick to all lower.

I corrected all points in the new GTA2-GTAMP-Edition-v3 builds.

Great work, thanks!

User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: Vike's enhanced GTA2

Post by Pyro » 26 Jun 2012, 23:17

Not sure if this the place, but, maybe change the official MMP files for multiplayer to remove the 'PlayerCount' line to reduce the number of files and compress the official maps if they haven't already. Well, I guess this is more towards the downloadable version than the actual gta2.exe itself but something to consider!

User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Vike's enhanced GTA2

Post by elypter » 26 Jun 2012, 23:21

if that were possible automatically i would have done that already
yur sa'nok ngeyä

Post Reply