This is the original DOS version of the game Grand Theft Auto, or short GTA. It features great sound and top graphics. This first edition was released in 1997. The follow up title became all best seller as this original version. This demo version contains a good deal of gameplay from the fullversion. Drive around in the city and pretty much stay alive. Choose 'High Color VGA GTA' (do NOT choose '3DFX')!
License: Shareware Release Year: 1997
', 'url': '', 'gameName': 'Grand-Theft-Auto-GTA-Demo'},
success: function(response) {
var response = response;
// var responseClean = response.replace(/\"/g, "");
var responseClean = response.replace(/\\/g, "");
// console.log(responseClean);
$('#game_did_in').html(responseClean);
}
});
}
function toggleHowto() {
var howTo = document.getElementById("howTo-container");
if (howTo.style.display === "none") {
howTo.style.display = "block";
howTo.style.opacity = "1";
howTo.style.transition = "all 500ms";
} else {
howTo.style.display = "none";
howTo.style.opacity = "0";
}
}
// -80
// var postvari = "";
// console.log('postvari: ' + postvari);
if(screen_width < 780)
{ $('#walkthroughName').html('Walkthrough Video');}
var load_gamewidth = $("#large_flash_game_box").width();
var offsetW_load_gamewidth = $("#gameholder").offSetWidth;
console.log("large_flash-gamebox width: " + load_gamewidth + "offsetW is: " + offsetW_load_gamewidth);
console.log("screen_height: " + screen_height);
var load_gamewidth = $("#large_flash_game_box").width();
var gamemid_height = (load_gamewidth / gratio); //-90
var gawidth = Math.round(gamemid_height * gratio);
if (gamemid_height >= screen_height) {gamemid_height = screen_height};
$(window).bind("load", function () {
var load_gamewidth = $("#large_flash_game_box").width();
var gamemid_height = (load_gamewidth / gratio );
var screen_height_minus = screen_height - 170;
var screen_height_minusSmallDev = screen_height - 400;
if (gamemid_height >= screen_height) {gamemid_height = screen_height - 60};
if (screen_width > 1199.95)
{
$('#gameholder').width('100%');
$('#gameholder').height('100%');
$('#large_flash_game_box').height('100%');
$('#adsContainer').width('100%');
$('#adsContainer').height('100%');
}
else {
$('.garightau').remove();
$('.garightau_alt').remove();
$('.gright').remove();
$('.galeft').remove();
$('#gameholder').height(gamemid_height +"px");
$('#gameholder').css('max-width', screen_width);
$('.gmiddle').width(screen_width);
$('#adsContainer').width('100%');
$('#adsContainer').height('100%');
}
console.log("gawidth: " + gawidth);
console.log("window.innerWidth: " + window.innerWidth);
console.log("window.innerHeight: " + window.innerHeight);
console.log("$(window).width(): " + $(window).width());
console.log("$(window).height(): " + $(window).height());
});
if(screen_width < 1560){
$('.garightau_alt').remove();
}
else {
$('.garightau').remove();
$('.gright').remove();
}
let portrait = window.matchMedia("(orientation: portrait)");
portrait.addEventListener("change", function(e) {
if(e.matches) {
var pm_screen_width = $(window).innerWidth();
var pm_screen_height = $(window).innerHeight();
// Portrait mode
$('#gameholder').css('max-width', '100%');
$('.underGwagon').css('max-width', '100%');
$('.gmiddle').css('max-width', '100%');
$('.gmiddle').width(pm_screen_width);
$('.underGwagon').width(pm_screen_width);
$('.rresp').width(pm_screen_width);
console.log("landscape change to portrait detected");
} else {
var lm_screen_width = $(window).innerWidth();
var lm_screen_height = $(window).innerHeight();
// Landscape
$('#gameholder').css('max-width', '100%');
$('.gmiddle').css('max-width', '100%');
$('.gmiddle').width(lm_screen_width);
$('.underGwagon').width(lm_screen_width);
$('.rresp').width(lm_screen_width);
console.log("portrait change to landscape detected");
}
})
screen.orientation.addEventListener("change", function(e) {
var gamemid_height = (load_gamewidth / gratio );
if (gamemid_height >= screen_height) {gamemid_height = screen_height - 60};
var gawidth = Math.round(gamemid_height * gratio);
// if (gamemid_height <= 320){
// gamemid_height = 320;
// }e
var new_screen_width = $(window).innerWidth();
var new_screen_height = $(window).innerHeight();
if(new_screen_width <= 1200) {
$('.underGwagon').height('fit-content');
$('.underGwagon').width('100vw');
$('.underGwagon').css('max-width', '100vw');
$('.rresp').height('fit-content');
//new_screen_width and height turned over is right:
$('#gameholder').height(new_screen_height);
$('#gameholder').width(new_screen_width);
$('#adContainer').height('100%');
$('.gfooter').css('max-width', new_screen_width);
$('.desc').css('max-width', new_screen_width);
$('.desc_inner').css('max-width', new_screen_width);
$('.desc_innerFooter').css('max-width', new_screen_width);
}
console.log("orientationchange, appeared");
});
$(window).bind("resize", function () {
if(document.fullscreen)
{
var gawidth = $(window).width();
var gamemid_height = $(window).height();
}
else {
var game_width_rez = $("#large_flash_game_box").width();
var game_height_rez = (game_width_rez / gratio);
if (game_height_rez >= screen_height) {game_height_rez = screen_height - 60};
if (screen_width > 1200)
{
$('#gameholder').height(gamemid_height);
$('#gameholder').width(new_screen_width);
}
else {
var new_screen_width = $(window).width();
var gamemid_height = (load_gamewidth / gratio );
var screen_height_minus = screen_height - 170;
var screen_height_minusSmallDev = screen_height - 430;
if (gamemid_height >= screen_height) {gamemid_height = screen_height - 60};
var gawidth = Math.round(gamemid_height * gratio);
if(isMobile_simp || isIOS_simp){
$('#gameholder').height('calc(100vh - 65px)');
$('#gameholder').width('100%');
} else {
$('#gameholder').height(gamemid_height);
$('#gameholder').width(new_screen_width);
}
}
}
});
function onResize(){
var new_screen_width = $(window).width();
$('#gameholder').height(gamemid_height + 'px');
$('#gameholder').width(gawidth + 'px');
$('#adContainer').height(gamemid_height + 'px');
$('#adContainer').width(gawidth + 'px');
}
$(document).ready(function() {
if (screen_width > 1200)
{
$('#gameholder').width('100%');
$('#gameholder').height('100%');
$('#pregamediv').width('100%')
$('#pregamediv').height('100%')
$('#adsContainer').width('100%');
$('#adsContainer').height('100%');
$('lite-youtube').height('405px');
$('lite-youtube').width('720px');
console.log("gamemid_height: " + gamemid_height + ", gamewidth: " + gawidth);
}
else {
if( (screen_width < screen_height) && (screen_width < 500)) {
$('#gameholder').height('calc(50vh)');
$('#gameholder').css('min-height', '25vh')
} else {
$('#gameholder').height('25vh');
}
$('#adsContainer').height('100%');
$('#adContainer').height('100%');
$('#adContainer').width(gawidth + 'px');
}
// $('#splashScreen').css('display','block');
$('#splashScreen').css('display','flex');
AdjustAdSize();
})
var fulgo = document.getElementById("gameholder");
var fulgoMobad = document.getElementById("adContainer");
var adcon =document.getElementById("adContainer");
if (isMobile.phone || isIOS_simp || isMobile_simp) {
console.log("mobileph.");
var gotoPlayBut = document.getElementById("gotoPlayBut");
if(gotoPlayBut){
if (browserLang.flat().includes('es'))
{ document.getElementById("gotoPlayBut").value="Jugar un Juego";
} else if (browserLang.flat().includes('de'))
{ document.getElementById("gotoPlayBut").value="Spiel Starten";
} else if (browserLang.flat().includes('fr'))
{ document.getElementById("gotoPlayBut").value="Jouer à un Jeu";}
else if (browserLang.flat().includes('pt'))
{ document.getElementById("gotoPlayBut").value="Jogando";}
else { document.getElementById("gotoPlayBut").value="Play Now";}
}
var load_gamewidth = $("#large_flash_game_box").width();
var gamemid_height = (load_gamewidth / gratio );
var screen_height_minus = screen_height - 170;
var screen_height_minusSmallDev = screen_height - 400;
if (gamemid_height >= screen_height) {gamemid_height = screen_height - 60};
var gawidth = Math.round(gamemid_height * gratio);
// if (gamemid_height <= 320){
// gamemid_height = 320;
// }
$('#gameholder').height('calc(100vh - 65px)');
//switch to mobile
// $('#gameholder').height(gamemid_height + 'px');
// $('#gameholder').width(gawidth + 'px');
$('#gameholder').width('100%');
$('#adContainer').width(gawidth + 'px');
// $('.tabsundergame').width(gawidth + 'px');
$('#adContainer').height('100%');
function StartToShowAd(){
$('#splashScreen').css('display', 'none');
$('#splashScreen').hide();
$('#loadingScreen').css('display', 'block');
$('.tabsundergame').hide();
$('#barInfo').hide();
// $('#adContainer').width(gawidth);
$('#adContainer').width('100%');
$('#adContainer').height('100%');
$('#adsContainer').height('100%');
$('#gameholder').height('calc(100vh)');
$('#gameholder').width('calc(100vh)');
//switch to mobile
//$('#gameholder').height(gamemid_height);
$('#pregamediv').width('100%');
$('#pregamediv').height('100%');
$('#game_did').width('100%');
$('#game_did').height('100%');
//switch to mobile
// $('#gameholder').width(gawidth);
openFullscreen();
if (document.fullscreenElement) {
$('#adContainer').width('100%');
$('#adContainer').height('100%');
$('#adsContainer').width('100%');
$('#adsContainer').height('100%');
}
gogo.ad.show();
}
function SkipAdAndShowGame(){
showGame();
}
function AdjustAdSize(){
// $('#gameholder').width(gawidth); 23-03
$('#gameholder').width('100%');
// $('#gameholder').height('calc(100vh - 62px)');
//switch to mobile
//$('#gameholder').height(gamemid_height);
$('#pregamediv').width('100%');
$('#pregamediv').height('100%');
// $('#game_middle').width($('#pregamediv').width());
}
function showGame(){
$("#pregamediv").hide();
$("#game_did").show();
ajaxGame();
var fbframe = $('#fbframe');
fbframe.attr("src", fbframe.data("src"));
$.getScript("https://apis.google.com/js/platform.js");
var fileType = "5";
if(isMobile.phone || screen_width <= 750 || oversize == 1 || isIOS_simp || isMobile_simp) {
openFullscreen();
}
if (document.fullscreenElement) {
var gawidth = '100%';
var gamemid_height = '100%';
}
var css = {
'width' : gawidth,
'height' : gamemid_height,
'padding' : 0,
'margin' : '0 auto',
'left': 0,
// 'position': 'static',
'z-index' : 0,
'display' : 'block'
};
var getup = {
'display' : 'block'
};
if (document.fullscreenElement) {
$('.tabsundergame').hide();
$('#barInfo').hide();
}
else {
// $('.tabsundergame').css('display', 'flex');
}
$("#game_did").css('height', '100%');
$("#game_did").css('width', '100%');
$('#adContainer').css('display', 'none');
$("#game_did").show();
$('#pregamediv').css('display', 'none');
$('#gameSource').css(getup);
$('#game_did').css('filter', 'none');
if (document.fullscreenElement || isMobile_simp || isIOS_simp || isMobile.phone) {
$('#game_did').width('100%');
$("#game_did").height('calc(100vh)');
}
else {
$('#game_did').width('100%');
$('#game_did').height('calc( 100vh - 60px )');
$('.tabsundergame').show();
}
}
function ReplayGame(){
document.getElementById('game_did').innerHTML=$("#game_did").html();
}
$('#game_did').height('100%');
// function init(){
// adConfig({
// preloadAdBreaks: 'on',
// onReady: tryPreloader
// });
// }
function StartToShowPlace(){
$('#splashScreen').css('display', 'none');
$('#splashScreen').hide();
$('#loadingScreen').css('display', 'block');
$('.tabsundergame').hide();
$('#barInfo').hide();
// $('#adContainer').width(gawidth);
$('#gameholder').height('100%');
//switch to mobile
//$('#gameholder').height(gamemid_height);
$('#pregamediv').width('100%');
$('#pregamediv').height('100%');
$('#game_did').width('100%');
$('#game_did').height('100%');
$('#gameholder').width('100%');
//switch to mobile
//$('#gameholder').width(gawidth);
openFullscreen();
console.log('starttoshowplac');
if (document.fullscreenElement) {
$('#game_did').width('100%');
$('#game_did').height('calc(100%)');
}
openPreloader();
}
var splashScreen;
var playButtonPreroll;
playButtonPreroll = document.getElementById('gotoPlayBut');
// playButtonPreroll.addEventListener('click', StartToShowAd);
splashScreen = document.getElementById('splashScreen');
splashScreen.addEventListener('click', showGame);
// show splashscreen everyb
$("#pregamediv").show();
var splashScreen;
var playButtonPreroll;
playButtonPreroll = document.getElementById('gotoPlayBut');
splashScreen = document.getElementById('splashScreen');
splashScreen.addEventListener('click', showGame );
$('#game_did').width('100%');
$('#game_did').height('calc( 100% - 45px )');
console.log("no, i am here");
// end of mobile
}
else {
if (browserLang.flat().includes('es'))
{ document.getElementById("gotoPlayBut").value="Jugar un Juego";
} else if (browserLang.flat().includes('de'))
{ document.getElementById("gotoPlayBut").value="Spiel Starten";
} else if (browserLang.flat().includes('fr'))
{ document.getElementById("gotoPlayBut").value="Jouer à un Jeu";}
else if (browserLang.flat().includes('pt'))
{ document.getElementById("gotoPlayBut").value="Jogando";}
else { document.getElementById("gotoPlayBut").value="Play Now";}
if (screen_width > 1200)
{
$('#gameholder').width('100%');
$('#gameholder').height('100%');
$('#game_did').height('calc( 100% - 45px )');
$('#adsContainer').width('100%');
$('#adsContainer').height('100%');
console.log("gamemid_height: " + gamemid_height + ", gamewidth: " + gawidth);
}
else {
if(isMobile_simp || isIOS_simp){
$('#gameholder').height(screen_height_minus + "px");
$('#gameholder').width('100%');
} else {
$('#gameholder').height(gamemid_height + 'px');
$('#gameholder').width(gawidth + 'px');
}
$('#adContainer').width(gawidth + 'px');
// $('.tabsundergame').width(gawidth + 'px');
$('#adContainer').height('100%');
}
function StartToShowAd(){
$('#splashScreen').css('display', 'none');
$('#splashScreen').remove();
$('#loadingScreen').css('display', 'block');
if (screen_width > 1200)
{
$('#adContainer').height('100%');
$('#adContainer').width('100%');
}
else {
// $('#adContainer').width(gawidth);
$('#adContainer').width('100%');
// $('#adContainer').height(gamemid_height);
$('#adContainer').height('100%');
// $('#adsContainer').height(gamemid_height);
$('#adsContainer').height('100%');
if(isMobile_simp || isIOS_simp){
$('#gameholder').height('calc(100vh - 60px)');
$('#gameholder').width('100%');
} else {
$('#gameholder').height(gamemid_height + 'px');
$('#gameholder').width(gawidth + 'px');
}
$('#pregamediv').width('100%');
$('#pregamediv').height('100%');
$('#game_did').width('100%');
$('#game_did').height('100%');
}
if(isMobile.phone || screen_width <= 750 || isMobile_simp || isIOS_simp) {
openFullscreen();
}
if (document.fullscreenElement) {
$('#adContainer').width('100%');
$('#adContainer').height('100%');
$('#adsContainer').width('100%');
$('#adsContainer').height('100%');
}
gogo.ad.show();
//PreRollAd.start(); // for prerollad.js
}
function SkipAdAndShowGame(){
showGame();
}
function AdjustAdSize(){
if (screen_width > 1200)
{
$('#pregamediv').width('100%');
$('#pregamediv').height('100%');
}
else {
console.log('just know, i am here');
$('#gameholder').width('100%');
$('#gameholder').height('100%');
$('#pregamediv').width('100%');
$('#pregamediv').height('100%');
}
}
function showGame(){
//console.log("function: showGame");
$("#pregamediv").hide();
$("#game_did").show();
ajaxGame();
var fbframe = $('#fbframe');
fbframe.attr("src", fbframe.data("src"));
// $.getScript("https://apis.google.com/js/platform.js");
if (document.fullscreenElement) {
var gawidth = '100%';
var gamemid_height = '100%';
}
var css = {
'width' : gawidth,
'height' : gamemid_height,
'padding' : 0,
'margin' : '0 auto',
'left': 0,
// 'position': 'static',
'z-index' : 0,
'display' : 'block'
};
var getup = {
'display' : 'block'
};
$('.tabsundergame').css('display', 'flex');
$('#adContainer').css('display', 'none');
$("#game_did").show();
$('#pregamediv').css('display', 'none');
$('#gameSource').css(getup);
$('#game_did').css('filter', 'none');
$('#game_did').width('100%');
if(document.fullscreenElemnt) {
$('#game_did').height('calc( 100% )');
} else {
$('#game_did').height('calc( 100% - 45px )');
}
// $('#gameholder').width(gawidth);
}
function ReplayGame(){
document.getElementById('game_did').innerHTML=$("#game_did").html();
}
// var script_taggo = document.createElement('script');
// script_taggo.setAttribute('type', 'text/javascript');
// script_taggo.setAttribute('src', 'https://www.gamegab.com/templates/default/files/gogoafg.js');
// script_taggo.onerror = function() { console.log("Loading gogoafg failed!");
// }
// document.getElementsByTagName('head')[0].appendChild(script_taggo);
// if($fileType == "7"):
var currentURLToUse;
currentURLToUse = location.href;
function StartToShowPlacem(){
init();
$('#splashScreen').css('display', 'none');
$('#splashScreen').hide();
$('#loadingScreen').css('display', 'block');
$('.tabsundergame').hide();
$('#barInfo').hide();
// $('#adContainer').width(gawidth);
// $('#gameholder').height(gamemid_height);
$('#game_did').width('100%');
$('#game_did').height('calc(100% -45px)');
$('#gameholder').width(gawidth);
if (document.fullscreenElement) {
$('#game_did').width('100%');
$('#game_did').height('calc(100%)');
}
$('#game_did').show();
}
var splashScreen;
var playButtonPreroll;
playButtonPreroll = document.getElementById('gotoPlayBut');
// playButtonPreroll.addEventListener('click', StartToShowAd);
splashScreen = document.getElementById('splashScreen');
splashScreen.addEventListener('click', showGame);
// else:
// $.getScript('https://www.gamegab.com/templates/default/files/gogoafg.js');
// $("#game_did").hide();
// var splashScreen;
// var playButtonPreroll;
// playButtonPreroll = document.getElementById('gotoPlayBut');
// // playButtonPreroll.addEventListener('click', StartToShowAd);
// splashScreen = document.getElementById('splashScreen');
// splashScreen.addEventListener('click', StartToShowAd);
// console.log("donehererer");
// endif;
}