|
-
Rate My Game,plz fill the questioner
I made a flash game,and need questioner result for this game
my game need minimum flash player 6,and is designed for PDA
please fill the questioner:
1.What is your judgement about the interactivity?
a.very good b.good c.standard d.less e.bad
2.The Control of the game ?
a.very good b.good c.standard d.less e.bad
3.Concept of the game
a.very good b.good c.standard d.less e.bad
4.menu design and interface
a.very good b.good c.standard d.less e.bad
5.Character design
a.very good b.good c.standard d.less e.bad
6.Story
a.very good b.good c.standard d.less e.bad
7.Level Of dificulty
a.hard b.normal c.easy
8.Overall Judgement
a.very good b.good c.standard d.less e.bad
how to play:
Main Game: just Like zelda, you can interact by making a collision with an NPC,and can do conversation, after collision,move away from the NPC,or the conversation is repeated over and over again, use space bar to read all the conversation,there are 3 npc that gives quest, there are quest 4 and 5 ,you can acsess quest 4 and 5 after collecting 25000 gold
The mini game (quest):
1.apple catch : catching apple using up and down button,the apple must go in the basket to gain points,if the apple is touching the ground ,resulting in point deduction
2.boar hunting:shooting boar,which come ONLY from left or right,using space bar,the boar from the upper screen cannot be shot, and if character do a collision with the boar, point deduction
3.crow hunting:use the mouse / PDA pen, just left click/ touch the screen
4.horse riding: you must pass 100 rock to finish the game, using 4 direction button
5.platform game:using 4 direction button,and space bar to jump,climb stairs,etc,get the item to end the game
the game still have a lot of bug, need comment and suggestion
its my first game
for the design char , interface, music,and sound,I use other people works,sorry I don't have time to credit them,I made this game for an assignment in my university,and I need to make a report on this tomorow,I have to give the report and game on monday.need about 30 people fiiling the questioner
please be gentle with the comment and questioner answer
and I also need your occupation ,for ex : student/college student ( if possible,the name of the university), etc
thanks a lot to Tonypa,I copied a lot of his tutor code to make the platform game and the main game,and thanks for everyone who give solution to my problem
I also still having a problem with the platform game, the game with the most bug
I'll attach the code in the next post
if someone could help me,that would be a great help
need help on the collision,so the conversation is not repeated over and over again
I also need help to make a quest involving inventory
so I want to do trading items, first I have a bottle,if I talk to a particular NPC,he/she will trade an item,and my bottle is gone
I'm confused because I tought that if I play a mini game, my bottle is back again,and the item I get from trade is gone,need help on that if possible
thx a lot
sorry I can't attach my .fla,its too big,and my internet sucks at uploading
http://rapidshare.com/files/7778442/...test3.zip.html
-
Code:
fscommand("allowscale", false);
fscommand("allowscale", false);
myMap1 = [[0, 0, 0, 0, 0, 0, 2], [1, 1, 0, 0, 0, 0, 2], [0, 0, 0, 0, 0, 0, 2], [0, 0, 0, 0, 0, 0, 2], [0, 0, 0, 0, 0, 0, 2], [0, 0, 0, 0, 0, 0, 2], [0, 0, 0, 0, 0, 0, 2], [16, 16, 16, 16, 16, 1, 1]];
myMap2 = [[0, 0, 0, 0, 0, 0, 3], [1, 0, 0, 0, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [1, 16, 16, 1, 1, 1, 1]];
myMap3 = [[0, 0, 0, 0, 0, 0, 1], [1, 1, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 4], [16, 16, 16, 16, 16, 1, 1]];
myMap4 = [[1, 1, 1, 1, 1, 5, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1, 1], [1, 0, 0, 1, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [1, 1, 16, 16, 16, 16, 1]];
myMap5 = [[0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [6, 0, 0, 0, 0, 0, 7], [1, 1, 0, 1, 1, 1, 1]];
myMap6 = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 8], [1, 1, 1, 1, 1, 1, 1]];
myMap7 = [[9, 0, 0, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0, 1], [0, 0, 1, 0, 0, 14, 1], [0, 0, 0, 1, 1, 15, 1], [0, 0, 0, 0, 0, 15, 1], [0, 14, 1, 1, 0, 15, 1], [0, 15, 0, 0, 0, 15, 1], [1, 1, 16, 16, 16, 1, 1]];
myMap8 = [[0, 0, 0, 0, 0, 0, 10], [0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1], [0, 14, 1, 1, 0, 0, 1], [0, 15, 0, 0, 0, 0, 1], [0, 15, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]];
myMap9 = [[0, 0, 0, 0, 0, 0, 11], [1, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1], [1, 14, 1, 1, 0, 0, 1], [0, 15, 0, 0, 0, 0, 1], [0, 15, 0, 0, 0, 0, 1], [0, 15, 0, 0, 0, 0, 1], [1, 1, 1, 16, 16, 16, 16]];
myMap10 = [[0, 0, 0, 0, 0, 0, 1], [1, 1, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0, 12], [16, 16, 16, 16, 16, 1, 1]];
myMap11 = [[0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 0, 1], [0, 0, 1, 0, 0, 0, 13], [1, 16, 1, 16, 16, 1, 1]];
myMap12 = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1, 1], [1, 0, 0, 0, 0, 1, 1], [1, 0, 0, 0, 0, 1, 1], [1, 0, 0, 0, 0, 1, 1], [1, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1]];
_root.GameOver.stop();
game = {tileW:40, tileH:40, currentMap:1, Life:3};
game.bullets = new Array();
game.Tile0 = function () { };
game.Tile0.prototype.walkable = true;
game.Tile0.prototype.frame = 1;
game.Tile1 = function () { };
game.Tile1.prototype.walkable = false;
game.Tile1.prototype.frame = 2;
game.Doors = function (newmap, newcharx, newchary) { this.newmap = newmap;this.newcharx = newcharx;this.newchary = newchary;};
game.Doors.prototype.walkable = true;
game.Doors.prototype.frame = 1;
game.Doors.prototype.door = true;
game.Water = function (newmap, newcharx, newchary) { this.newmap = newmap;this.newcharx = newcharx;this.newchary = newchary;};
game.Water.prototype.walkable = true;
game.Water.prototype.frame = 16;
game.Water.prototype.water = true;
game.Tile16 = function () {};
game.Tile16.prototype = new game.Water(1, 0, 0);
game.Tile2 = function () { };
game.Tile2.prototype = new game.Doors(2, 0, 6);
game.Tile3 = function () { };
game.Tile3.prototype = new game.Doors(3, 0, 0);
game.Tile4 = function () { };
game.Tile4.prototype = new game.Doors(4, 0, 6);
game.Tile5 = function () { };
game.Tile5.prototype = new game.Doors(5, 2, 7);
game.Tile6 = function () { };
game.Tile6.prototype = new game.Doors(6, 5, 6);
game.Tile7 = function () { };
game.Tile7.prototype = new game.Doors(7, 0, 5)
game.Tile8 = function () { };
game.Tile8.prototype = new game.Doors(5, 1, 6);
game.Tile9 = function () { };
game.Tile9.prototype = new game.Doors(8, 5, 6);
game.Tile10 = function () { };
game.Tile10.prototype = new game.Doors(9, 1, 6);
game.Tile11 = function () { };
game.Tile11.prototype = new game.Doors(10, 0, 0);
game.Tile12 = function () { };
game.Tile12.prototype = new game.Doors(11, 0, 6);
game.Tile13 = function () { };
game.Tile13.prototype = new game.Doors(12, 0, 6);
game.Tile14 = function () { };
game.Tile14.prototype.walkable = false;
game.Tile14.prototype.frame = 14;
game.Tile14.prototype.ladder = true;
game.Tile14.prototype.item = "ladder";
game.Tile15 = function () { };
game.Tile15.prototype.walkable = true;
game.Tile15.prototype.frame = 15;
game.Tile15.prototype.ladder = true;
game.Tile15.prototype.item = "ladder";
myItems = [[0], [0], [0],[0],[0],[0], [[0]],[0],[0],[0],[0],[0],[[1,4,6]]];
game.Item1 = function () { };
myMovingTiles = [[0], [[1, 3, 2]] , [[2, 4, 5]], [[1, 3, 3]],[],[],[],[],[],[],[],[[2,3,4]]];
game.MovingTiles1 = function () { };
game.MovingTiles1.prototype.speed = 2;
game.MovingTiles1.prototype.dirx = 0;
game.MovingTiles1.prototype.diry = 1;
game.MovingTiles1.prototype.miny = 0;
game.MovingTiles1.prototype.maxy = 4;
game.MovingTiles1.prototype.width = game.tileW/2;
game.MovingTiles1.prototype.height = game.tileH/2;
game.MovingTiles2 = function () { };
game.MovingTiles2.prototype.speed = 2;
game.MovingTiles2.prototype.dirx = 1;
game.MovingTiles2.prototype.diry = 0;
game.MovingTiles2.prototype.minx = -1;
game.MovingTiles2.prototype.maxx = 1;
game.MovingTiles2.prototype.width = game.tileW/2;
game.MovingTiles2.prototype.height = game.tileH/2;
char = {xtile:0, ytile:0, speed:4, jumpstart:-22, gravity:2, jump:true, Life:3};
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
game.clip = _root.tiles;
var mapWidth = map[0].length;
var mapHeight = map.length;
for (var i = 0; i<mapHeight; ++i) {
for (var j = 0; j<mapWidth; ++j) {
var name = "t_"+i+"_"+j;
game[name] = new game["Tile"+map[i][j]]();
game.clip.attachMovie("tile", name, i*100+j*2);
game.clip[name]._x = (j*game.tileW);
game.clip[name]._y = (i*game.tileH);
game.clip[name].gotoAndStop(game[name].frame);
}
}
game.items = myItems[game.currentMap];
for (var i = 0; i<game.items.length; ++i) {
var name = "item"+game.items[i][2]+"_"+game.items[i][1];
game[name] = new game["Item"+game.items[i][0]]();
game[name].position = i;
game.clip.attachMovie("items", name, 10001+i);
game[name].clip = game.clip[name];
game[name].clip._x = (game.items[i][1]*game.tileW)+game.tileW/2;
game[name].clip._y = (game.items[i][2]*game.tileH)+game.tileH/2;
game[name].clip.gotoAndStop(game.items[i][0]);
}
game.movingtiles = myMovingTiles[game.currentMap];
for (var i = 0; i<game.movingtiles.length; ++i) {
var name = "movingtiles"+i;
game[name] = new game["MovingTiles"+game.movingtiles[i][0]]();
game.clip.attachMovie("movingtiles", name, 12001+i);
game[name].clip = game.clip[name];
game[name].clip.gotoAndStop(game.movingtiles[i][0]);
game[name].xtile = game.movingtiles[i][1];
game[name].ytile = game.movingtiles[i][2];
game[name].x = game[name].xtile*game.tileW+game.tileW/2;
game[name].y = game[name].ytile*game.tileH+game.tileH/2;
game[name].clip._x = game[name].x;
game[name].clip._y = game[name].y;
game[name].minx = game[name].minx+game[name].xtile;
game[name].maxx = game[name].maxx+game[name].xtile;
game[name].miny = game[name].miny+game[name].ytile;
game[name].maxy = game[name].maxy+game[name].ytile;
}
game.clip.attachMovie("char", "char", 10000);
char.clip = game.clip.char;
char.x = (char.xtile*game.tileW)+game.tileW/2;
char.y = ((char.ytile+1)*game.tileW)-char.height;
char.width = char.clip._width/2;
char.height = char.clip._height/2;
char.clip._x = char.x;
char.clip._y = char.y;
char.clip.gotoAndStop(char.frame);
}
function changeMap(ob) {
var tempitems = [];
for (var i = 0; i<game.items.length; ++i) {
if (game.items[i]) {
var name = "item"+game.items[i][2]+"_"+game.items[i][1];
delete game[name];
tempitems.push(game.items[i]);
}
}
myItems[game.currentMap] = tempitems;
var name = "t_"+ob.ytile+"_"+ob.xtile;
game.currentMap = game[name].newMap;
ob.ytile = game[name].newchary;
ob.xtile = game[name].newcharx;
ob.frame = ob.clip._currentframe;
buildMap(_root["myMap"+game.currentMap]);
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor((y+ob.height-1)/game.tileH);
ob.upY = Math.floor((y-ob.height)/game.tileH);
ob.leftX = Math.floor((x-ob.width)/game.tileW);
ob.rightX = Math.floor((x+ob.width-1)/game.tileW);
ob.upleft = game["t_"+ob.upY+"_"+ob.leftX].walkable;
ob.downleft = game["t_"+ob.downY+"_"+ob.leftX].walkable;
ob.upright = game["t_"+ob.upY+"_"+ob.rightX].walkable;
ob.downright = game["t_"+ob.downY+"_"+ob.rightX].walkable;
}
function movechar(ob, dirx, diry, jump) {
if (dirx<>0) {
ob.dirx = dirx;
}
if (Math.abs(jump) == 1) {
speed = ob.jumpspeed*jump;
} else {
speed = ob.speed;
}
ob.lasty = ob.y;
getMyCorners(ob.x, ob.y+speed*diry, ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y += speed*diry;
} else {
ob.y = ob.ytile*game.tileH+ob.height;
ob.jumpspeed = 0;
}
}
if (diry == 1) {
if (ob.downleft and ob.downright and !checkMovingTiles(speed*diry)) {
ob.y += speed*diry;
} else {
ob.jump = false;
if (ob.onMovingTile) {
ob.y = ob.onMovingTile.y-ob.onMovingTile.height-ob.height;
} else {
ob.y = (ob.ytile+1)*game.tileH-ob.height;
}
}
}
getMyCorners(ob.x+speed*dirx, ob.y, ob);
if (dirx == -1) {
if (ob.downleft and ob.upleft) {
ob.x += speed*dirx;
fall(ob);
} else {
ob.x = ob.xtile*game.tileW+ob.width;
}
}
if (dirx == 1) {
if (ob.upright and ob.downright) {
ob.x += speed*dirx;
fall(ob);
} else {
ob.x = (ob.xtile+1)*game.tileW-ob.width;
}
}
updateChar(ob, dirx, diry);
return (true);
}
function updateChar(ob, dirx, diry) {
ob.clip._x = ob.x;
ob.clip._y = ob.y;
if (dirx or diry) {
ob.clip.gotoAndStop(dirx+diry*2+3);
}
ob.xtile = Math.floor(ob.clip._x/game.tileW);
ob.ytile = Math.floor(ob.clip._y/game.tileH);
if (game["t_"+ob.ytile+"_"+ob.xtile].door and ob == _root.char) {
changeMap(ob);
}
// check for item on current tile
var itemname = game["item"+ob.ytile+"_"+ob.xtile];
if (itemname and ob == _root.char) {
removeMovieClip(itemname.clip);
char.removeMovieClip();
item.removeMovieClip();
tile.removeMovieClip();
tiles.removeMovieClip();
movingtiles.removeMovieClip();
removeAll();
gotoAndPlay(371);
game.items[itemname.position] = 0;
delete game["item"+ob.ytile+"_"+ob.xtile];
}
if (game["t_"+ob.ytile+"_"+ob.xtile].water and ob == _root.char) {
changeMap(ob);
game.Life = game.Life - 1
_root.Life = game.Life;
if (game.Life < 0){
char.removeMovieClip();
item.removeMovieClip();
tile.removeMovieClip();
tiles.removeMovieClip();
movingtiles.removeMovieClip();
gotoAndPlay(370);
}
}
}
function jump(ob) {
ob.climb =false;
ob.jump = true;
ob.jumpspeed = ob.jumpspeed+ob.gravity;
if (ob.jumpspeed>game.tileH) {
ob.jumpspeed = game.tileH;
}
if (ob.jumpspeed<0) {
movechar(ob, 0, -1, -1);
} else if (ob.jumpspeed>0) {
movechar(ob, 0, 1, 1);
}
}
function fall(ob) {
if (!ob.jump) {
getMyCorners(ob.x, ob.y+1, ob);
if (ob.downleft and ob.downright and !checkMovingTiles(1)) {
ob.onMovingTile = false;
ob.jumpspeed = 0;
ob.jump = true;
ob.climb = false;
}
}
}
function checkUpLadder(ob) {
var downY = Math.floor((ob.y+ob.height-1)/game.tileH);
var upY = Math.floor((ob.y-ob.height)/game.tileH);
var upLadder = game["t_"+upY+"_"+ob.xtile].ladder;
var downLadder = game["t_"+downY+"_"+ob.xtile].ladder;
if (upLadder or downLadder) {
return (true);
} else {
fall(ob);
}
}
function checkDownLadder(ob) {
var downY = Math.floor((ob.speed+ob.y+ob.height)/game.tileH);
var downLadder = game["t_"+downY+"_"+ob.xtile].ladder;
if (downLadder) {
return (true);
} else {
fall(ob);
}
}
function climb(ob, diry) {
ob.y += ob.speed*diry;
ob.x = (ob.xtile*game.tileW)+game.tileW/2;
updateChar(ob, 0, diry);
return (true);
}
function checkMovingTiles(y) {
if (char.diry<>-1) {
var heroymax = char.y+char.height+y;
var heroxmax = char.x+char.width;
var heroxmin = char.x-char.width;
foundit = false;
for (var i = 0; i<game.movingtiles.length; i++) {
var ob = game["movingtiles"+i];
var tileymax = ob.y+ob.height;
var tileymin = ob.y-ob.height;
var tilexmax = ob.x+ob.width;
var tilexmin = ob.x-ob.width;
if (char.lasty+char.height<=tileymin) {
if (heroymax<=tileymax and heroymax>=tileymin) {
if (heroxmax>tilexmin and heroxmax<tilexmax) {
char.onMovingTile = ob;
foundit = true;
break;
} else if (heroxmin>tilexmin and heroxmin<tilexmax) {
char.onMovingTile = ob;
foundit = true;
break;
}
}
}
}
return (foundit);
}
}
continue in next post
-
Code:
function moveTiles() {
for (var i = 0; i<game.movingtiles.length; i++) {
var ob = game["movingtiles"+i];
getMyCorners(ob.x+ob.speed*ob.dirx, ob.y+ob.speed*ob.diry, ob);
if (ob.miny>ob.upY or ob.maxy<ob.downY) {
ob.diry = -ob.diry;
}
if (ob.minx>ob.leftX or ob.maxx<ob.rightX) {
ob.dirx = -ob.dirx;
}
ob.x = ob.x+ob.speed*ob.dirx;
ob.y = ob.y+ob.speed*ob.diry;
ob.xtile = Math.floor(ob.x/game.tileW);
ob.ytile = Math.floor(ob.y/game.tileH);
ob.clip._x = ob.x;
ob.clip._y = ob.y;
if (ob.diry == -1) {
checkMovingTiles(0);
}
}
if (char.onMovingTile) {
getMyCorners(char.x, char.y+char.onMovingTile.speed*char.onMovingTile.diry, char);
if (char.onMovingTile.diry == -1) {
if (char.upleft and char.upright) {
char.y = char.onMovingTile.y-char.onMovingTile.height-char.height;
} else {
char.y = char.ytile*game.tileH+char.height;
char.jumpspeed = 0;
char.jump = true;
char.onMovingTile = false;
}
}
if (char.onMovingTile.diry == 1) {
if (char.downleft and char.downright) {
char.y = char.onMovingTile.y-char.onMovingTile.height-char.height;
} else {
char.onMovingTile = false;
char.y = (char.ytile+1)*game.tileH-char.height;
}
}
getMyCorners(char.x+char.onMovingTile.speed*char.onMovingTile.dirx, char.y, char);
if (char.onMovingTile.dirx == -1) {
if (char.downleft and char.upleft) {
char.x += char.onMovingTile.speed*char.onMovingTile.dirx;
} else {
char.x = char.xtile*game.tileW+char.width;
fall(ob);
}
}
if (char.onMovingTile.dirx == 1) {
if (char.upright and char.downright) {
char.x += char.onMovingTile.speed*char.onMovingTile.dirx;
} else {
fall(ob);
char.x = (char.xtile+1)*game.tileW-char.width;
}
}
updateChar(ob);
}
}
function detectKeys() {
moveTiles();
var ob = _root.char;
var keyPressed = false;
if (Key.isDown(Key.SPACE) and !ob.jump and !ob.climb) {
ob.onMovingTile = false;
ob.jump = true;
ob.jumpspeed = ob.jumpstart;
}
if (Key.isDown(Key.RIGHT)) {
getMyCorners(ob.x-ob.speed, ob.y, ob);
if (!ob.climb or ob.downleft and ob.upleft and ob.upright and ob.downright) {
if (!checkMovingTiles(1)) {
char.onMovingTile = false;
}
keyPressed = _root.moveChar(ob, 1, 0);
}
} else if (Key.isDown(Key.LEFT)) {
getMyCorners(ob.x-ob.speed, ob.y, ob);
if (!ob.climb or ob.downleft and ob.upleft and ob.upright and ob.downright) {
if (!checkMovingTiles(1)) {
char.onMovingTile = false;
}
keyPressed = _root.moveChar(ob, -1, 0);
}
} else if (Key.isDown(Key.UP)) {
if (!ob.jump and checkUpLadder(ob)) {
keyPressed = _root.climb(ob, -1);
}
} else if (Key.isDown(Key.DOWN)) {
if (!ob.jump and checkDownLadder(ob)) {
keyPressed = _root.climb(ob, 1);
}
}
if (ob.jump) {
keyPressed = _root.jump(ob);
}
if (!keyPressed) {
ob.clip.char.gotoAndStop(1);
} else {
ob.clip.char.play();
}
}
buildMap(_root["myMap"+game.currentMap]);
fall(_root.char);
stop();
still continue
-
I also attach the main game code:
Code:
stop();
_root.Town=new Sound();
_root.Town.attachSound("Town");
Town.start(0,999);
_root.yesbutton1._visible = false;
_root.yesbutton2._visible = false;
_root.yesbutton3._visible = false;
_root.yesbutton4._visible = false;
_root.nobutton1._visible = false;
_root.nobutton2._visible = false;
_root.nobutton3._visible = false;
_root.nobutton4._visible = false;
fscommand("allowscale", false);
fscommand("allowscale", false);
myMap1 = [[42, 42, 43, 38, 39, 42, 43, 43], [44, 44, 45, 40, 41, 44, 45, 45], [7, 0, 0, 0, 0, 0, 0, 7], [7, 0, 0, 4, 4, 0, 0, 7], [7, 0, 36, 4, 4, 0, 0, 7], [7, 0, 37, 4, 4, 0, 0, 7], [7, 0, 0, 4, 4, 0, 0, 7], [7, 0, 0, 4, 4, 0, 0, 7], [7, 7, 7, 9, 9, 7, 7, 7]];
myMap2 = [[7, 28, 29, 7, 7, 7, 7, 7], [7, 30, 31, 0, 0, 0, 0, 7], [7, 4, 4, 0, 0, 0, 0, 7], [7, 4, 4, 0, 0, 0, 0, 7], [7, 4, 4, 4, 4, 4, 4, 11], [7, 4, 4, 4, 4, 4, 4, 11], [7, 0, 0, 4, 4, 0, 0, 7], [7, 0, 0, 4, 4, 0, 0, 7], [7, 7, 7, 15, 15, 7, 7, 7]];
myMap3 = [[7, 7, 7, 10, 10, 7, 7, 7], [7, 0, 0, 4, 4, 0, 0, 7], [7, 0, 0, 4, 4, 0, 0, 7], [7, 0, 0, 4, 4, 0, 0, 7], [12, 4, 4, 4, 4, 4, 4, 13], [12, 4, 4, 4, 4, 4, 4, 13], [7, 0, 0, 4, 4, 0, 0, 7], [7, 0, 0, 4, 4, 0, 0, 7], [7, 7, 7, 17, 17, 7, 7, 7]];
myMap4 = [[3, 3, 3, 3, 3, 3, 3, 7], [3, 3, 3, 3, 3, 3, 3, 7], [3, 3, 3, 3, 3, 3, 3, 7], [1, 1, 1, 0, 1, 1, 1, 7], [14, 4, 4, 4, 4, 4, 0, 7], [14, 4, 4, 4, 4, 4, 0, 7], [7, 0, 0, 0, 4, 4, 0, 7], [7, 0, 0, 0, 4, 4, 0, 7], [7, 7, 7, 7, 19, 19, 7, 7]];
myMap5 = [[7, 7, 7, 16, 16, 7, 7, 7], [7, 28, 29, 4, 4, 0, 0, 7], [7, 30, 31, 4, 4, 0, 0, 7], [7, 0, 0, 4, 4, 0, 0, 7], [7, 0, 0, 4, 4, 4, 4, 21], [7, 0, 0, 4, 4, 4, 4, 21], [7, 0, 0, 0, 0, 0, 0, 7], [7, 0, 0, 0, 0, 0, 0, 7], [5, 5, 5, 5, 5, 5, 5, 5]];
myMap6 = [[7, 7, 7, 18, 18, 7, 7, 7], [7, 0, 0, 4, 4, 32, 33, 7], [7, 0, 0, 4, 4, 34, 35, 7], [7, 0, 0, 4, 4, 0, 0, 7], [22, 4, 4, 4, 4, 4, 4, 23], [22, 4, 4, 4, 4, 4, 4, 23], [7, 0, 0, 4, 4, 0, 0, 7], [7, 0, 0, 4, 4, 0, 0, 7], [5, 5, 5, 5, 5, 5, 5, 5]];
myMap7 = [[7, 7, 7, 20, 20, 7, 7, 7], [7, 0, 0, 4, 4, 0, 0, 7], [7, 0, 0, 4, 4, 32, 33, 7], [7, 0, 0, 4, 4, 34, 35, 7], [24, 4, 4, 4, 4, 0, 0, 7], [24, 4, 4, 4, 4, 0, 0, 0], [7, 0, 0, 0, 0, 0, 0, 7], [7, 0, 0, 0, 0, 0, 0, 7], [5, 5, 5, 5, 5, 5, 5, 5]];
game = {tilesW:30, tilesH:30, currentMap:2, money : game.money +_root.score};
game.tiles0 = function () { };
game.tiles0.prototype.walkable = true;
game.tiles0.prototype.frame = 1;
game.tiles1 = function () { };
game.tiles1.prototype.walkable = false;
game.tiles1.prototype.frame = 2;
game.Doors = function (newmap, newchar3x, newchar3y) { this.newmap = newmap;this.newchar3x = newchar3x;this.newchar3y = newchar3y;};
game.Doors.prototype.walkable = true;
game.Doors.prototype.frame = 10;
game.Doors.prototype.door = true;
game.tiles2 = function () { };
game.tiles2.prototype.walkable = false;
game.tiles2.prototype.frame = 3;
game.tiles3 = function () { };
game.tiles3.prototype.walkable = false;
game.tiles3.prototype.frame = 4;
game.tiles4 = function () { };
game.tiles4.prototype.walkable = true;
game.tiles4.prototype.frame = 5;
game.tiles5 = function () { };
game.tiles5.prototype.walkable = false;
game.tiles5.prototype.frame = 6;
game.tiles6 = function () { };
game.tiles6.prototype.walkable = false;
game.tiles6.prototype.frame = 7;
game.tiles7 = function () { };
game.tiles7.prototype.walkable = false;
game.tiles7.prototype.frame = 8;
game.tiles8 = function () { };
game.tiles8.prototype.walkable = false;
game.tiles8.prototype.frame = 9;
game.tiles28 = function () { };
game.tiles28.prototype.walkable = false;
game.tiles28.prototype.frame = 29;
game.tiles29 = function () { };
game.tiles29.prototype.walkable = false;
game.tiles29.prototype.frame = 30;
game.tiles30= function () { };
game.tiles30.prototype.walkable = false;
game.tiles30.prototype.frame = 31;
game.tiles31 = function () { };
game.tiles31.prototype.walkable = false;
game.tiles31.prototype.frame = 32;
game.tiles32 = function () { };
game.tiles32.prototype.walkable = false;
game.tiles32.prototype.frame = 33;
game.tiles33 = function () { };
game.tiles33.prototype.walkable = false;
game.tiles33.prototype.frame = 34;
game.tiles34 = function () { };
game.tiles34.prototype.walkable = false;
game.tiles34.prototype.frame = 35;
game.tiles35 = function () { };
game.tiles35.prototype.walkable = false;
game.tiles35.prototype.frame = 36;
game.tiles36 = function () { };
game.tiles36.prototype.walkable = false;
game.tiles36.prototype.frame = 37;
game.tiles37 = function () { };
game.tiles37.prototype.walkable = false;
game.tiles37.prototype.frame = 38;
game.tiles38 = function () { };
game.tiles38.prototype.walkable = false;
game.tiles38.prototype.frame = 39;
game.tiles39 = function () { };
game.tiles39.prototype.walkable = false;
game.tiles39.prototype.frame = 40;
game.tiles40 = function () { };
game.tiles40.prototype.walkable = false;
game.tiles40.prototype.frame = 41;
game.tiles41 = function () { };
game.tiles41.prototype.walkable = false;
game.tiles41.prototype.frame = 42;
game.tiles42 = function () { };
game.tiles42.prototype.walkable = false;
game.tiles42.prototype.frame = 43;
game.tiles43 = function () { };
game.tiles43.prototype.walkable = false;
game.tiles43.prototype.frame = 44;
game.tiles44 = function () { };
game.tiles44.prototype.walkable = false;
game.tiles44.prototype.frame = 45;
game.tiles45 = function () { };
game.tiles45.prototype.walkable = false;
game.tiles45.prototype.frame = 46;
game.tiles46 = function () { };
game.tiles46.prototype.walkable = false;
game.tiles46.prototype.frame = 47;
game.Tiles9 = function () { };
game.Tiles9.prototype = new game.Doors(3, 4, 1);
game.Tiles10 = function () { };
game.Tiles10.prototype = new game.Doors(1, 4, 7);
game.Tiles11 = function () { };
game.Tiles11.prototype = new game.Doors(3, 1, 5);
game.Tiles12 = function () { };
game.Tiles12.prototype = new game.Doors(2, 6, 5);
game.Tiles13 = function () { };
game.Tiles13.prototype = new game.Doors(4, 1, 5);
game.Tiles14 = function () { };
game.Tiles14.prototype = new game.Doors(3, 6, 5);
game.Tiles15 = function () { };
game.Tiles15.prototype = new game.Doors(5, 5, 1);
game.Tiles16 = function () { };
game.Tiles16.prototype = new game.Doors(2, 5, 7);
game.Tiles17 = function () { };
game.Tiles17.prototype = new game.Doors(6, 4, 1);
game.Tiles18 = function () { };
game.Tiles18.prototype = new game.Doors(3, 4, 7);
game.Tiles19 = function () { };
game.Tiles19.prototype = new game.Doors(7, 4, 2);
game.Tiles20 = function () { };
game.Tiles20.prototype = new game.Doors(4, 5, 7);
game.Tiles21 = function () { };
game.Tiles21.prototype = new game.Doors(6, 1, 5);
game.Tiles22 = function () { };
game.Tiles22.prototype = new game.Doors(5, 6, 5);
game.Tiles23 = function () { };
game.Tiles23.prototype = new game.Doors(7, 1, 5);
game.Tiles24 = function () { };
game.Tiles24.prototype = new game.Doors(6, 6, 5);
mynpcs = [[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],[12, 1, 4]], [[],[],[],[],[],[],[],[],[],[],[],[],[],[13, 2, 4]],[[],[],[],[],[],[],[],[],[8, 6, 6]],[[],[],[],[],[],[],[],[7 ,3 ,3]],[[],[],[],[3, 2 ,6]],[[],[],[],[],[4, 6, 7]],[[],[],[],[],[],[],[6, 7, 5]]];
game.talk = ["" , "","","","I have a task for you,If you do it,I will give some reward?, how about it?, It's an easy task, just catching some apple for me.","It is a nice day isn't it ? do you like to do some chores?","","Do you want to get some money, help me to hunt some Pig will you ?","My crops is damaged because of the crow,can you help me?","Go Away, I'm not a suspicious person, leave now, don't bother me. ","","","","Do you want to enter for the Knight's trial ?,it will cost you 25000 gold.","This game have 3 mini games in total you can repeat, 2 other mini games is unlocked if you have enough money." ];
game.npcp0 = function () { };
game.npcp0.prototype.xMove = 0;
game.npcp0.prototype.yMove = 0;
game.npcp0.prototype.speed = 0;
game.npcp13 = function () { };
game.npcp13.prototype.xMove = 0;
game.npcp13.prototype.yMove = 0;
game.npcp13.prototype.speed = 0;
game.npcp14 = function () { };
game.npcp14.prototype.xMove = 0;
game.npcp14.prototype.yMove = 0;
game.npcp14.prototype.speed = 0;
game.npcp3 = function () { } ;
game.npcp3.prototype.xMove = 0;
game.npcp3.prototype.yMove = 0;
game.npcp3.prototype.speed = 0;
game.npcp4 = function () { } ;
game.npcp4.prototype.xMove = 0;
game.npcp4.prototype.yMove = 0;
game.npcp4.prototype.speed = 0;
game.npcp5 = function () { } ;
game.npcp5.prototype.xMove = 0;
game.npcp5.prototype.yMove = 0;
game.npcp5.prototype.speed = 0;
game.npcp6 = function () { } ;
game.npcp6.prototype.xMove = 0;
game.npcp6.prototype.yMove = 0;
game.npcp6.prototype.speed = 0;
game.npcp7 = function () { } ;
game.npcp7.prototype.xMove = 0;
game.npcp7.prototype.yMove = 0;
game.npcp7.prototype.speed = 0;
game.npcp8 = function () { } ;
game.npcp8.prototype.xMove = 0;
game.npcp8.prototype.yMove = 0;
game.npcp8.prototype.speed = 0;
game.npcp9 = function () { } ;
game.npcp9.prototype.xMove = 0;
game.npcp9.prototype.yMove = 0;
game.npcp9.prototype.speed = 0;
game.npcp10 = function () { } ;
game.npcp10.prototype.xMove = 0;
game.npcp10.prototype.yMove = 0;
game.npcp10.prototype.speed = 0;
game.npcp10.prototype.talk = 10;
game.npcp11 = function () { } ;
game.npcp11.prototype.xMove = 0;
game.npcp11.prototype.yMove = 0;
game.npcp11.prototype.speed = 0;
game.npcp12 = function () { } ;
game.npcp12.prototype.xMove = 0;
game.npcp12.prototype.yMove = 0;
game.npcp12.prototype.speed = 0;
char3 = {xtiles:3, ytiles:3, speed:4};
function buildMap(map) {
_root.attachMovie("empty", "tiles", 1);
_root.money = game.money;
game.clip = _root.tiles;
var mapWidth = map[0].length;
var mapHeight = map.length;
for (var i = 0; i<mapHeight; ++i) {
for (var j = 0; j<mapWidth; ++j) {
var name = "t_"+i+"_"+j;
game[name] = new game["tiles"+map[i][j]]();
game.clip.attachMovie("tiles", name, i*100+j*2);
game.clip[name]._x = (j*game.tilesW);
game.clip[name]._y = (i*game.tilesH);
game.clip[name].gotoAndStop(game[name].frame);
}
}
var npcs = mynpcs[game.currentMap];
game.currentnpcs = npcs.length;
for (var i = 0; i<game.currentnpcs; i++) {
var name = "npc" +i;
game[name] = new game["npcp"+npcs[i][0]]();
game.clip.attachMovie("npc"+npcs[i][0], name, 10001+i);
game[name].clip = game.clip[name];
game[name].xtiles = npcs[i][1];
game[name].ytiles = npcs[i][2];
game[name].width = game.clip[name]._width/2;
game[name].height = game.clip[name]._height/2;
game[name].x = (game[name].xtiles*game.tilesW)+game.tilesW/2;
game[name].y = (game[name].ytiles*game.tilesH)+game.tilesH/2;
game[name].clip._x = game[name].x;
game[name].clip._y = game[name].y;
}
game.clip.attachMovie("char3", "char3", 1000);
char3.clip = game.clip.char3;
char3.x = (char3.xtiles*game.tilesW)+game.tilesW/2;
char3.y = (char3.ytiles*game.tilesH)+game.tilesH/2;
char3.width = char3.clip._width/2;
char3.height = char3.clip._height/2;
char3.clip._x = char3.x;
char3.clip._y = char3.y;
char3.clip.gotoAndStop(char3.frame);
}
function changeMap(ob) {
var name = "t_"+ob.ytiles+"_"+ob.xtiles;
game.currentMap = game[name].newMap;
ob.ytiles = game[name].newchar3y;
ob.xtiles = game[name].newchar3x;
_root.texts.visible = false;
texts.hideObject = true;
text.hide = true;
_root.text.visible = false;
_root.yesbutton1._visible = false;
_root.yesbutton2._visible = false;
_root.yesbutton3._visible = false;
_root.yesbutton4._visible = false;
_root.nobutton1._visible = false;
_root.nobutton2._visible = false;
_root.nobutton3._visible = false;
_root.nobutton4._visible = false;
ob.frame = ob.clip._currentframe;
buildMap(_root["myMap"+game.currentMap]);
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor((y+ob.height-1)/game.tilesH);
ob.upY = Math.floor((y-ob.height)/game.tilesH);
ob.leftX = Math.floor((x-ob.width)/game.tilesW);
ob.rightX = Math.floor((x+ob.width-1)/game.tilesW);
ob.upleft = game["t_"+ob.upY+"_"+ob.leftX].walkable;
ob.downleft = game["t_"+ob.downY+"_"+ob.leftX].walkable;
ob.upright = game["t_"+ob.upY+"_"+ob.rightX].walkable;
ob.downright = game["t_"+ob.downY+"_"+ob.rightX].walkable;
}
function movechar3(ob, dirx, diry) {
getMyCorners(ob.x, ob.y+ob.speed*diry, ob);
if (diry == -1) {
if (ob.upleft and ob.upright) {
ob.y += ob.speed*diry;
} else {
ob.y = ob.ytiles*game.tilesH+ob.height;
}
}
if (diry == 1) {
if (ob.downleft and ob.downright) {
ob.y += ob.speed*diry;
} else {
ob.y = (ob.ytiles+1)*game.tilesH-ob.height;
}
}
getMyCorners(ob.x+ob.speed*dirx, ob.y, ob);
if (dirx == -1) {
if (ob.downleft and ob.upleft) {
ob.x += ob.speed*dirx;
} else {
ob.x = ob.xtiles*game.tilesW+ob.width;
}
}
if (dirx == 1) {
if (ob.upright and ob.downright) {
ob.x += ob.speed*dirx;
} else {
ob.x = (ob.xtiles+1)*game.tilesW-ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.clip.gotoAndStop(dirx+diry*2+3);
ob.xtiles = Math.floor(ob.clip._x/game.tilesW);
ob.ytiles = Math.floor(ob.clip._y/game.tilesH);
if (game["t_"+ob.ytiles+"_"+ob.xtiles].door and ob == _root.char3) {
changeMap(ob);
}
return (true);
}
-
could you at least provide some screenshots or online SWF file?
-
Code:
messages = new Array();
cw = 69;
MovieClip.prototype.sendMessage = function(msg){
msg += " ";
while(msg.length>1){
for(i=_root.cw;i>-1;i--){
if(msg.substring(i,i+1)==" "){
_root.messages.push(msg.substring(0,i)+newline);
msg = msg.substring(i+1,msg.length);
i = -1;
}
}
}
};
MovieClip.prototype.showButton1 = function(show1){
_root.nobutton1.visible = true;
_root.yesbutton1.visible = true;
}
function npcBrain() {
for (var i = 0; i<game.currentnpcs; i++) {
var name = "npc" +i ;
var ob = game[name];
}
var xdist = ob.x-char3.x;
var ydist = ob.y-char3.y;
if (Math.sqrt(xdist*xdist+ydist*ydist)<ob.width+char3.width) {
sendMessage(game.talk[i]);
sendMessage.stop();
keyPressed = false;
if ( i == 4 ) {
nobutton1._visible = true;
yesbutton1._visible = true;
}
if ( i == 7) {
nobutton2._visible = true;
yesbutton2._visible = true;
}
if ( i == 8) {
nobutton3._visible = true;
yesbutton3._visible = true;
}
if ( i == 13) {
if (game.money >25000){
nobutton4._visible = true;
yesbutton4._visible = true;
}
}
// if( game[name]= game["npc12"]) {
//showButton1 (true);
// sendMessage(game.talk[12]);
//}
//}
}
}
//}
function detectKeys() {
var ob = _root.char3;
var keyPressed = false;
if (Key.isDown(Key.RIGHT)) {
keyPressed = _root.movechar3(ob, 1, 0);
} else if (Key.isDown(Key.LEFT)) {
keyPressed = _root.movechar3(ob, -1, 0);
} else if (Key.isDown(Key.UP)) {
keyPressed = _root.movechar3(ob, 0, -1);
} else if (Key.isDown(Key.DOWN)) {
keyPressed = _root.movechar3(ob, 0, 1);
}
if (!keyPressed) {
ob.clip.char3.gotoAndStop(1);
} else {
ob.clip.char3.play();
}
_root.npcBrain();
}
buildMap(_root["myMap"+game.currentMap]);
stop();
last part of the main game code
-
Truimagz.com
your link has expired...........
you can use this one to host your stuff freely
http://truimagz.com/Hosting.htm
Edit: Maybie I'm wrong, but I cant seem to figure out how to download it.
As to the game, like to see it, the code looks good.
-
M.D.
the code is from tonypa's tilebased tutorials, it looks like the majority has been ripped.
i'm giving it an e - bad on all criteria
-
 Originally Posted by mr_malee
the code is from tonypa's tilebased tutorials, it looks like the majority has been ripped.
i'm giving it an e - bad on all criteria
please read my post carefully:
thanks a lot to Tonypa,I copied a lot of his tutor code to make the platform game and the main game
its also my first game,so don't be so mean
I'm not a genius who can come up with a great code in just 2 month
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|