GTA2WEB

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
Post Reply
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

GTA2WEB

Post by Cuban-Pete »

During making water (for elypter) I tested the water in blocks next to each other in the webbrowser, this brought me on a crazy idea. :D

I call it GTA2WEB - and all it does is being an (almost) static collection of GTA2 textures.

If you ever feel like playing GTA2, but can't for some strange reason - come to Cuban-Pete's GTA2WEB to get that good old feeling. :P

Here is the webpage: http://lars.stonerocket.co.uk/gta2/gta2web/

All jokes a side, it was a combination of working with the textures, the web and automating it that drove me to do this small project.
I did not type the html for all the images by hand, I made a simple matrix that was converted with python to html code. In the real index.html you can find the matrix I used.

Sorry!, but somehow the webpage looks perfectly in IE, but in firefox it has strange black lines here and there. I don't know how to fix that. If you happen to have an idea, please say so.
"Mmmm, your eyes are so beautiful."
User avatar
Gustavob
Immortal
Posts: 407
Joined: 18 May 2009, 21:40
GH nick: Gustavob
|Gustavob|
Location: Nowhere.
Contact:

Re: GTA2WEB

Post by Gustavob »

Looks cool, nice work 8-)
You just lost the game.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2WEB

Post by Cuban-Pete »

Thanks. :)

I was thinking, perhaps I could make it into a click/search game.

For example, I need to click on phone to get mission. Or I click on bus-stop to go to next location (looney or sumthing) and I can do there mission.

...but, who wants such a game... :lol:
"Mmmm, your eyes are so beautiful."
Razor
Lunatic
Lunatic
Posts: 456
Joined: 19 Jul 2008, 14:14
GH nick: Razor, R
Location: Poland / Szczecin
Contact:

Re: GTA2WEB

Post by Razor »

me :D gta2 mmorpg xDDDDd
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA2WEB

Post by elypter »

very nice!

reminds me a bit of http://www.mrwong.de/myhouse/ or more off a city in the same style which i don't find anymore.

maybe it could be even turned into something pseudo 3d like here with the new html5 canvas element :D :
http://www.canvasdemos.com/2009/03/22/p ... ng-part-2/
yur sa'nok ngeyä
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2WEB

Post by Cuban-Pete »

Nice links, that 3D on html5 looks nice, but I'm afraid it's too heavy for web-browser if you go larger resolution. The small example runs already on low 20-30fps on my PC. Also, I don't think I will understand the code - heavy javascript. :)

Perhaps I can make something that it takes map data from GTA2 and projects it in browser (html). Perhaps also a simple look around function. This way, people can preview a map before downloading and don't need to install any program... of course you could also just view an image... haha
"Mmmm, your eyes are so beautiful."
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2WEB

Post by BenMillard »

Cuban-Pete wrote:Sorry!, but somehow the webpage looks perfectly in IE, but in firefox it has strange black lines here and there. I don't know how to fix that. If you happen to have an idea, please say so.
It's these ones:

Code: Select all

<img id="r90" src="textures/wil.sty/146.png"/>
Looks like you wanted to make cables from South to North. They need to be rotated 90° clockwise to join up. Look at the cable bracket in the South, it's wrong way around. Your code uses Microsoft proprietary feature to do this:

Code: Select all

filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); -webkit-transform: rotate(90deg); -moz-transform: rotate(90deg)
DXImageTransform won't work in other browsers. You'll have to make rotated version of the tile. The other proprietary versions of rotate might only be supported in certain versions; Firefox 2 doesn't do them for example.

This is why edges of the building, rooves and road are also not correct in Firefox.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2WEB

Post by Cuban-Pete »

I find it strange that there is no decent support for just rotating images. Making for each texture a turned one is almost 3x more file size - that needs to be downloaded. :?

If web browsers weren't such a pain in the butt, I would perhaps do more with this project...
"Mmmm, your eyes are so beautiful."
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA2WEB

Post by elypter »

yeah thats true. I don't know why the html standard is adapting so slowly to the present. I mean, why did we have to wait so long for a native support of video. videos are being put on websites for more than 10 years and even when developing the first html standard you could have predicted that video is going to be popular in the future. Same with WebGL. This would also have been possible since the existence of opengl and directx and there have been 3rd party attempts which never got popular.
Hm maybe some of the "brand new" features from html5 canvas is the solution.
yur sa'nok ngeyä
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2WEB

Post by BenMillard »

Those -*-transform properties are proposals for CSS3 Transformations/CSS3 Transitions. The standards effort is extremely slow, largely because the skills required to do it well aren't appreciated and so few people get funded to work on it.

It's literally about a roomful of people who are paid to drive W3C technologies. (I've been at the tables and mailing lists where this happens.)
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2WEB

Post by Cuban-Pete »

I somehow fixed the strange effects in firefox with

Code: Select all

font-size: 1px;
font-size: 1.0%;
I also added a small animation of a car, but also a mission/job - click the phone - try it out. :lol:

I reached highest score around 40, if you can beat that (without cheating somehow), you're very good. :D

http://lars.stonerocket.co.uk/gta2/gta2web/
gta2web_first_job.jpg
gta2web_first_job.jpg (67.3 KiB) Viewed 14939 times
//edit: small hint: just after the Zebra crossing you need to click again.
"Mmmm, your eyes are so beautiful."
User avatar
Gustavob
Immortal
Posts: 407
Joined: 18 May 2009, 21:40
GH nick: Gustavob
|Gustavob|
Location: Nowhere.
Contact:

Re: GTA2WEB

Post by Gustavob »

I've beaten your record :> Highest speed: 48
Highest Speed: 48
Highest Speed: 48
recordgta2web.png (223.9 KiB) Viewed 14936 times
Also, "LaBrat" is the SRS Scientists leader name, they call the player "THC-303"
You just lost the game.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2WEB

Post by Cuban-Pete »

Nice done! I once got 47, but that was luck. :)

Any advice on improving the game? Did you like it? Perhaps I can make another mini-game.
Gustavob wrote:Also, "LaBrat" is the SRS Scientists leader name, they call the player "THC-303"
I knew I was doing something wrong with names, but wasn't sure what. Thanks, for the tip - I will try to fix it later today.
"Mmmm, your eyes are so beautiful."
Post Reply