Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - ProMole

Pages: 1 2 3 ... 6
Ask a Question / Re: What does speed mean?
« on: November 29, 2013, 02:50:32 pm »
There you go, this is the code.

Code: [Select]
public dynamic class StartBalls extends SceneScript
//Expose your attributes to StencylWorks like this
[Attribute(id="1", name="Display Name", desc="An Attribute")]
public var attributeName:String;
//Then in the constructor or init(), add it to the nameMap like this
//nameMap["Display Name"] = "attributeName";
//This lets API calls using attribute names to use the display name

//Do all actor initialization here

var balls:Array = new Array();
var frames:int = 5;

override public function init():void
addWhenUpdatedListener(null, update);
addWhenDrawingListener(null, draw);

for (var i:int=1; i <= 5; i++)
var thisBall:Actor = createActor(getActorTypeByName("Ball"),0,32+i*32,MIDDLE);

//This is executed every frame of the game
public function update(list:Array):void
if (frames > 0)
for each (var ball:* in balls)
if (ball.getX() > 320)


public function draw(list:Array, g:Graphics, x:Number, y:Number):void

public function handleCollision(list:Array, event:Collision):void

//Leave this alone. Do your initializing inside init()
public function StartBalls(ignore:*, scene:GameState)

Ask a Question / Re: What does speed mean?
« on: November 28, 2013, 03:00:47 pm »
Ok, so let me tell you what I did.

1) I created an Actor. A ball. It has no behaviors, no physics.
2) Created a scene with a behavior.
3) In this behavior, I create 5 balls, each with speed 16 units bigger than the previous, starting with 16. Thus, 16, 32, 48, 64, 80. All start on x 0.
4) Then in the update event I set the behavior to print out the position of each of the balls, for the first 5 updates.

Here are the results:

The conclusion I get is still the same: 1/10 of speed per frame. There you go.

Ask a Question / Re: What does speed mean?
« on: November 27, 2013, 07:42:35 am »
So, with the daze of getting a game done with a tight deadline gone I finally sat down and devised a test to find that out by myself. The answer is interesting.

Speed = pixels / 10 frames.

Yep. Speed 16 means 1.6 pixels per frame, or 16 pixels per 10 frames. This means that in the ideal 60fps game an object will move 6 times faster than its designated speed.

That makes predicting position pretty hard, thus, but it was even worse: because my object speeds were not multiples of 10(16, for example), slips were common because floating point operations are tricky. Redesigning the parameters to be multiples of 10 or 5 let me get rid of some weird gaps between rows of blocks.

So now we know. :D

Stencyl Jam 13 / Re: Stencyl Jam #13 - The Winners
« on: November 26, 2013, 06:48:33 am »
Congrats for the winners. :D

I ended up playing none of the Jam games =/ But from what I saw in the posts there was a lot of dedication put into them. :)

Ask a Question / What does speed mean?
« on: November 19, 2013, 11:04:12 am »
Here's an information I've found oddly hard to discover: what does speed mean in Stencyl?

Here's the thing, we can set the speed of an object, be it by setting the x and y components or the value and directoin, but what does that value mean? What is the unit here? Is it pixels per second? Pixels per 60 frames(or whatever is the actual fps)?

I had to find a way to create new rows of blocks in my game, but I had no idea how to figure out when they would be aligned, or when they would have walked one tile high. I ended up creating an invisible object at the same speed and tracking its position. It's... clunky, but worked.

I just can't find it in the docs, and the forum search gets a load of stuff that's unrelated so I just had to ask. =/

Stencyl Jam 13 / Mole Folk DrillDown
« on: November 15, 2013, 08:14:50 am »
Ladies and gentlemen, Mole Folk DrillDown! A vertical infinite runner with a clan of moles trying to make money of what they do best: digging. Featuring moles, minerals and motor-powered drills.

It's pretty on the nick of time here, but I guess I'll never know if I don't ask. But before anything, here's a prelude:

I challenged myself to get one game done for the Jam as soon as the Jam was announced. I actually started one week later, but still I have this neat thing I'm liking and I'm proud that I'm actually getting a game done. Go me.

Anyway, I'll set up a post and submit the link with whatever version I manage to get done until after tomorrow. Obviously, lots of planned features had to be cut from development. It's okay if I continue to work on it and submit it in other places? I understand I will be competing with the version that is posted here, and I have no problem. I just want to be sure if I can continue or I should go work on another project just to be safe. :)

Ask a Question / Re: Is Stencyl changing my sprite colors?
« on: April 17, 2013, 03:05:59 pm »
Yep, the tileset is even worse. I get that Stencyl tilesets are actually complex(with collision shapes and what not), but everytime I add a new tile it makes a total mess out of the grid. :/

Ask a Question / Re: Overcoming Stencyl's Scene Editor
« on: April 17, 2013, 02:47:52 pm »
And if you use shift it'll allow you to move them according to the defined grid size. Thanks.

But what's the mystery that we can't do that by simply clicking?

Ask a Question / Re: Overcoming Stencyl's Scene Editor
« on: April 17, 2013, 02:21:50 pm »
It wouldn't, if I had pixel perfect movements. I do not, though, so this means I'll have to adjust it all manually anyways, so at least with the grid snapping I know the positions will all be multiples of 32.

Ask a Question / Overcoming Stencyl's Scene Editor
« on: April 17, 2013, 01:02:54 pm »
Okay, so I stadardized my scenes as 800x600 with 32 pixel tiles. I just accepted the fact that my last tile will be 24 pixels tall, whatever. Now here's what.

My actors are all build in different sizes, but all have sides that are either multiples or divisors of 32. So far, so good.

Then I want to place, say, two actors that are 16x8 side by side on the bottom of one cell of my grid. The question is, how do I do that, besides placing each actor and editing their position with the inspector?

Yes, I tried to change the tile size. Stencyl resets it to 32 when I reload, and even when it's still, say, 8x8, when I click to put the actor in the position they snap to the 32x32 grid instead. Setting up the initial tile size as 8x8 is a bad idea because this means my tiles would be resized ti 8x8, and that'd be horrible.

Pics later, but I hope I was clear enough in the description of the problem.

Ask a Question / Re: Is Stencyl changing my sprite colors?
« on: April 17, 2013, 12:37:55 pm »
I create them outside of Stencyl. I wish I didn't have to re-import them every time I do any changes because the only way to do it in Stencyl is either copy-pasting them from the spritesheet or importing the whole spritesheet and deleting the other frames that don't fit.

Or creating one spritesheet for each animation, but I think that undermines the purpose of a spritesheet to some extent.

Ask a Question / Re: Is Stencyl changing my sprite colors?
« on: April 05, 2013, 04:15:39 pm »
I only work in PNG. Here are two versions of the same sprite: the first one is the original PNG, the second one was imported in Stencyl and then edited in the same software.

Ask a Question / Is Stencyl changing my sprite colors?
« on: April 05, 2013, 02:05:23 pm »
So I have this weird thing happening. First I create my sprites outside of Stencyl(in Pixen, for the Mac; marvelous little app to create bitmap, so far). Then I use the "import from sheet" option in Stencyl to get those sprites into Stencyl and cut them as I see fit(and btw, I'm always frustrated by how I can't specify how many of those sprites I want to actually use; but such is life).

Problems comes when I decide I need to edit something on the sprite. For example, I want to move it a few pixels up or down or reverse it(I usually only draw my sprites going one direction and flip them).

Then I realize either Stencyl is doing something weird with my colors or Pixen is, but it turns out the colors are usually darker and now my animations looks like it's blinking. Same happens for tiles(especially tiles with transparency).

Has anyone seen this before and know if there's a way to avoid it?

(I'll get some pictures to post here later when I arrive home, I just decided to post this here before I forget again)

Ask a Question / Re: Position of camera on the screen
« on: March 25, 2013, 05:34:04 pm »
Okay, so let me be more specific.

My game screen size is 800x600. My tile size is 32px. That means I can fill the whole screen horizontally(25 tiles) but not vertically(18 tiles + 24 pixels). I want my levels to be 800x576, with a status bar of 24 pixels up there.

The problem is: the way Stencyl works, I must place my tiles starting from the top, so I can't place them quite on the bottom. So I wish I could have my camera being drawn 24 pixels lower so I can use an actor to draw the status screen up on the remaining 24 pixels.

I'll try the Offscreen bounds thing, but if that doesn't work, how do I go about it?

PS.: Nope, that has nothing to do with it.

Pages: 1 2 3 ... 6