0
I've finally finished the sound and music part for my game. There was a part where I did my own trial and errors with the coding as I couldn't find a tutorial for it. It is the onion's sound. Initially, I added the code into the scene, where the scene will play the sound every 7 seconds or so. But I realised it will not make sense having the onion's sound still playing when they are not on the screen after being stomped by Bawang Putih. So, I moved the code into the actor instead. The onion's event tab. First, the codes that I used was these :
All the above 3 were my trial and error codes. They didn't work, so I made the code simpler, which ends up being the one that works :
The channels in the code are like sound groups, so I can add in sounds to certain channels and those sounds will be in the same group.
Moving on, I added sounds to be played in sequence during my still images scenes, the quest pages and end pages.
I just have to set it to play at certain seconds, so it will play after one another :
I have to code these in the scene's event tab.
When I tested exporting to swf, Stencyl wouldn't allow me to export it due to some incompatible sounds format. It is really a hassle as Stencyl does not have the feature which allows me to see which is the sound that is incompatible. The only way to solve this is to delete one sound after another till it is able to export to swf, then only I will know which sound is causing the problem. After finding that incompatible sound, I have to convert it to this format :
After having that done, I tried exporting again, but it still gives me the same error. Stencyl also doesn't let you know how many sound is incompatible. So, in the end I found around 5 sounds that I have to reconvert by going through the delete and export process. It does took up most of my time, I will have to take note of the sound format in the future.
Other than that, I've changed all the keyboard features to touch features. (I hope I didn't miss out any of the keyboard features)
Instead of "touched" I use "is touching", so the animation will be shown.
And I have also done the game icon and splash screen. Stencyl noted in their programme that the icon must be at least 144px x 144px while the splashscreen for ipad must be at least 1536px x 2048px.
Here's my icon design and the splashscreen.
I don't know how the transition will be like from splashscreen to game menu, but I wanted the splashscreen to have the game menu's background, to show the starting scene.
Here's the result:
Gameplay 1 :
Gameplay 2:
Wednesday, 4 December 2013
0
Before I get to the things that I've done, recently I've been receiving this error :
I searched for solutions and came across this forum which solved my problem :
I have to disable this feature to stop my game from crashing all the time :
And now it works perfectly fine!
END SCENE :
Okay, moving on, I've included an end scene where after Bawang Putih meets the last Onion, she enters her house and finds Bawang Merah trying to cook her magical fish.
And she threw one of Bawang Merah's onions towards Bawang Merah and she saved her fish and lived happily ever after.
ONSCREEN ARROW KEYS
I've also added on screen arrows. It's quite confusing at first to understand how to make the screen arrows to work. I still dont know if it will work on touch if it's on the ipad, but it does work on the screen so far.
What I did was, I created the arrows and placed them into the same group as my buttons. I wanted the arrows to follow the screen and not be fixed on the screen. And I found out about this feature while looking through the forums :
It's called anchoring self to screen. So, the object or actor, if this feature is used, it will follow the screen.
Then I set the arrow to simulate keyboard controls. I found out about the simulation here :
And I attached these behaviours to my left, right, and up arrow. I've attached the anchoring to the pause button but not the simulation.
Now it follows the screen whenever the player moves :
SOUNDS
Now that the arrows are done, I moved on to do sound effects. For Stencyl , I only can use mp3 files to add in sound. It doesn't support wav files so far in my Stencyl's version. Perhaps in the future it might be able to support different formats.
I haven't finish adding the sounds and music, it's in progress. Nevertheless, this is how I add in the sounds :
First, I import the files:
Then I go to the behaviours where I want the sound to be played and include this code in the behaviour:
There are options to loop or stop the sound when changing scenes. Sound effects and music are quite simple to be placed into the codes in Stencyl.
PAUSE GAME
In my levels, I have a pause button which allows players to pause their game. The pausing part is the main issue for me as it is quite hard. My pause button still does not work but I can pause the game using the "enter" on the keyboard.
Anyway, I followed this tutorial here :
For pausing, I have to create a behaviour for the scene, in this case level 1 and level 2,
In the Pause Game 1 behaviour are these codes:
The codes mean, if I pressed Enter on my keyboard, if game is paused, then unpaused the game. If not, show the two buttons and pause the game.
The two buttons I've created in the actor types section. And each button have their own behaviour, the menu button will fade the screen and go back to menu. Whereas, the play button will resume the game. (unpausing the game)
And I replaced the keyboard features to touch feature for mobile, but I can't test the touch features because it wouldn't work on the keyboard. So, I temporary disabled the touch features to continue my desktop testing.
Here's the results so far :
Sunday, 1 December 2013