Page 1 of 1

GTA2WEB

Posted: 16 Sep 2010, 20:06
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.

Re: GTA2WEB

Posted: 16 Sep 2010, 20:18
by Gustavob
Looks cool, nice work 8-)

Re: GTA2WEB

Posted: 16 Sep 2010, 20:26
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:

Re: GTA2WEB

Posted: 16 Sep 2010, 20:48
by Razor
me :D gta2 mmorpg xDDDDd

Re: GTA2WEB

Posted: 16 Sep 2010, 21:18
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/

Re: GTA2WEB

Posted: 17 Sep 2010, 12:28
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

Re: GTA2WEB

Posted: 17 Sep 2010, 20:00
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.

Re: GTA2WEB

Posted: 18 Sep 2010, 07:42
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...

Re: GTA2WEB

Posted: 18 Sep 2010, 12:04
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.

Re: GTA2WEB

Posted: 18 Sep 2010, 12:33
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.)

Re: GTA2WEB

Posted: 18 Sep 2010, 19:40
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 17867 times
//edit: small hint: just after the Zebra crossing you need to click again.

Re: GTA2WEB

Posted: 18 Sep 2010, 20:53
by Gustavob
I've beaten your record :> Highest speed: 48
Highest Speed: 48
Highest Speed: 48
recordgta2web.png (223.9 KiB) Viewed 17864 times
Also, "LaBrat" is the SRS Scientists leader name, they call the player "THC-303"

Re: GTA2WEB

Posted: 19 Sep 2010, 07:58
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.