I still try my best to solve the problem although I had plan B for it.
Showing posts with label production. Show all posts
Showing posts with label production. Show all posts
Sunday, 21 April 2013
Game Development 2 - Pair Game
I found a new script for the matching card game, and it worked well on the frame after a little bit of tweaking the code. However, there is still an error when I tried clicking back to the previous page with the game on page 4 displayed, but cannot be disabled when going back to the previous page or the next page. Since the problem still occurs, therefore I keep going back to the old script to make the tile disappear when the same tiles are matched. I put the solution behind the game after the game is played. I put in a movieclip to show the arranged new duty roles for each characters.
Thursday, 18 April 2013
Animation and Coding
I am currently working on the animation and game coding. I keep testing it on my phone when I am half done with it so that I can find any bugs or problems and fix them earlier. I found out that there is a minor error which is fortunately easy to solve. While doing this, I went to hunt for background music to suit my ebook and some sound effects to go together with the animation and games.
The first game went well, but the problems lie in the second game. This is because the second card game uses OOP and Actionscript file to call into my file. But it appeared in every frame, while it only needs to be on a certain frame. So I went online to look for the solution and hope that it will work out well. I tried very hard but to no avail, even trying different ways to solve the problem but nothing worked out. So I resorted to another script which is shown below:
Matching Card Game
Script
package {
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.utils.Timer;
public class color_match extends Sprite {
private var first_tile:colors;
private var second_tile:colors;
private var pause_timer:Timer;
var colordeck:Array = new Array(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8);
public function color_match() {
for (x=1; x<=4; x++) {
for (y=1; y<=4; y++) {
var random_card = Math.floor(Math.random()*colordeck.length);
var tile:colors = new colors();
tile.col = colordeck[random_card];
colordeck.splice(random_card,1);
tile.gotoAndStop(9);
tile.x = (x-1)*82;
tile.y = (y-1)*82;
tile.addEventListener(MouseEvent.CLICK,tile_clicked);
addChild(tile);
}
}
}
public function tile_clicked(event:MouseEvent) {
var clicked:colors = (event.currentTarget as colors);
if (first_tile == null) {
first_tile = clicked;
first_tile.gotoAndStop(clicked.col);
}
else if (second_tile == null && first_tile != clicked) {
second_tile = clicked;
second_tile.gotoAndStop(clicked.col);
if (first_tile.col == second_tile.col) {
pause_timer = new Timer(1000,1);
pause_timer.addEventListener(TimerEvent.TIMER_COMPLETE,remove_tiles);
pause_timer.start();
}
else {
pause_timer = new Timer(1000,1);
pause_timer.addEventListener(TimerEvent.TIMER_COMPLETE,reset_tiles);
pause_timer.start();
}
}
}
public function reset_tiles(event:TimerEvent) {
first_tile.gotoAndStop(9);
second_tile.gotoAndStop(9);
first_tile = null;
second_tile = null;
pause_timer.removeEventListener(TimerEvent.TIMER_COMPLETE,reset_tiles);
}
public function remove_tiles(event:TimerEvent) {
removeChild(first_tile);
removeChild(second_tile);
first_tile = null;
second_tile = null;
pause_timer.removeEventListener(TimerEvent.TIMER_COMPLETE,remove_tiles);
}
}
}
This source is found online :http://www.emanueleferonato.com/2008/05/02/creation-of-a-matching-game-with-flash-and-as3/
Although it is an Actionscript file, it is much easier to refined compared to the previous version I had.
The first game went well, but the problems lie in the second game. This is because the second card game uses OOP and Actionscript file to call into my file. But it appeared in every frame, while it only needs to be on a certain frame. So I went online to look for the solution and hope that it will work out well. I tried very hard but to no avail, even trying different ways to solve the problem but nothing worked out. So I resorted to another script which is shown below:
Matching Card Game
Script
package {
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.utils.Timer;
public class color_match extends Sprite {
private var first_tile:colors;
private var second_tile:colors;
private var pause_timer:Timer;
var colordeck:Array = new Array(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8);
public function color_match() {
for (x=1; x<=4; x++) {
for (y=1; y<=4; y++) {
var random_card = Math.floor(Math.random()*colordeck.length);
var tile:colors = new colors();
tile.col = colordeck[random_card];
colordeck.splice(random_card,1);
tile.gotoAndStop(9);
tile.x = (x-1)*82;
tile.y = (y-1)*82;
tile.addEventListener(MouseEvent.CLICK,tile_clicked);
addChild(tile);
}
}
}
public function tile_clicked(event:MouseEvent) {
var clicked:colors = (event.currentTarget as colors);
if (first_tile == null) {
first_tile = clicked;
first_tile.gotoAndStop(clicked.col);
}
else if (second_tile == null && first_tile != clicked) {
second_tile = clicked;
second_tile.gotoAndStop(clicked.col);
if (first_tile.col == second_tile.col) {
pause_timer = new Timer(1000,1);
pause_timer.addEventListener(TimerEvent.TIMER_COMPLETE,remove_tiles);
pause_timer.start();
}
else {
pause_timer = new Timer(1000,1);
pause_timer.addEventListener(TimerEvent.TIMER_COMPLETE,reset_tiles);
pause_timer.start();
}
}
}
public function reset_tiles(event:TimerEvent) {
first_tile.gotoAndStop(9);
second_tile.gotoAndStop(9);
first_tile = null;
second_tile = null;
pause_timer.removeEventListener(TimerEvent.TIMER_COMPLETE,reset_tiles);
}
public function remove_tiles(event:TimerEvent) {
removeChild(first_tile);
removeChild(second_tile);
first_tile = null;
second_tile = null;
pause_timer.removeEventListener(TimerEvent.TIMER_COMPLETE,remove_tiles);
}
}
}
This source is found online :http://www.emanueleferonato.com/2008/05/02/creation-of-a-matching-game-with-flash-and-as3/
Although it is an Actionscript file, it is much easier to refined compared to the previous version I had.
Wednesday, 10 April 2013
Display Measurement
I found out that Galaxy Tab display have two different measurements: 1024px x 600px and 1280px x 800px. Therefore, to ensure my graphic remain same size and able to fix into different size, I try to publish it as an application and test it on my Samsung Galaxy S3 phone with displayed on 1280px x 720px and my friend's Samsung Galaxy W displayed on 480 x 800 pixels. It is a relieve to know that it just needs to be set into full Screen and it will work fine in any device.
Samsung Galaxy W
(480 x 800 pixels)
Samsung Galaxy S3
(1280px x 720px)
Sunday, 7 April 2013
Digital sketches
There are 12 final digital sketches. It took me a lot of time to match the colours other than sketching the outline. I have also added dialogues into the pages, and I am currently working on the animation before proceeding to coding the full game.
Wednesday, 27 March 2013
Characters Design
Mouse
Sausage character was at first brown in colour but I felt it was too dull. I liked it when it is filled in pink and red colours to show the look and mood of an actual sausage. Yellow sausage looked like a banana while blue sausage looked like a jelly bean.
Bird
I like this Bird character the most. It looks very quite in this shape. I ended up using yellow colour on Bird because I want the three characters to be in primary colours, although it looks nice in blue and red as well.
Selected Characters
Three of characters have matched with each other to build a harmony colour mood. Blue for Mouse, yellow for Bird and Sausage is red. The colours quite represent the characters themselves.
The Mouse character being test into different colours. I find it very hard to match it with other colours. At first, Mouse with an outline looks very weird to me. I then tried changing to using only one type of colour with different gradients, and I think it looks much better. After that, I tried experimenting with different colours, even using two tones. I end up with the blue mouse as yellow blends in easily with the white background.
Sausage

Bird

Selected Characters

Labels:
characters,
colours,
concept,
experiment,
production,
visuals
Subscribe to:
Posts (Atom)