Skip to content

Commit

Permalink
Added texture system
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrc committed Nov 11, 2017
1 parent 6df1c4e commit c1929db
Show file tree
Hide file tree
Showing 20 changed files with 194 additions and 118 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Play the game [here][tuto].

[tuto]: http://www.jlabstudio.com/webgl/ejemplos/raycasting/tuto3/
[tuto]: http://www.jlabstudio.com/webgl/ejemplos/raycasting/tuto4/
50 changes: 1 addition & 49 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,12 @@
var map25d_ele = document.getElementById('map25d');
var minimap_ele = document.getElementById('minimap');

var fov_ele = document.getElementById('fov');
var fov_value_ele = document.getElementById('fov_value');
var fov_less = document.getElementById('fov_less');
var fov_more = document.getElementById('fov_more');

var rays_ele = document.getElementById('rays');
var rays_value_ele = document.getElementById('rays_value');
var rays_less = document.getElementById('rays_less');
var rays_more = document.getElementById('rays_more');

var fish_eye_ele = document.getElementById('fish_eye');

GAME.start(
60,
320,
640,
function (game) {
function buttons_action(range_element, increase) {
var value = parseInt(range_element.value);
range_element.value = increase ? Math.min(value + 1, range_element.max) : Math.max(value - 1, range_element.min);
update();
}

function update() {
var current_fov = fov_ele.value;
var current_rays = rays_ele.value;

fov_value_ele.innerText = current_fov;
rays_value_ele.innerText = current_rays;

game.updateCamera(current_fov, current_rays, fish_eye_ele.checked);
}

map25d_ele.appendChild(game.get25dCanvas());
minimap_ele.appendChild(game.getMiniMapCanvas());

fov_ele.addEventListener('change', function() { update(); });
fov_less.addEventListener('click', function() { buttons_action(fov_ele, false); });
fov_more.addEventListener('click', function() { buttons_action(fov_ele, true); });

rays_ele.addEventListener('change', function() { update(); });
rays_less.addEventListener('click', function() { buttons_action(rays_ele, false);});
rays_more.addEventListener('click', function() { buttons_action(rays_ele, true); });

fish_eye_ele.addEventListener('change', function() { update(); });

update();
}
);
}
Expand All @@ -68,13 +28,5 @@
<body>
<div id="map25d"></div>
<div id="minimap"></div>
<div>

<button id="fov_less">-</button><input id="fov" type="range" min="1" max="360" value="60" /><button id="fov_more">+</button> <span id ="fov_value"></span> - FOV
<br/>
<button id="rays_less">-</button><input id="rays" type="range" min="1" max="640" value="320" /><button id="rays_more">+</button> <span id ="rays_value"></span> - RAYS
<br>
<input id="fish_eye" type="checkbox" /> - Fish Eye
</div>
</body>
</html>
42 changes: 31 additions & 11 deletions js/Game.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,36 @@

(function(W) {

var Game = function(fov, rays) {
var Game = function(fov, rays, load_callback) {
var self = this;

this.resources = new JLAB.UTILS.Resources(
{
texture_1 : 'textures/1.GIF',
texture_5 : 'textures/5.GIF',
texture_7 : 'textures/7.GIF',
texture_13 : 'textures/13.GIF',
texture_9 : 'textures/9.GIF',
texture_11 : 'textures/11.GIF',
texture_17 : 'textures/17.GIF',
texture_19 : 'textures/19.GIF',
texture_21 : 'textures/21.GIF',
texture_2 : 'textures/2.png',
texture_23 : 'textures/23.GIF'
}
);

this._map = new GAME.Map();
this._player = new GAME.Player(
new JLAB.GEOMETRY.Vector2D(2, 2),
new JLAB.GEOMETRY.Vector2D(2, 55),
new JLAB.GEOMETRY.Vector2D(1, 0),
0.5,
0.2,
this._map
);

this._ray_casting = new GAME.RayCasting(
function (x, y) { return false === self._map.isWalkable(x, y); },
function (x, y) { return self._map.getTile(x, y); },
JLAB.UTILS.MATH.deg2Rad(fov),
rays
);
Expand All @@ -30,8 +48,13 @@

this._map25d_render = new GAME.Map25DRender(
this._map,
this._ray_casting
this._ray_casting,
this.resources.images
);

this.resources.load(function () {
load_callback.call(self);
});
};

Game.prototype = {
Expand All @@ -41,11 +64,6 @@
get25dCanvas : function () {
return this._map25d_render.getCanvas();
},
updateCamera : function (fov, num_rays, fish_eye) {
this._ray_casting._fov = JLAB.UTILS.MATH.deg2Rad(fov);
this._ray_casting._num_rays = num_rays;
this._ray_casting._fish_eye = fish_eye;
},
start : function() {
this._timer.start();
this._loop();
Expand Down Expand Up @@ -86,15 +104,17 @@
'js/Jlab/Input/Keyboard.js',
'js/Jlab/Utils/Math.js',
'js/Jlab/Utils/DeltaTimer.js',
'js/Jlab/Utils/Resources.js',
'js/Game/Map.js',
'js/Game/Player.js',
'js/Game/RayCasting.js',
'js/Game/MiniMapRender.js',
'js/Game/Map25DRender.js'
],
function() {
var game = new Game(fov, num_rays);
game.start();
var game = new Game(fov, num_rays, function () {
this.start();
});
callback(game);
}
);
Expand Down
87 changes: 57 additions & 30 deletions js/Game/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,63 @@
(function(GAME) {
var Map = function () {
this._scenario = [
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 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, 0,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[13,13,13,13,13,13,13,13,13,13,13,13,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
];
this._rows = this._scenario[0].length;
this._columns = this._scenario.length;
Expand Down
Loading

0 comments on commit c1929db

Please sign in to comment.