English game

Developer
Size
2,797 Kb
Views
6,072

How do I make an english game?

What is a english game? How do you make a english game? This script and codes were developed by Evgen Kaban on 07 January 2023, Saturday.

English game Previews

English game - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>English game</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <head> <meta charset="UTF-8"> <title>game</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
</head>
<body>
<div class="game"> <div class="game_field"> <div class="game_world">apple</div> </div> <div class="game_win_word_place"></div>
</div>
</body> <script src="js/index.js"></script>
</body>
</html>

English game - Script Codes CSS Codes

.game{ background-color: #D0D0D0; position: relative;
}
.game_win_word_place{ position: relative; position: absolute; background-color: #686868; width: 80px; height: 50px; left: 0px; top: 100px; color: white; font-size: 25px;
}
.game_field{ position: relative; position: absolute; background-color: #33CCFF; width: 400px; height: 300px; left: 100px; top: 100px;
}
.game_world{ position: relative; position: absolute; background-color: #CC66CC; padding: 2px 5px 2px 5px; color: white; font-size: 25px; border-radius: 8px; left: 100px; top: 10px;
}
.win_world{ background-color: green;
}
.game_world:hover{background-color: red;}

English game - Script Codes JS Codes

//var random = Math.floor((Math.random() * 400) + 1);
var width_of_game_field = $(".game_field" ).width();
var time_for_append_word = 2000;
var time_for_mowing_word = 1000;
var size_for_moving_word = 5;
function random_func(max_numb) { random = Math.floor((Math.random() * max_numb) + 1); //console.log(max_numb); return random; };
//$( ".game_field" ).append( $( "<div class='game_world'/>" ).css('left', random + 'px').html('123') );
var word_arr = ['apple', 'pen', 'news', 'film', 'woter'];
var key_word_arr = { apple: "яблоко", pen: "ручка", news: "новости", film: "фильм", woter: "вода", z: '25'
};
var previos_width_for_word = 50;
function append_word() { for (i = 0; i < 3; i++) { var random_width_of_field = random_func(width_of_game_field); while (previos_width_for_word<random_width_of_field+20) { random_width_of_field = random_func(width_of_game_field); }; previos_width_for_word = random_width_of_field; var random_height_of_field = random_func(100); var random_number_word = random_func(word_arr.length)-1 var random_world = word_arr[random_number_word]; var apending_word = $( "<div class='game_world'/>" ); apending_word = apending_word.css('left', random_width_of_field + 'px'); apending_word= apending_word.css('top', random_height_of_field+'px'); apending_word = apending_word.html(random_world); if ($('.win_world').length == 0) { apending_word = apending_word.addClass("win_world"); $( ".game_win_word_place" ).html(key_word_arr[random_world]);} $( ".game_field" ).append( apending_word); }
};
var timer_append_word = setInterval(append_word, time_for_append_word);
function mowing_word_func() { $( ".game_world" ).each(function() { var position = $( this ).position(); var position_top = position.top + size_for_moving_word ; if(position.top>$( ".game_field" ).height()){$( this ).remove();} //console.log(position.top); //console.log($( ".game_field" ).height()); $( this ).css('top', position_top + 'px'); });
}
var timer_mowing_word = setInterval(mowing_word_func, time_for_mowing_word);
//var timerId = setInterval(function() {console.log( "тик" );}, 5000);
/*
var random_width_of_field = random_func(width_of_game_field);
function append_word() { var random_number_word = random_func(word_arr.length)-1 var random_world = word_arr[random_number_word]; var apending_word = $( "<div class='game_world'/>" ); $( ".game_field" ).append( $( "<div class='game_world'/>" ).css('left', random_width_of_field + 'px').css('top', '0px').html(random_world) ); $( ".game_win_word_place" ).html(key_word_arr.random_world); console.log($('.win_world').length); if ($('.win_world').length == 0) { $( ".game_field" ).append( $( "<div class='game_world'/>" ).addClass("win_world").css('left', random_width_of_field + 'px').css('top', '0px').html(random_world)); $( ".game_win_word_place" ).html(key_word_arr[random_world]); }
function mowing_word_func() { //console.log('working') $( ".game_world" ).each(function( i ) { var top_koord = $(this).offset().top; top_koord= -0.0001; console.log($(this).offset().top); this.style.top = top_koord+"px"; });
}
var nweItem = $("<p>This is a new</p>");
$("#para2").html(newItem.html());
*/
English game - Script Codes
English game - Script Codes
Home Page Home
Developer Evgen Kaban
Username Evgen097
Uploaded January 07, 2023
Rating 3
Size 2,797 Kb
Views 6,072
Do you need developer help for English game?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Evgen Kaban (Evgen097) Script Codes
Name
Angular_templ_1
Fag_for_girls
CONTACT US
Slider
Welcome
Educenter
Bootstrap
Game 3
What we do 2
JQwery_add_class
Create amazing art & images with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!