World Rally Driver 4K

:slight_smile:

… and now trio of German players have managed to go even faster… hey what happened to their scores?

For USA it’s now very hard to find many more points aver 1023 (but one of the disappearing German scores had 1025).
For Australia maybe a few more points are available… but I had a blast to get that 1040.
For Sweden I feel that it’s possible to get at least 1045, and perhaps a bit more.

[new edit] Just got home and continued trying to beat my scores… and I got a great 1048 on Australia, but the score entry system doesn’t seem to accept the code. Have you changed the way it’s encoded since yesterday (I have left the program running on my PC for about the last 3 days now)?

Cheers, Tim.

Someone was trying to crack the code at the same time the German players entered their codes. My code cracking detection wasn’t the greatest, and I couldn’t tell if their times were real or not, so I deleted them. Big apology if they were real times.

Yes, sorry, last night I improved my code cracking detection, and I also made a new seed for the code, so you will need to close and reopen the page as it now generates different codes. So you will lose your current progress, sorry!! ::slight_smile:

OK. Just for posterity then, here’s a jpegged screen print of my success! :slight_smile: [I left the code in as it’s not valid any more anyway]

http://games.7sun.com/4k/wrd/wrd-page-crop.jpg

I guess I’ll start again with the new version this evening.

Cheers, Tim.

Why not just copying it to clipboard?

I just manually updated your score.

The German people are back, and it looks like they didn’t crack the code. I’m blown away by the Sweden time, almost 2 seconds faster then anyone else! :o

Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(""), null); ==> adds 150 bytes
JOptionPane.showInputDialog(this, null, “”); ==> adds 61 bytes
:frowning:
So, if I removed zooming, or textures, or something like that, I could probably fit it in. But I like the zooming and textures. 8)

Thanks for that… but I’ve actually beaten it now! :stuck_out_tongue:

Hmm… 1092 does seem rather high. Perhaps there is some way for me to go faster by using the brakes? :slight_smile: (At the moment I just lift off the accelerator to slow down, but in real racing the cars slam the brakes really hard.) Still, it’s a big gap between my 1041 and his score.

Cheers, Tim.

You are now officially the fastest person again. The German dude slipped up today and tried to submit a score that was way over the top (a full second faster on USA). So now I know the Sweden time is also a cheat. I can only guess that they have decompiled my game to work out the codes (as they never submit incorrect codes). I’m going to try to see if I can hide the calculation of the codes better. Any ideas on how to do this would be most welcome! :slight_smile:

i think the best option is to actually remove the score “code” from the game and implement the playback feature.To submit a score you submit your replay and the server will then play the replay to calculate the score.

I would think that this would make it a lot more difficult to cheat as much more work would be needed to generate a valid replay which scores well.

They may not be d-compiling the code. It may be possible to reverse engineer your obfuscation algorithm just by observing the codes generated by different scores on the tracks.

I notice that when one of my scores get better, the numbers on the left of the code rarely change. This would imply to me that the obfuscation isn’t very complex. It’d be better I think if the whole number changed wildly even if only a small change was made to one of the encoded scores.

In respect to knowing a better way… I don’t know if there’s a solution to this problem in general. I’ve thought about it quite a bit for Pipe Extreme. I think the conclusion was that the most foolproof way was to submit a vector of controls to the server, and have the server reconstruct the score information by replaying the game. But this really isn’t possible in your case.

Other senarios I’ve considered all require a direct network connection between the game and the server.

In your case the best would probably be to use a better encryption algorithm… but with the lack of space available this could be a problem.

Cheers, Tim.

Better encryption isn’t really going to help. All you need to do is decompile the game, isolate the game time/score and poke a suitable high score into it. Once you’ve done that you can just compile and run and it’ll spit out a perfectly legit high score code - no understanding of the actual encryption (however simple or complicated) is required.

In a full, obfuscated java game it’d be quite tricky to narrow down the relevant bits of code, but in a 4k game there’s so little code that it’s going to be pretty easy.

It’s a hard problem - as you say key presses would be pretty foolproof, but complicated and not really practical for a 4k game.

It’s a hard problem - as you say key presses would be pretty foolproof, but complicated and not really practical for a 4k game.

Well, if one is very very anal (and some people are =) ) they could write an app which will determine the best sequence of keystrokes to get the best time… Probably not that much different from the Slot Car Challenge at J1.

Dmitri

I recently began to have the applet lock up. I’ve figured out how to replicate the problem on my machine now. After clicking on the applet to activate it, then the applet window is scrolled so that the applet isn’t completely displayed, and is then scrolled back so you can see it all, it is now locked up.

This was in Firefox 2.0.0.20, Java Plug-in 1.6.0_07, Windows XP SP2.

Cheers, Tim.

Just tried it on my system, and it didn’t lock up. However, I’m running Vista and Firefox 3. Do any other Applets lock up when you do this?

BTW: I’ve almost finished doing the replay data code, so don’t bother setting any fast times until I finish it, as I’m going to have to clear out the existing times.

I agree. And I’ve now coded it up.

You can now Save and Load replays! And the game is still under 4k!

Unfortunately, to fit it into 4k, I had to remove the custom grass and snow textures, as well as the loading progress bar, smooth zooming, and the independent front/rear skid marks. But, hey, Replays! Yay! ;D

Let me know of any problems / thoughts.

Cheers,
Craig.

It says my code is not valid, but i Simply copied it. :frowning:

[quote]Sorry, your replay data is not valid: 2
[/quote]
Edit: Just some hints, it may be helpfull: driving is slow here (compared to my mahcine at work) as my CPU is always at 100%
And i saved hte score, just in case u wanna see it.

hmm… i cant play the game… the back ground turns white and only spasmodically flashes the track :frowning:

this pc is a laptop with the following characteristics:

java version “1.6.0_11”
Java™ SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot™ Client VM (build 11.0-b16, mixed mode, sharing)


System Information

Time of this report: 1/11/2009, 08:51:55
Machine name: KERO
Operating System: Windows XP Professional (5.1, Build 2600) Service Pack 2 (2600.xpsp_sp2_gdr.080814-1233)
Language: English (Regional Setting: English)
System Manufacturer: ASUSTeK Computer Inc.
System Model: F3JP
BIOS: Default System BIOS
Processor: Intel® Core™2 CPU T5500 @ 1.66GHz (2 CPUs)
Memory: 1024MB RAM
Page File: 673MB used, 1786MB available
Windows Dir: C:\WINDOWS
DirectX Version: DirectX 9.0c (4.09.0000.0904)
DX Setup Parameters: Not found
DxDiag Version: 5.03.2600.2180 32bit Unicode


DxDiag Notes

DirectX Files Tab: No problems found.
Display Tab 1: No problems found.
Sound Tab 1: No problems found.
Sound Tab 2: No problems found.
Music Tab: No problems found.
Input Tab: No problems found.
Network Tab: No problems found.


DirectX Debug Levels

Direct3D: 0/4 (n/a)
DirectDraw: 0/4 (retail)
DirectInput: 0/5 (n/a)
DirectMusic: 0/5 (n/a)
DirectPlay: 0/9 (retail)
DirectSound: 0/5 (retail)
DirectShow: 0/6 (retail)


Display Devices

    Card name: ATI Mobility Radeon X1700 (Omega 3.8.442)
 Manufacturer: ATI Technologies Inc. (Omega 3.8.442)
    Chip type: ATI Radeon Graphics Processor (0x71D5)
     DAC type: Internal DAC(400MHz)
   Device Key: Enum\PCI\VEN_1002&DEV_71D5&SUBSYS_12421043&REV_00

Display Memory: 512.0 MB
Current Mode: 1280 x 800 (32 bit) (60Hz)
Monitor: Default Monitor
Monitor Max Res:
Driver Name: ati2dvag.dll
Driver Version: 6.14.0010.6755 (English)
DDI Version: 9 (or higher)
Driver Attributes: Final Retail
Driver Date/Size: 12/5/2007 13:34:08, 269312 bytes
WHQL Logo’d: n/a
WHQL Date Stamp: n/a
VDD: n/a
Mini VDD: ati2mtag.sys
Mini VDD Date: 12/5/2007 15:56:40, 2782208 bytes
Device Identifier: {D7B71EE2-3295-11CF-9069-4832A1C2CB35}
Vendor ID: 0x1002
Device ID: 0x71D5
SubSys ID: 0x12421043
Revision ID: 0x0000
Revision ID: 0x0000
Video Accel: ModeMPEG2_C ModeMPEG2_D ModeWMV8_B ModeWMV8_A ModeWMV9_B ModeWMV9_A
Deinterlace Caps: {6E8329FF-B642-418B-BCF0-BCB6591E255F}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_PixelAdaptive
{335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_BOBVerticalStretch
{3C5323C1-6FB7-44F5-9081-056BF2EE449D}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,2) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_PixelAdaptive
{552C0DAD-CCBC-420B-83C8-74943CF9F1A6}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,2) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_PixelAdaptive
{6E8329FF-B642-418B-BCF0-BCB6591E255F}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_PixelAdaptive
{335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(NV12,0x3231564e) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY DeinterlaceTech_BOBVerticalStretch
Registry: OK
DDraw Status: Enabled
D3D Status: Enabled
AGP Status: Enabled
DDraw Test Result: Not run
D3D7 Test Result: Not run
D3D8 Test Result: Not run
D3D9 Test Result: Not run


Sound Devices

        Description: Realtek HD Audio output

Default Sound Playback: Yes
Default Voice Playback: Yes
Hardware ID: HDAUDIO\FUNC_01&VEN_10EC&DEV_0660&SUBSYS_10430000&REV_1000
Manufacturer ID: 1
Product ID: 100
Type: WDM
Driver Name: RtkHDAud.sys
Driver Version: 5.10.0000.5268 (English)
Driver Attributes: Final Retail
WHQL Logo’d: n/a
Date and Size: 6/14/2006 12:04:12, 4299264 bytes
Other Files:
Driver Provider: Realtek Semiconductor Corp.
HW Accel Level: Full
Cap Flags: 0x0
Min/Max Sample Rate: 0, 0
Static/Strm HW Mix Bufs: 0, 0
Static/Strm HW 3D Bufs: 0, 0
HW Memory: 0
Voice Management: No
EAX™ 2.0 Listen/Src: Yes, Yes
I3DL2™ Listen/Src: Yes, Yes
Sensaura™ ZoomFX™: No
Registry: OK
Sound Test Result: Not run

        Description: Modem #0 Line Playback (emulated)

Default Sound Playback: No
Default Voice Playback: No
Hardware ID:
Manufacturer ID: 1
Product ID: 81
Type: Emulated
Driver Name:
Driver Version:
Driver Attributes:
WHQL Logo’d:
Date and Size:
Other Files:
Driver Provider:
HW Accel Level: Full
Cap Flags: 0x0
Min/Max Sample Rate: 0, 0
Static/Strm HW Mix Bufs: 0, 0
Static/Strm HW 3D Bufs: 0, 0
HW Memory: 0
Voice Management: No
EAX™ 2.0 Listen/Src: No, No
I3DL2™ Listen/Src: No, No
Sensaura™ ZoomFX™: No
Registry: OK
Sound Test Result: Not run


Sound Capture Devices

        Description: Realtek HD Audio Input

Default Sound Capture: Yes
Default Voice Capture: Yes
Driver Name: RtkHDAud.sys
Driver Version: 5.10.0000.5268 (English)
Driver Attributes: Final Retail
Date and Size: 6/14/2006 12:04:12, 4299264 bytes
Cap Flags: 0x0
Format Flags: 0x0

        Description: Modem #0 Line Record (emulated)

Default Sound Capture: No
Default Voice Capture: No
Driver Name:
Driver Version:
Driver Attributes:
Date and Size:
Cap Flags: 0x0
Format Flags: 0x0


DirectMusic

    DLS Path: C:\WINDOWS\SYSTEM32\drivers\GM.DLS
 DLS Version: 1.00.0016.0002
Acceleration: n/a
       Ports: Microsoft Synthesizer, Software (Not Kernel Mode), Output, DLS, Internal, Default Port
              Microsoft MIDI Mapper [Emulated], Hardware (Not Kernel Mode), Output, No DLS, Internal
              Microsoft GS Wavetable SW Synth [Emulated], Hardware (Not Kernel Mode), Output, No DLS, Internal
    Registry: OK
 Test Result: Not run

DirectInput Devices

  Device Name: Mouse
     Attached: 1
Controller ID: n/a

Vendor/Product ID: n/a
FF Driver: n/a

  Device Name: Keyboard
     Attached: 1
Controller ID: n/a

Vendor/Product ID: n/a
FF Driver: n/a

Poll w/ Interrupt: No
Registry: OK

I had a look at at your replay data at it stop exactly at the 32767 character, so I suspect there is a limitation with whatever browser your using. What browser are you using?

I had to also simplify the game loop to save bytes, so now it’s always calling yield, so it will appear as though the CPU is at 100%, even though it’s mostly yielding. Maybe I should change it to always call sleep(1)?

Thanks for having a look.
Browser: Opera 9.63 Build 10476

java version “1.6.0_07”
Java™ SE Runtime Environment (build 1.6.0_07-b06)

Will try some other Browser for testing.

Edit: Submitting works with Firefox. 3rd place (for some time) 8)

I was worried effects like this may happen. I think it’s because I’m using a VolatileImage as my screen image. I tried to just use a BufferedImage, however, on a low spec PC, I just couldn’t get the performance (dropped to about 10fps). I create the VolatileImage in the standard way:

this.createVolatileImage(WIDTH_SCREEN, HEIGHT_SCREEN);

Has anyone else used VolatileImages?

Edit: I have now removed the use of VolatileImages. I have also put in a check to see if the CPU is struggling, if it is, it turns off anti-aliasing and quality rendering. Moogie, did this solve the problem? Thanks.