Version 0.2a

This commit is contained in:
Guillaume DE LA RUE 2011-02-13 06:19:58 +01:00
parent c5bd7ecfe1
commit c02cd9cdd7
123 changed files with 439 additions and 8718 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/conf/local.conf

View file

@ -1,74 +0,0 @@
# Listen for www
server {
# Config APP paths
set $root_path /Users/delarueguillaume/Sites/wyrian/wyrian/guiltouf;
# Server Config
listen 80;
server_name wyrian.socialmixmedia.fr;
access_log /var/log/nginx/wyrian.access.log;
# Set the max size for file uploads to 50Mb
client_max_body_size 50M;
location / {
root $root_path;
index index.php index.html index.htm;
# needed to forward user's IP address to rails
proxy_set_header X-Real-IP $remote_addr;
# needed for HTTPS
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_max_temp_file_size 0;
# sitemap generator
if ( $request_uri ~* ^/sitemap.xml ) {
rewrite ^(.*)$ /sitemap.php;
}
# Rewrite non static files request to /index.php
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?q=$1;
}
}
# Send php scripts to fastcgi
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $root_path/$fastcgi_script_name;
include fastcgi_params;
}
# Set long expireation date and no log access
location ~* ^.+\.(jpg|jpeg|gif|png|css|js)$ {
root $root_path;
access_log off;
expires 30d;
}
# Link common to core statics directly
location ^~ /common/ {
alias /Users/delarueguillaume/Sites/Framework-Web2ajaX/core/statics/;
access_log off;
expires 30d;
}
# Link to minify
location ^~ /min/ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /Users/delarueguillaume/Sites/Framework-Web2ajaX$fastcgi_script_name;
fastcgi_param WWW_PATH /Users/delarueguillaume/Sites/wyrian/wyrian;
include fastcgi_params;
}
# Deny access to protected dirs
location ~ ^/nginx-conf/(.*)$ { deny all; }
location ~ /\.ht { deny all; }
}

View file

@ -1,45 +1,166 @@
#background { /* BASICS */
.orbitron {
font-family: 'Orbitron', serif;
font-style: normal;
font-weight: 400;
text-shadow: none;
text-decoration: none;
text-transform: none;
letter-spacing: 0em;
word-spacing: 0em;
line-height: 1.2;
}
.container {
width: 100%;
height: 100%;
}
.container .layout {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: black;
position: absolute; position: absolute;
display: block;
top: 0; top: 0;
right: 0; right: 0;
overflow: hidden;
}
#background {
background: transparent url(/images/debug-bg.jpg) repeat 0 0;
z-index: 0; z-index: 0;
} }
#ground { #ground { z-index: 30; }
width: 100%; #game { z-index: 60; }
height: 100%;
/* The Ship */
#game #ship {
position: absolute; position: absolute;
display: none;
top:0; top:0;
right: 0; left:0;
z-index: 30; background: transparent;
} }
#game { #ship .wing {
width: 100%;
height: 100%;
position: absolute; position: absolute;
top: 0; top:33px;
right: 0; left:6px;
z-index: 60; display: block;
width: 70px;
height: 55px;
background: transparent url(/images/sprites/wings_eagle_sprite.png) no-repeat 0 0;
} }
#ship .wing.right { left: 83px; background-position: right 0; }
#ship .ship-body {
position: absolute;
display: block;
top: 20px;
left: 0;
width: 154px;
height: 137px;
background: transparent url(/images/sprites/spaceship_body.png) no-repeat 0 0;
}
#ship .ship-canon {
position: absolute;
display: block;
top:0;
left: 71px;
width: 18px;
height: 40px;
background: transparent url(/images/sprites/weapon_pilot.png) no-repeat 0 0;
}
#ship .ship-foray {
position: absolute;
display: block;
top:30px;
left: 117px;
width: 19px;
height: 33px;
background: transparent url(/images/sprites/weapon_foray.png) no-repeat 0 0;
}
#ship .ship-foray.right {
background-position: right 0;
left: 24px;
}
#ship .ship-reactor {
position: absolute;
display: block;
background: transparent url(/images/sprites/reactor_drum.png) no-repeat 0 0;
top:85px;
left:72px;
width: 15px;
height: 14px;
}
#ship .ship_reactor_fire {
position: absolute;
display: block;
background: transparent url(/images/sprites/reactor_fire_sprite.png) no-repeat 0px 0;
top:88px;
left: 58px;
width: 44px;
height: 68px;
}
/* Ennemies */
/*#game .ennemy { border: 1px solid blue; } */
/* The HUD */
#hud { #hud {
width: 100%;
height: 100%;
position: absolute;
top: 0;
right: 0;
z-index: 90; z-index: 90;
} }
#ship { #hud #score {
width: 100px; font-size:36px;
height: 100px; text-transform: uppercase;
color:#fff;
font-weight: bold;
text-shadow: 0 0 5px rgba(115, 171, 255, 0.4) ;
position: absolute; position: absolute;
top: 50%; display: block;
left: 50%; top:20px;
background: white; right: 30px;
}
#hud #activeElements {
font-size:13px;
text-transform: uppercase;
color:#fff;
font-weight: bold;
text-shadow: 0 0 5px rgba(115, 171, 255, 0.4) ;
position: absolute;
display: block;
top:100px;
right: 30px;
}
#hud #fpsCounter {
font-size:20px;
text-transform: uppercase;
color:#fff;
font-weight: bold;
text-shadow: 0 0 5px rgba(115, 171, 255, 0.4) ;
position: absolute;
display: block;
top:67px;
right: 30px;
}
/* Debug Panel */
#debug {
position: absolute;
display: block;
right: 10px;
top: 10px;
color:#fff;
z-index: 1000;
} }

View file

@ -1,145 +0,0 @@
/* BASICS */
.orbitron {
font-family: 'Orbitron', serif;
font-style: normal;
font-weight: 400;
text-shadow: none;
text-decoration: none;
text-transform: none;
letter-spacing: 0em;
word-spacing: 0em;
line-height: 1.2;
}
.container {
width: 100%;
height: 100%;
}
.container .layout {
width: 100%;
height: 100%;
position: absolute;
display: block;
top: 0;
right: 0;
overflow: hidden;
}
#background {
background: transparent url(/images/debug-bg.jpg) repeat 0 0;
z-index: 0;
}
#ground { z-index: 30; }
#game { z-index: 60; }
/* The Ship */
#game #ship {
position: absolute;
display: none;
top:0;
left:0;
background: transparent;
}
#ship .wing {
position: absolute;
top:33px;
left:6px;
display: block;
width: 70px;
height: 55px;
background: transparent url(/images/sprites/wings_eagle_sprite.png) no-repeat 0 0;
}
#ship .wing.right { left: 83px; background-position: right 0; }
#ship .ship-body {
position: absolute;
display: block;
top: 20px;
left: 0;
width: 154px;
height: 137px;
background: transparent url(/images/sprites/spaceship_body.png) no-repeat 0 0;
}
#ship .ship-canon {
position: absolute;
display: block;
top:0;
left: 71px;
width: 18px;
height: 40px;
background: transparent url(/images/sprites/weapon_pilot.png) no-repeat 0 0;
}
#ship .ship-foray {
position: absolute;
display: block;
top:30px;
left: 117px;
width: 19px;
height: 33px;
background: transparent url(/images/sprites/weapon_foray.png) no-repeat 0 0;
}
#ship .ship-foray.right {
background-position: right 0;
left: 24px;
}
#ship .ship-reactor {
position: absolute;
display: block;
background: transparent url(/images/sprites/reactor_drum.png) no-repeat 0 0;
top:85px;
left:72px;
width: 15px;
height: 14px;
}
#ship .ship_reactor_fire {
position: absolute;
display: block;
background: transparent url(/images/sprites/reactor_fire_sprite.png) no-repeat -88px 0;
top:88px;
left: 58px;
width: 44px;
height: 68px;
}
#element_0 {
border:2px solid green;
}
/* Ennemies */
/*#game .ennemy { border: 1px solid blue; } */
/* The HUD */
#hud {
z-index: 90;
}
#hud .score {
font-size:36px;
text-transform: uppercase;
color:#fff;
font-weight: bold;
text-shadow: 0 0 5px rgba(115, 171, 255, 0.4) ;
position: absolute;
display: block;
top:20px;
right: 30px;
}
/* Debug Panel */
#debug {
position: absolute;
display: block;
right: 10px;
top: 10px;
color:#fff;
z-index: 1000;
}

View file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

View file

@ -1,36 +0,0 @@
<!doctype html>
<html>
<head>
<link rel="stylesheet" media="all" href="css/style.css" />
<link href="http://fonts.googleapis.com/css?family=Orbitron:400,500,700,900" rel="stylesheet" type="text/css" >
</head>
<body>
<div id="debug">
</div>
<div class="container" id="GameContainer">
<div id="background" class="layout"></div>
<div id="ground" class="layout"></div>
<div id="game" class="layout">
<div id="ship">
<div class="ship-canon"></div>
<div class="ship_reactor_fire" id="ship_reactor"></div>
<div class="ship-reactor"></div>
<div class="ship-foray left"></div>
<div class ="ship-foray right"></div>
<div class="ship-body"></div>
<div class="wing left"></div>
<div class="wing right"></div>
</div>
</div>
<div id="hud" class="layout">
<div class="score orbitron">Score : <span>0</span></div>
</div>
</div>
<script type="text/javascript" src="js/jquery-1.5.js"></script>
<script type="text/javascript" src="js/require.js"></script>
<script type="text/javascript" src="js/GameClass.js"></script>
<script type="text/javascript" src="js/Wyrian.js"></script>
</body>
</html>

View file

View file

@ -1,76 +0,0 @@
/**************************************************************************
* Init Game Bootstrap
***************************************************************************/
Wyrian = new app({
'libs': [
'order!jquery.transform-0.9.3.min',
'order!LayoutClass'
],
'layers': [
'order!layouts/BgLayer',
'order!layouts/PlayerLayer',
'order!layouts/Ennemies'
],
'wrapper': $('#GameContainer')
}) ;
// Init Application and bind all games events
jQuery(document).ready(function() {
/**************************************************************************
* Load Dependencies & Create Application
***************************************************************************/
require({
baseUrl: "/js/",
urlArgs: "bust=" + Wyrian.version
}, Wyrian.settings.libs,
// -- All objects are loaded => can run
function() {
// -- Init Stage or show IE popup
if ( ! $.browser.msie ) {
Wyrian.init() ;
} else {
$.facebox.settings.opacity = 0.8 ;
$.facebox.settings.closeImage = '/common/img/facebox/apple-close.png' ;
$(document).unbind('close.facebox') ;
$.facebox({ajax: '/popup-ie/'}, 'popup-ie' ) ;
}
}
);
/**************************************************************************
* Game Controls Events
***************************************************************************/
// -- Game is loaded
$(document).bind('gameLoaded', function(e, res) {
if ( timers.loopGame ) clearInterval(timers.loopGame) ;
timers.loopGame = setInterval(Wyrian.loopAnimation, 1000/FPS) ;
});
// -- Init Game
$(document).bind('gameInit', function(e, res) {
$(document).trigger('gameReset') ;
}) ;
// -- Game Reset
$(document).bind('gameReset', function(e, res) {
}) ;
// -- Start Animation
$(document).bind('gameStart', function(e, res) {
}) ;
// -- On Complete Launch
$(document).bind('gameComplete', function(e, res) {
}) ;
}) ;

File diff suppressed because it is too large Load diff

View file

@ -1,44 +0,0 @@
// -- Init the Background DIV
Layouts.Ennemies = new Layout({
// -- Define elements to draw with options
el: [],
// -- Define current Speed
speed: 7,
direction: 1,
// -- Define canvas parent
dom: $('div#game')
}) ;
// -- Create a random ennemy
Layouts.Ennemies.createRandom = function(opts) {
var self = this ;
var bulletConf = {
name: 'ennemy',
type: 'alien',
width: 60,
height: 60,
power: 40,
imageSrc: '/images/bullet-electric-sprite.png',
sprites: [0,1,2],
speed: Math.round(Math.max(10, Math.random()*20)),
direction: 1,
origin: {x:Math.round(Math.random()*self.width), y:Math.round(-Math.random()*self.height)},
explode: function(obj) {
},
animate: function (obj) {
obj.y += obj.settings.speed*obj.settings.direction ;
if ( obj.y > obj.parent.height+obj.height ) {
obj.x = Math.round(Math.random()*self.width)
obj.y = Math.round(-Math.random()*self.height) ;
}
}
} ;
this.els.push(this.createObj(bulletConf)) ;
} ;

View file

@ -1,47 +0,0 @@
var keys = {};
function controlship() {
for (var i in keys) {
//a pressed
if (i == 65) {
$('#ship').css('left', (parseInt($('#ship').css('left'),10) - 10) + 'px');
}
// s pressed
if (i == 83) {
$('#ship').css('top', (parseInt($('#ship').css('top'),10) + 10) + 'px');
}
// d pressed
if (i == 68) {
$('#ship').css('left', (parseInt($('#ship').css('left'),10) + 10) + 'px');
}
// w pressed
if (i == 87) {
$('#ship').css('top', (parseInt($('#ship').css('top'),10) - 10) + 'px');
}
}
}
$(document).keydown(function (evt) {
var code = evt.keyCode || evt.which;
keys[code] = true;
});
$(document).keyup(function (evt) {
var code = evt.keyCode || evt.which;
delete keys[code];
});
function onTimerTick() {
controlship();
}
setInterval(onTimerTick, 33); // 33 milliseconds = ~ 30 frames per sec

View file

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View file

@ -1,7 +0,0 @@
resize:
rm -fr sprites && mkdir sprites
for i in fullsize/*; do \
convert -resize 15% $$i $${i/fullsize/sprites}; \
done

BIN
images/bg-space.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View file

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View file

Before

Width:  |  Height:  |  Size: 8 KiB

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 949 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 961 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,001 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View file

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View file

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View file

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View file

Before

Width:  |  Height:  |  Size: 302 KiB

After

Width:  |  Height:  |  Size: 302 KiB

View file

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View file

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

View file

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View file

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View file

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 105 KiB

View file

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

View file

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

View file

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 103 KiB

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View file

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View file

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 726 B

Some files were not shown because too many files have changed in this diff Show more