0

Poison can kill

In my previous post, all the poison spit did was to hit Bawang Putih like a tennis ball and piled up around her. I searched tutorials and the coding I did was actually a few combinations of the tutorials.


This is one of the tutorials I referred to : http://www.stencyl.com/help/viewArticle/109/ , but the tutorial's hp bar didn't work for me, it didn't appear anywhere on the screen and I couldn't solve it as for now. So, I moved on to analyse some of the default's game and my first stencyl tryout's code. Because I did made the player die and reload before. 


There is a behaviour called "die in pit" in my first tryout. That means when the player goes to the edge of the screen or fall into a hole, the game will reload and revive the player. 

But my game does not have any pitholes to die in. Only the poison will kill the player. So, I use the collision method. I set it that when the player collides with the poison, the player dies. After player dies, the screen will reload. I've also found a feature in stencyl which shakes the screen. I combined the codes to this :


And as for the poison, it must disappear when it touches the tile or objects in the path and my player. Using the same collision method, I set it to kill itself:



Then I get these behaviours :


And attach it to respective actors :



And the results :









0

Level 1 to Level 2 and onion shooting poisons

I've learned something new from Stencyl, it's called regions. It's use to move from levels to levels or entering doors by just having the player enter that region. Instead of clicking mouse to change scenes, just control the player to enter that area and *poof* you are in a new world.

I followed the tutorial from here :

http://www.stencyl.com/help/view/regions/

Here's the code that I've added in at the scene, in this case it's level 1:


And the region that I've created in the scene layout, it's that small box labelled "cave 1" :


Initially, when I've tested it, Bawang Putih went behind the cave instead of in front of it. I found the solution in a forum : http://community.stencyl.com/index.php?topic=13219.0 , and it's like photoshop's layering. All I have to do is to set Bawang Putih's layer to be in front of the cave. And the cave to be behind. 


Moving on, I tried making the onions spit poison. I've drawn the poison, I need 4 frames to make it spin at 40ms per frame :





Here's a closer view :


And the settings that I've set for this poison spit :



After reading tutorials, I find out that I needed to use Attributes, I'm was not really clear as to what is attribute before I started this, but now I understood more what is attribute. 


Attribute is to allow creators to make changes easier rather than to go back to the codes. That's my understanding. So create attribute is from this :


Then I'll get this :


I've done it before, but I just didn't realise that's how I get the changeable values like the image above. 

Okay moving on, (this section is a bit complicated, I can understand a little bit from it.) I needed to refer to a default game from Stencyl as there's no detailed tutorial for it. 

First I needed to create two new behaviours, the update position and enemy fire projectile :


The code needed in the fire projectile, there's 2 parts :

This code is to not let the onion immediately spit on Bawang Putih once the game starts, or not she would die before the game even starts :



This part is to let the spit find where is Bawang Putih's position and attack her :



Okay, then I put that aside. In the code above, there's a purple "Player Y" and "Player X", that's the game attribute which needed to be created in the settings :


This game attribute has to be created before I code the both behaviours.

And in the update position behaviour :


And then I linked it to the respective characters :



And now the onions will spit at Bawang Putih, but nothing will happen to her yet because I haven't code what will happen after the poison touches her, so the poisons are just collecting around her...eww.. :





I'm gonna add in on screen arrows and these are what I'm referring to:


Campbell B. 2013, Gravity.Duck Review. [electronic print] Available at: <http://www.148apps.com/reviews/gravityduck-review/> [Accessed: 2nd November 2013]


iappsin.com. 2013, Action Game Impossible Pixel for iPhone and iPad. [electronic print] Available at: <http://iappsin.com/action-game-impossible-pixel-for-iphone-and-ipad.htm> [Accessed: 2nd November 2013]

I've also downloaded their games to play on the Ipad, and I'm pretty comfortable with both of the games' arrow positions, but I think impossible pixel's game's arrow is more relevant to my game's gameplay because I only needed up, left and right. In gravity duck's gameplay, the players needed to switch gravity, therefore, the gravity button is on the right. 


0

Level 2's background

I've drawn level 2's background. I'm thinking of placing a small cave to link both levels. So Bawang Putih will have to go through that cave to proceed to the next level.



I'll be adding bigger rocks and place the enemies on it so Bawang Putih will have to jump on the rocks to stomp the enemy. 


0

Quest page

I've coloured in the quest page and linked it to the main menu and level 1. I've also editted the instructions to be in the quest page, because many people might not view the instructions at the main menu. 




And the buttons that are added at bottom right of the page:



The results :



Initially I planned to have animations in the questpage or some animatic movements, but to do it in Stencyl, currently it must be done frame by frame, and this way would take up too much memory and time. Stencyl also keeps sending me warning about 90% usage which I'm not sure how to solve that..but so far, it doesn't cause any major problems. 

I've just recently read about Stencyl releasing version 3.0, which it will have much more features such as :

  • Introduction
  • Major Features
    • New Platforms: Android, HTML5, Native Desktop
    • Haxe - Unified Programming Language
    • Simple Physics
    • Extensions
  • Changes to iOS
    • Better Workflow
    • Universal Apps & Scaling
    • Handling Touch Input
    • Atlases
    • Drawing Text
    • Events for Purchases, Ads & Game Center
  • Changes to Desktop
    • Native, Hardware-Accelerated Apps
    • Store-Ready Apps
    • Full Screen Mode
    • Changes to Sound Playback


But it is not released yet, so I'll be continuing my use on 2.0 and hopefully when it's release, I'll try it out to produce new projects. 

0

Animating Main Menu

I've figured out how to animate the main menu. Basically it uses the method as animating the actors which is frame by frame. I find this feature a bit tedious as one animation have to be done frame by frame unlike the timeline based feature that flash has.

As now I'm only making Bawang Putih swing, it's alright, but I can't imagine how I'm going to animate other objects in the main menu if they are to move too. And Stencyl only gives you 2 layers, foreground and background. Foreground can be animated separately but in the same way as Background.

Anyway, here is how I animated Bawang Putih on the swing :


On the left are the frames.
The results:



And I've also linked the play button, not to the quest page yet, but to level 1.




0

New Menu Design

I've revamped my main menu's design, by using Plants vs Zombie's logo as reference, I've redesigned my main title.

I've also moved the ladybug to the left side, so there's space for my play and instruction buttons. The ladybug acts like a foreground.


I've also editted the ground to be more hilly instead of flat horizontal ground to give more natural landscape feel as real grounds are not exactly flat. 

I'm also currently testing out getting a default game by Stencyl into an ipad. Still in progress, will update more on this later on.


1

Edited Menu and quest page.

I've changed the main menu's layout to this :



Bawang Putih will be swinging, if Stencyl can be use to animate the main menu.

I'll also be adding the golden fish in the pond and the fish will swim around.

And this is my quest page draft :


Quest page 1



Quest page 2


0

Bawang Putih Jumping and Main Menu

I made Bawang Putih's jump mode and added it into my level 1. But the jump mode doesn't appear on my first click on the up arrow, instead it appears when I double click the up arrow.



Bawang Putih's jump mode and

The onion's squashed mode:




And my Stencyl testing with her jumping and stomping on enemies.




I've also done the first draft for the main menu :


Mr. Muzamir suggested that I add a jungle background to set the setting and include the part of the story where Bawang Putih sits on a swing from a tree. I think that's a good idea, and I am thinking of giving it a subtle animation at the main menu, if it's possible technical wise using Stencyl. 

And I will include a short story which leads to Bawang Putih's quest after the play button is clicked.