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 - Kajitii

Pages: 1 2
Resolved Questions / [SOLVED] Character gets stuck halfway into floor
« on: March 22, 2015, 12:06:58 pm »
I am attempting to use simple physics for my scene and player character, and I am using one of the default behaviors (2 way horizontal movement).  But for some reason, when I move left, my character gets stuck halfway into the floor, which is 1 tile in thickness.  Both the player character and the tiles are 32x32, and modifying my player character's collision hitboxes don't seem to make the problem go away.

What could be the solution?

This is as of Stencyl 2.1.  The amount of glitches I'm hearing about 2.2 scare me into not updating, since I already have enough to deal with.

Anyways, I programmed the ability to swap your controls in the options screen.  To do that, I have control attributes that are set to control set 1 if a boolean is true, and set to control set 2 if the same boolean is false.

Since my game is still a WIP, I still had additional functionality that I wanted to include.  If I add X amount of controls, all the control attribute setters screw up and point to something X amount further up the list than the originally assigned control.

For example, I have controls up, down, left, right, Z, X, and C.  Control attribute cJump is assigned to Z.  If I add esc as a possible control, cJump is now assigned to right instead of Z.  If I add yet another possible control, cJump is now assigned to left.

Resolved Questions / [Solved] object AlchemyExit issue
« on: July 08, 2012, 06:27:58 pm »
I can't interpret this stuff.  What does it mean?  And how do I get it to stop appearing when I start a level?

[object AlchemyExit]
   at Function/<anonymous>()
   at Function/<anonymous>()
   at Box2DAS.Dynamics::b2World/HandleStep()[/home/stencyl/]
   at Box2DAS.Common::b2EventDispatcher/dispatchEvent()[/home/stencyl/]
   at Box2DAS.Dynamics::b2World/Step()[/home/stencyl/]
   at stencyl.api.engine::GameState/innerUpdate()[/home/stencyl/]
   at stencyl.api.engine::GameState/postUpdate()[/home/stencyl/]
   at stencyl.api.engine::GameState/update()[/home/stencyl/]
   at org.flixel::FlxGame/update()[/home/stencyl/]

The majority of these problems I googled suggested it had to do with complex Box2D collisions.  However, to the best of my knowledge, collisions have been turned off for all of my tiles, and all my actors don't use the physics engine.

Another suspect is that the scene is simply really large.  It uses 22x22 size tiles, and has the dimension of 112x186 tiles over two layers.  There is a third layer that's just there for utility purposes, and holds no tiles.

What do?

Resolved Questions / [Solved] Loading scene thing?
« on: July 02, 2012, 07:37:44 pm »
I was able to test out a fully built level (one scene) of my own game today, and I noticed that there was a small delay before the game was playable.  The game runs fine after the creation step.

Is there a way to have a "loading" sort of mechanism to let the player know that the computer is preparing the level, and isn't hanging on them?

Resolved Questions / [Solved] What does propertyChanged() do?
« on: June 28, 2012, 05:37:07 pm »
Inspired by this thread on performance optimization.

What does propertyChanged(variableName:String, variable:*) do?

This is the line of code that appears every time you modify an attribute.  It also appears to severely limit performance if you're trying to crunch a ton of numbers per cycle.  For example, if you put 100 increment attribute blocks in a loop set to run 100,000 times, it takes my computer over 5 seconds to compute.  However, if you put 100 code blocks that increment the same attribute and invoke propertyChanged() at the end of each loop, it takes 10 times less time to do it.

I'm posting the test below, and the results.  For tests 1, 2, and 3, there shouldn't be a difference whether I use Stencyl's increment blocks or the code blocks.  I wanted to increment maordesu to ten million, but the script was timing out on me  :(.

Test 1: Repeat 9,000,000 times, increment by 1.
Test 2: Repeat 900,000 times, increment by 10.
Test 3: Repeat 90,000 times, increment by 100.

Test 4: Repeat 9,000,000 times, increment by 1 using Stencyl's increment block.
Test 5: Repeat 900,000 times, increment by 1 10 times using Stencyl's increment block.
Test 6: Repeat 90,000 times, increment by 1 100 times using Stencyl's increment block.

Test 7: Repeat 9,000,000 times, increment by 1 using code blocks.
Test 8: Repeat 900,000 times, increment by 1 10 times using code blocks.
Test 9: Repeat 90,000 times, increment by 1 100 times using code blocks.

Old Bugs (1.x/2.x) / Game won't start due to custom code
« on: June 27, 2012, 02:25:07 pm »
I decided to screw around with coding and made my own custom object.  Nothing much, just a few variables, getters, and setters.  This is not a behavior.

To test my object, I put in a few lines of code in the "when created" event for a scene.

Code: [Select]
var mob:Monster = new Monster(1, 2, 3);
print(mob._ID); //expected to fail

The first couple of times things were fine.  But when I added more variables and function to my object, I tried to test again, and the game simply failed to load with no error message.  The preparation and waiting time went by abnormally fast.  I tried to reverse all previous work, but the same thing happened.  My game refused to load up until I removed the code above, then it acted as if nothing happened.  Restarting Stencyl did nothing to help the problem.

EDIT: Found the problem.  One of my lines had a colon instead of a semicolon.  Regardless, Stencyl failed to notify me of the problem for whatever reason until I refreshed attributes and checked for syntax.

I set up a test scene consisting of a couple of rooms.  If the player exits the current room, the camera is supposed to follow the player just like classic Zelda.  But when I coded up my own speed behavior for the camera (forgoing attaching it to an invisible actor), I found out that something was amiss.

Apparently, when you tell the camera to move somewhere, it will move so that the center of the camera will move to that spot.  If you get the x or y value of the camera, it will return the top left corner of the camera, just like it normally would with actors.

I can see the value of using the camera's center, but since there's nothing to distinguish between the center and the top left when using the functions, I would suggest either providing the option of both, or making them consistent with each other.

Ask a Question / Make the pen stop following the camera?
« on: June 26, 2012, 09:56:10 pm »
I managed to wire up the virtually lagless actors and even incorporated smooth movement in a grid-like fashion.  But when I moved the camera, I discovered that my actors are behaving as if they're not anchored.  More specifically, when I move from room to room, the rooms slide appropriately, but the actors behave as if nothing happened and stay in the same spots on the screen.

Each scene is composed of multiple rooms in any various configuration.  I can't just make each room their own scene, since I'm going to be abusing the sliding transition, and the scene transitions take the HUD along with the room, when the HUD is supposed to stay in the same spot.

It seems like there should be a way to make the pen stop moving with the camera.  Is this possible?  And if not, is there an easy fix to this problem?

Paid Work / Beta tester available!
« on: June 20, 2012, 10:31:47 pm »
I enjoy games, and I enjoy helping!  And I have a habit of picking apart things.  It's only natural that I offer up my services as a beta tester!

I have some serious general gaming cred to back up my comments and opinion on flash games.
-- In-depth reviews and criticisms. Please note the date on these reviews.  There was a time where I was just a derpy child doing childish things, and this account is really old xD
-- Achievements earned, to prove that I am skilled and thorough.  I even get a good number of secret achievements without receiving help.  Here's the medal rankings list for comparison (sorry, no official list seems to exist).  Just to be clear here, I don't play games to be number one, I just play games because I like playing games.
-- If for some reason you need something stepping into serious commercial territory, I can still serve in that capacity.  The best public profile of my skill and attention to detail would be my League of Legends ranking: season 1 Silver tier in Summoner's Rift ranked solo queue, which is approximately in the top 10% of players that have played season 1 Summoner's Rift ranked solo queue.

What do I require for my services?
-- For a play of your game just like any internet surfer would, mention your game here.  That's all.  Based on what I experience and how far I've played, I'll leave first impressions, criticisms, details, and suggestions.  If your game is especially good, I'll probably go the extra mile to do my full services anyways, at no cost to you.  This is basically the "no guarantee" option.
-- If you want me to thoroughly test everything (for a typical flash project) and/or spend many hours testing, I require a mention in the credits in the final product.  I'll leave first impressions, criticisms, details, and suggestions.  I'll try to honor major deadlines you may have, but I can't guarantee that I'll hold your hand from version 1.01 to 1.02 or something like that.  Failure to give me recognition in the credits will result in me badmouthing your reputation.
-- If you're wanting me to beta test projects that require a serious commitment (probably much larger than anything that I've seen in flash portals tbh), that's when I require money for my time.  A PM to negotiate a deal will be required.

Some things to be aware of:
-- I'm currently developing my own game for the Stencyl Jam 2012 on Newgrounds.  I've also had the misfortune of it blowing up on me, so I'm scrambling to recover what I can and make up for lost time.
-- I actively play medal games on Newgrounds.  Depending on the flow of medal games and how many medals there are to get, I could become pretty busy.
-- Most of my public reviews and criticisms contain negatives.  That's because many other people say a lot of the positive things!  In my private reviews, I try to do both the positives and negatives.  I don't try to go out of my way to insult you, but if you wilt and cry, or throw lots of ad hominems my way, then perhaps I am not for you.  Or you're not fit for serious game development.

Resolved Questions / [Resolved] Files corrupted. What can I salvage?
« on: June 17, 2012, 06:36:59 pm »
Well, this absolutely sucks.  Computer pulled a fast one on me while I was Stencyl was doing its processing thing when I hit "test scene".  One hard reset later, and now I found out that the .xml files are corrupt.

Fortunately, I do have a backup folder of my game!  Unfortunately, it's from 5 days ago, when some of my behaviors don't exist, an actor is missing, and some attributes and game attributes are added/deleted/changed.

What can I salvage from this mess?  I'm specifically interested in salvaging a behavior that took a while to code.  I don't want to have to do it all over again x_X

Ask a Question / Keep the HUD while transitioning scenes?
« on: June 16, 2012, 04:06:13 pm »
^ As title.  Basically, the HUD will always be where you put it, and it will always be visible when you do sliding transitions.  (Why is the design mode input in milliseconds as opposed to seconds?)

I have a feeling the answer's going to be no, but it doesn't hurt to ask xD

Ask a Question / Order of actors in loop?
« on: June 10, 2012, 08:17:02 pm »
In scenes --> for each (actor of type), what order are the actors in?  I tried positioning, order of placement in the scene designer, and ID, but there's no apparent rhyme or reason that I can find.  All I know is that the order is consistent.

Maybe I'm going in over my head or something... but I'm getting frustrated and I don't want to have to waste too much time, so now I've come to you guys for help.

Basically, the game is turn-based, uses a grid, no Box2D.  There's going to be 11 controls: 9 of them correspond to a direction and 2 of them correspond to attacks.  The player has the option to tap a control to do the action once, or if they hold the control down for a small amount of time (say 0.75 seconds), they will repeat the action much faster.  This delay should be consistent, and the repeat action sequence should not go off prematurely.  The repeat action sequence should also not go off if the player presses a different control during the waiting time.

The best that I could come up with is posted in the attachment.  The actual movement of the actors is very similar to RPG Town's example code (snapToGrid, checkTileCollision, moveActor).  Glitches that I've found with this code:
-- Double-tap a direction and hold on the second press, guy starts "running" sooner than intended.  This will screw up people if they're mashing a direction key.
-- Mash random directions, hold a control, and end up "running" in a direction sooner than intended.  Basically it's the first glitch, except different directions were involved.
-- Same as the above two, except somehow the guy stays in one place and spazzes out in the middle of "running".  This is a lot harder to reproduce, and I'm not sure why it's happening.

What's the best way to go about getting the desired control scheme?

In terms of computer resources taken, what's the difference between an input listener and a block of "always" code that does something when a key a pressed?  A pic for those confused by what I mean has been included.

Related, more specific question: how often do the listener and "always" code run?  Every frame?  Even faster?  Whenever a star goes supernova?

Resolved Questions / [Solved] getTileAt Null Error
« on: May 31, 2012, 04:31:21 pm »
I'm attempting to code for an array of numbers whose main purpose is to handle collision detection and decide whether the player/monster can move there or not in a grid environment.  Performance optimization is a concern of mine, so hopefully I can do away with Box2D entirely if need be.

I wrote a routine that can automatically populate the array with collision data based on what tiles were used in the scene creator (see pic).  Unfortunately, when I run the game on my first scene, I'm getting a pesky null error (#1009) at the second Code block.  It doesn't even print "2" in the console since the first tile encountered is a null tile.  I've tested the routine on a scene that doesn't have any null tiles in it, and it works fine in that case.  However, to save myself some headache and to handle a bigger variety of situations, I would like for it to handle null tiles and complete the operation.

When I looked at the grid-based movement in the RPG Town example, I noticed that they also do null tile handling.  The difference between their code and mine is that theirs works!  I looked at the Stencyl API to see if I can understand why it works, but I couldn't.

So now I ask the community: why is it that my code gets null errors, while the RPG Town code does not?

RPG Town tile getter code:
   var tileLayer = (FlxG.state as GameState).scene.terrain[curLayer];
   var t:Tile = tileLayer.getTileAt(__y, __x);

My tile getter code:

Pages: 1 2