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.

Topics - infinitum3d

Pages: 1
Ask a Question / Variability coding with Percentages vs. Real Numbers
« on: October 11, 2014, 07:50:15 am »
This is more of a theory question about programming rather than a Stencyl coding question.

I'm trying to incorporate a measure of variation into my AI.  My thought is that I want to use a basic 100 point scale. AI will start with a score of 50, and increase or decrease based on events.  For example, something good happens and the score goes up.  One way to do this is to say something like;

if GoodEvent=true
then AI_SCORE = AI_SCORE + 1

But for greater variation, I was thinking I could say;

if GoodEvent=true
then AI_SCORE = AI_SCORE + 1%

the percentage would allow for logarithmic higher increases at a higher score, and lower increases at a lower starting score.

My concern is that I will need to round numbers and/or use floating points which could affect performance (?)

So my question is, do I need to be concerned about this or should I just start testing it both ways. I don't want to reinvent the wheel so if anyone had experience with this is greatly like some guidance.


Hi. In 2.1 the events had a curved arrow for "looping"or continuing/repeated occurrence.  It could be turned off to limit an event to a single occurrence. The newest build doesn't seem to have this?! Am I missing something? Is there a work around?

I used it for collisions to limit damage to one point per collision.


UPDATE! Solved. They gave it it's own puzzle piece called "disable this behavior". It's red. Search for "disable".

Even though I have the size set to 0 pixels, there is still a little black dot following my actor;

See screen shot, attached.

Any suggestions?

UPDATE: Since I don't need a graphical display of the actor health, I went into the Edit Behavior screen and turned off  (unchecked the box) the "When Drawing" Event.

So I started making my game in 2.1, then upgraded to 3.0 (which was a mistake as lots and lots of "corrections" needed to be made, but I digress).

Anyways, in 2.1, when I would make a minor change and click "test game", it took about 5 seconds to rebuild and load. Now, in 3.0, it takes 12-15 seconds to rebuild and load. Every time, no matter how small the change. Even if I don't make any changes.

Is there a setting that I can turn off, like the automatic Log Viewer?

In the Actor Events, I have;

set NUMBER to (NUMBER - 1)  <-- NUMBER is a Game Attribute
Create POWERUP at ACTOR X,Y  <<-- POWER UP is a new Actor

So this works fine when a bullet kills the actor on screen,
but when the Actor exits the screen NUMBER stays the same.

My assumption is that either
A) SELF is not being killed, which is unlikely because it works without the CREATE part, or
B) It is CREATE-ing a POWER UP off screen. More likely, but is that possible?

I've tried adding the Behaviour DIE ON LEAVING SCREEN to my POWER UP, hoping it would be instantly killed upon creation, but it still doesn't work.

Any suggestions?


Ask a Question / Why doesn't Camera X/Y correspond to Screen X/Y?
« on: May 29, 2014, 09:22:16 am »
When my scene is created I set Camera X/Y to 0,0 but I still have to subtract the camera coordinates from my actor coordinates in order to create the actor in the right location.

I'm sorry but I guess I still don't understand the whole "camera" thing. Why is camera different than screen?

I understand why some people need a camera (I.e. For panning around the screen) but why doesn't a stationary camera match up with the screen?

x (on screen)

How are these different? I thought the origin point (0,0) was always the top left corner. Going right, x gets larger. Going down, y gets larger.

But then for the Actor it says the origin point is "Center (Default)".  I understand the need for options but Origin Point Custom does that. Shouldn't Default be Top Left?

Anyways, that's a bit irrelevant because I understand how to use the Actor origin. Where I'm getting confused is when the Actor Origin is set to Center (Default), and I try to create a new Actor at that same point, it is never correct.

Say I have a gun 32x32. The origin at Center (Default) should be (0,0) in the center. Or is it (16,16) in the center?

When I try to create a bullet at x of gun, y of gun, where will it be created? Should I use x of gun +16, y of gun +16? or x of gun + (width of gun/2)? or should I be using x-center, y-center? or x (on screen), y (on screen)?

I've tried all these things and none of the create the bullet in the center of the gun ?!

What am I doing wrong?

Thank you so much for the help!!!

I'm trying to create an actor (a dog) under another actor (a doghouse) and I want the dog to be able to leave the doghouse to fetch a bone and come back and kill the actor (the dog) on Collison with the doghouse.

"When creating" the dog,  I set a boolen attribute (isReturning?) = false.

When the dog collides with the bone, I set 'isReturning=true'.

The scene has a collision between groups event;
when dog hits doghouse
if isReturning?= true
kill actor 1
increment numberBones

the problem is, it kills Actor 1 and increments the bones immediately. It's like the 'isReturning?' Attribute is set as true by default.

Any suggestions on why or how this is happening and/or what I can do to correct it?


I'm using the ATAN2 function to set an actor in motion from the center of the left side of the scene (x=0, y=240) toward a target actor by mouse click.  So far, so good.  When the actor gets to the target, I want it to reverse direction and return to (0,240) but "bounce" behavior ricochets off like a billiard ball at an angle.

I tried saying 'on collision' direction=direction + 180 degrees but didn't work.  I tried direction=negate (direction) but didn't work.

Any suggestions?  Do I have to recalculate ATAN2 using the collision coordinates or is there a simple solution?


Ask a Question / Are there rules regarding uploading "working demos"?
« on: April 22, 2014, 05:20:34 pm »
I should probably check with the specific websites, but I'm asking here first because I'm on here so much :)

I have a very basic Proof of Concept developed and I'd like to upload it to Kongregate and other sites. I'm hoping to get opinions and Betatest ('alphatest'?) Plus I want artists to be able to see what I have so they can improve upon it.

Does anyone know if there are rules which discourage/prevent this?


Ask a Question / Does "Kill Actor" trigger "Die on Leaving Screen"?
« on: February 09, 2014, 08:57:57 am »
Does "Die on Leaving Screen" get called when an actor is "killed", because technically speaking, kill removes them from the screen?

Or is "Die on Leaving Screen" strictly coordinates based, meaning if X of actor is <0

The reason I ask is because I have an event trigger which decrements a life whenever an actor leaves the screen, but its getting called twice. So I'm wondering if it gets called once for the "Kill" and again for the "leaving screen" because of the kill.

I have a Game Attribute (number) drawn to the screen.

Created-> set GameAttribute to 10.

so far, so good

When my enemy leaves the screen, I want to decrement the number.

When (enemy) exits the screen
set GameAttribute to (GameAttribute -1)
kill self after leaving screen

This doesn't decrement the variable. Any ideas?

I want my level to end once I've cleared the board of actors.

I've tried (if (not (last actor created) on screen
but if I kill the last created before the next to the last
then it transitions too soon

Any suggestions on how to transition AFTER all the enemies and power ups are  cleared?

Pages: 1