lunes, 17 de enero de 2011

Casa abierta

El jueves 20 de Enero se va a presentar el juego ya acabado en la casa abierta de la universidad, por el edificio blanco a partir de 3 pm a 8 pm. Espero que vayan y apoyen el juego.

Terminacion del Juego

Queridos Compañeros de Taller Audiovisual, les escribo para informarles que el martes 18 de Enero se va a terminar y a entregar el juego , que si tienen hasta este dia para enviar las ultimas cosas que faltan. Cabe recalcar que supuestamente todo tenia que haber estado listo para el miercoles 12 de Enero, y al entregar todo atrasado me estan complicando mas la finalizacion del juego especialmente a mi .Ya que no era mi trabajo poner los diseños en el .fla pero igual lo estoy haciendo y me estoy asegurando que todo se vea lo mejor posible. Agradezco al equipo de facebook por toda la informacion que me dieron, ya que me sirvio bastante y a Ricardo y Valentina que fueron los unicos que me entregaron todo en el tiempo debido.

highscore en fb

CHICOS AQUI PUEDEN JUGAR

http://apps.facebook.com/gatoscanibales/

CODIGOS

Ship extends MovieClip
{
var velocity;
var shootLimiter;
var enemyTimer;
var miniBossTimer;
var powerUpTimer;
var bossCountdown;
var enemies;
var score;
var finalScore;
var health;
var kills;
var misses;
var shaking;
var shakeDuration;
var shield:MovieClip;
function onLoad()
{
_root.kongregateServices.connect();
_root.soundFX = new Sound();
_root.soundFX.attachSound("very_big_explosion.wav");
_root.soundFX.start();
_visible = false;
_root.gameOverMenu._visible = false;
_root.healthMeter._visible = false;
_root.enemyHealthMeter._visible = false;
_root.playMenu.playButton.onPress = function()
{
_root.ship.newGame();
}
}
function newGame()
{
_root.playMenu._visible = false;
_root.gameOverMenu._visible = false;
_root.enemyHealthMeter._visible = false;
kills = 0;
misses = 0;
velocity = 10;
shootLimiter = 0;
powerUpTimer = 0;
enemyTimer = 0;
miniBossTimer = 0;
bossCountdown = 2;
enemies = [];
score = 0;
_root.scoreText.text = score;
health = 100;
_root.healthMeter._visible = true;
_root.healthMeter.bar._xscale = 100;
_x = 300;
_y = 150;
_visible = true;
shield._visible = false;
shaking = false;
shakeDuration = 10;
_rotation = 0;
}
function onEnterFrame()
{
if(_visible == true)
{
if( Key.isDown(Key.LEFT) && _x > 40){ _x -= velocity; }
if( Key.isDown(Key.RIGHT) && _x < 560){ _x += velocity; }
if( Key.isDown(Key.UP) && _y > 20){ _y -= velocity; }
if( Key.isDown(Key.DOWN) && _y < 280){ _y += velocity; }
shootLimiter += 1;
if( Key.isDown(Key.SPACE) && shootLimiter > 8)
{
var missile = _root.attachMovie("Missile","Missile" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
missile._x = _x + 50;
missile._y = _y + 2;
shootLimiter = 0;
}
if(shaking == true){ shake(); }
if(shield._visible == true)
{
shield._alpha-= .5;
if(shield._alpha < 0)
{
shield._visible = false;
shield._alpha = 100;
}
}
enemyTimer += 1;
if(enemyTimer > 30)
{
enemyTimer = 0;
_root.attachMovie("EnemyShip", "EnemyShip" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
}
powerUpTimer += 1;
if(powerUpTimer > 30 * 10)
{
powerUpTimer = 0;
_root.attachMovie("PowerUp", "PowerUp" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
}
miniBossTimer += 1;
if(miniBossTimer == (30 * 30))
{
if(!_root.miniBoss)
{
if( bossCountdown == 0)
{
_root.attachMovie("Boss", "boss", _root.getNextHighestDepth());
}
else
{
_root.attachMovie("MiniBoss", "miniBoss", _root.getNextHighestDepth());

bossCountdown -= 1;
}
}
}
}
}
function updateScore(points)
{
score += points;
_root.scoreText.text = score;
}
function updateHealth(points)
{
if(_visible == true)
{
health += points;
_root.healthMeter.bar._xscale = health;
_root.soundFX.attachSound("small_explosion.wav");
_root.soundFX.start();
if(health <= 0)
{
health = 0;
_root.healthMeter.bar._xscale = health;
explode();
}
}
}
function explode()
{
var explosion = _root.attachMovie("Explosion","Explosion" + _root.getNextHighestDepth(),_root.getNextHighestDepth());
explosion._x = _x;
explosion._y = _y;
this._visible = false;
_root.soundFX.attachSound("very_big_explosion.wav");
_root.soundFX.start();
destroyAllEnemies();
gameOver();
}
function destroyAllEnemies()
{
for(var i = 0; i< enemies.length; i++)
{
enemies[i].explode();
}
}
function damageAllEnemies()
{
for(var i = 0; i< enemies.length; i++)
{
enemies[i].takeDamage();
}
}
function winGame()
{
_root.kongregateStats.submit("GameWon", 1);
_root.missionCompletedBanner.gotoAndPlay(2);
this._visible = false;
destroyAllEnemies();
gameOver();
}
function gameOver()
{
_root.gameOverMenu._visible=true;
_root.gameOverMenu.killBonus.text = kills + " x " + 100;
_root.gameOverMenu.hitBonus.text = Math.floor((kills/(misses + kills))*100) + " x " + 100;
finalScore = score + (kills * 100) + (Math.floor((kills/(misses + kills))*100)*100);
_root.gameOverMenu.finalScore.text = finalScore;
_root.kongregateScores.submit(finalScore);
_root.kongregateStats.submit("Kills", kills); /
_root.gameOverMenu.playAgainButton.onPress = function()
{
getURL("http://www.facebook.com/connect/prompt_feed.php?&message=Hice%20"+_root.gameOverMenu.finalScore.text+"%20puntos%20en%20el%20juego%20gatos%20canibales%20intenta%20superar%20mi%20puntaje: http://apps.facebook.com/gatoscanibales", "_blank");
}
_root.gameOverMenu.playAgainButton2.onPress = function()
{
_root.ship.newGame();
}
}
function initShake()
{
shaking = true;
shakeDuration = 10;
_rotation = 5;
}
function shake()
{
_rotation *= -1;
shakeDuration -= 1;
if(shakeDuration == 0)
{
shaking = false;
_rotation = 0;
}
}
}


EQUIPO Facebook
Andrea Arias
Josue Brito
Jorge Cucalon

miércoles, 5 de enero de 2011

programación

new score

include_once ("_data.php");
$conn = mysql_connect($db_host,$db_user,$db_pass);
mysql_select_db($db_name,$conn);

if ($pass==$add_pass) {

if ($u_user==1) {

$sql3 = "SELECT name FROM $db_table ORDER BY name";
$result3 = mysql_query($sql3);
while($r = mysql_fetch_object($result3))
{
$tmp = "{$r->name}";
if ($name==$tmp) {
$n_exist=1;

}
}
if ($n_exist==1) {
$sql1 = "UPDATE $db_table SET score='$score' WHERE name=\"$name\"";
$result1 = mysql_query($sql1);
} else {
$sql1 = "INSERT INTO $db_table (name,score) VALUES (\"$name\",\"$score\")";
$result1 = mysql_query($sql1);
}

} else {
$sql1 = "INSERT INTO $db_table (name,score) VALUES (\"$name\",\"$score\")";
$result1 = mysql_query($sql1);
}

$sql2 = "SELECT id FROM $db_table ORDER BY score DESC";
$result2 = mysql_query($sql2);

$num = 1;
while($r = mysql_fetch_object($result2))
{
$result = mysql_db_query($db_name,"SELECT * from $db_table WHERE id='{$r->id}'");
$resultArray = mysql_fetch_array($result);
$did = $resultArray["id"];
$name = $resultArray["name"];
$score = $resultArray["score"];
if ($num>$sec_size) {
$sql3 = "DELETE FROM $db_table WHERE id='$did'";
$result3 = mysql_query($sql3);
}
$num++;
}
}

mysql_close ($conn);
?>



get score


<=$sec_size) { $HTML = " " . $m_font . $num . " " . $m_font . $name . " " . $m_font . $score . " "; echo "$HTML"; } } else { if ($num<=$st_size) { if ($flash) { echo "&name$num=$name&score$num=$score"; } else { $HTML = " " . $m_font . $num . " " . $m_font . $name . " " . $m_font . $score . " "; echo "$HTML"; } $num++; } } } if (!$flash) { if ($sec==1) { $HTM_2 = " " . $t_font . "Top" . $st_size . " "; } else { $HTM_2 = " " . $t_font . "Top" . $sec_size . " "; } echo "$HTM_2"; } mysql_close ($conn); ?>




EQUIPO DE FACEBOOK

Andrea Arias
Josue Brito
Jorge Cucalon

Equipo Facebook

Chicos del equipo facebook, tienen hasta la próxima clase para traer TODO terminado, de lo contrario perderán.

Ultimo dia para entregar

Hola chicos, tenemos hasta este jueves, o sea mañana para que me manden los fondos para poder integrarlos al juego. Por favor mándenlos a mas tardar mañana al mediodía para poder hacer pruebas y no atrasarnos.

Gracias

oa

hola!!!! espero que hayan tenido un feliz año nuevos....

bueno... chicos este es el menu, noc si quieren que haga algunr retoque.. porfa necesito que me digas para mandarte el pdf. y que me confirme si le cambio la refranja en naranja..¿???