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

Pages: 1 2 3 4 5 6 ... 8
Windows / Mac / Flash / HTML5 / Re: Frankie's Revenge!
« on: May 03, 2012, 12:13:45 pm »
Since publishing I've spotted some bugs with Z-sorting. For those of you who haven't used the technique before, basically z-sorting is where you move sprites from one layer to another to give the illusion of depth. Here's my issue:

while trying to fix a z-sorting error, I used ' Send Self to Layer 0', which is at the back. The layer is set to visible in the scene.

When I run the game, my character disappears every time this layer is used, as if it were set to be invisible. Any ideas on what might be causing this? I'm seriously lost...

Have you tried sending him to other layers by number, to see if others work properly? Also, are you sure you don't have a background image or a piece of terrain or something in front of layer 0, blocking your actor?

Old Bugs (1.x/2.x) / Re: Plummeting performance
« on: May 03, 2012, 09:31:01 am »
How do you dispose of those bullets?

If possible, can you make this a simple game and put it up on forge for us to investigate? You can just spawn a bunch of these bullets at a periodic rate and kill them.

I've tried both killing and recycling the bullets. Recycling actually caused the problem to become significantly worse. I didn't do too much experimenting in that direction, though.

Well, what the hell. I didn't want to make it public in such a terrible state, but here's a link to some actual gameplay: I've sped up bullet production to make the problem show up, quicker. Ignore the debug "Upgrading to xx" message, it is doing literally nothing. As you can see, the framerate starts out fine, but rapidly plummets and never recovers, despite actor numbers remaining fairly steady.

Coleislazy - you replied as I was typing this. I address the recycled actor issue in the paragraphs, above.

Old Bugs (1.x/2.x) / Plummeting performance
« on: May 03, 2012, 02:41:30 am »
I have a problem that only seems to have shown up since I upgraded to the release build of 2.0. The game I am working on seems to have developed a strange resource leak. The game runs fine for a few minutes, then starts to bog down, and eventually the frame rate hits single digits. The problem is worse in the standalone player, but it shows up in the browser, too.

My first thought was that I had actors not being properly disposed of. So, I wrote a behavior to display every single actor type and a running count of how many of each actor exist in the current scene. That does not seem to be the problem, all created actors are being destroyed, and the numbers all fall back to zero as actors leave the screen/are destroyed by bullets/whatever.

Next, I conjectured that I had an out-of-control behavior doing something silly, so I wrote a profiling behavior and timed every single behavior being used in my game. Although I do have a few resource hogs, they are all fairly stable. I don't have any behaviors that expand to gobble up more and more cycles as they run. So, that also doesn't explain the creeping slowdown.

My actors are being properly disposed of, and my behaviors are crunching along at a steady pace, but my game keeps slowing down, anyway. It _seems_ to be centered around creating and destroying actors. I say _seems_ because I really haven't been able to pinpoint the problem, but I can sort of coax it into happening by creating and destroying a ton of actors. It isn't the actual creating and destroying that eats up the time, though. The slowdown continues even after the actors have been created or disposed of. The game behaves as if there are many actors in play, even when the actual count shows few or none.

Here's an illustration of the problem:
I have a character that produces a burst of bullets. The frame rate takes a hit when the bullets are created, but jumps right back to 60 FPS as soon as the creation is complete. The bullets go zipping off the screen and are destroyed. After a few dozen bursts, I notice that the frame rate is taking more of a hit, and not recovering as quickly. Instead of dropping to 50 FPS when the bullets are created, it drops into the 30s, and takes a couple of seconds to get back to 50+. Then, after a few dozen more bursts, the frame rate drops all the way to single digits every time there is a burst, and takes a long time to recover, and never actually recovers all the way to FPS, instead hitting the 20s or 30s. Essentially, the game is acting like I have dozens and dozens of actors in play, even though the actual count is zero once the bullets fly off and are destroyed. It's as if every time I created an actor of type "Bullet," every "Bullet" that I ever created (and destroyed) is being processed. The "Update" and "Render" times jump through the roof when the new burst is created, then  settle down some once the bullets fly off the screen. This gets worse and worse as the game plays on. At the beginning, the increase in Update and Render time is not even noticeable.

I have a game uploaded under my account with "Trimmed" in the name. I don't want to make it public, but the Stencyl team are welcome to look at it. It's not perfect, but it's the easiest way I could fine to demonstrate the issue. The problem is actually worse in a "real" game, where multiple types of actor are being created and destroyed, and multiple actors are shooting bullets at one another. It works like this: Load the game, and hold your Shift key down right from the beginning. Holding Shift shuts off the bullet firing behavior. While holding Shift, hit the tilde and look at the Update, Flixel, and Render times. On my computer, they are something like 0ms Update, 6ms Render, 6ms Flixel, 8ms Flash, 14ms total, 60FPS. Let go of the Shift key and let the ship spew bullets for a few minutes. Now, hit Shift, again, and notice that Update, Render, etc, stay much higher than before and the FPS drops (on my computer) by a solid 10+ FPS. Repeat the process, and watch how Update, Render, etc, creep even higher, as the framerate bogs down. The yellow text on the left shows a running count of all actors in the game. You'll notice the performance degrades despite the number of actors settling back to 0 every time. I've tried this on three different PCs with completely different hardware (probably different versions of the Flash player, too, but I didn't check) and they all show the same problem. I did not notice this happening pre-2.0.

As I mentioned, it takes longer for the effect to show up in the browser (Firefox, for me), so leave the game sit a few minutes if you want to see what I'm talking about.

Chit-Chat / Re: Where are you from?
« on: May 02, 2012, 09:15:56 pm »
I live in Las Vegas, NV, USA.

Shared Resources / A very simple code profiler
« on: May 02, 2012, 07:53:51 pm »
"Profiler" is probably a little too grandiose a name for this behavior, but it'll do.

Ever since I upgraded to 2.0 official, I've had a bizarre resource leak problem in a game that was working fine, before. I suspect it may be a Stencyl bug, but I don't want to assume that until I've exhausted all my options. I've spent the last four or five days trying to track down the problem with no real success. So, I am now going to profile every behavior in my game to see where the time is being spent. To that end, I've written a very simple behavior for timing other behaviors. This behavior is seriously alpha-stage, and I wouldn't normally release such a half-assed behavior to the public, but I don't see anything like it on the Forge, so I am going to go ahead and upload share it.

The behavior is called Nomosoft Scene Profiler, and it works like this:

1) Attach Nomosoft Scene Profiler to a scene in your game.
2) Customize the font, font color, and x/y coordinates where you would like the profiling information to be drawn.
3) Inside the behavior(s) you want to profile, drag in the "Start Profiler" custom block from under "Nomosoft Scene Profiler" on the "Custom" palette. Give the profile a name by filling in the text box on the "Start Profiler" block.
4) Drag the "Stop Profiler" custom block into the bahvior and place it in front of any exit point(s) in your behavior. See the attached screenshot for an example. Make sure to use the same name you did when you started the profiler.

You can use more than one profiler per behavior. So, if you want to profile the entire behavior, you might put "Start Profiler [My Behavior]" and "Stop Profiler [My Behavior]" at the very top and bottom of your behavior's update/draw/whatever function. If you want to profile a sub-section of the function, start another profiler, such as "Start Profiler [My Behavior Targeting Loop]." Remember to Stop Profiler, as well, or you will not get accurate numbers.

Profiling data is displayed on screen in this format:
[Name of profile]: [total milliseconds used] [[average milliseconds per call]]
As of right now, no effort is made to adjust the layout to fit everything on the screen. If you profile too many things at once, they will run off the bottom of your game's window.

Please note, in the screenshot, below, I could have simply started the profiler after the "if active" check, but I wanted to demonstrate how you should stop the profiler before any exit point in your behavior.

Windows / Mac / Flash / HTML5 / Re: Dude's where's my planet!?
« on: May 02, 2012, 06:09:08 pm »
Man, the game was hard enough without the Machin Shin. Outrunning that thing can be rough.

Game Art / Re: Look upon my mushrooms, ye mighty, and despair.
« on: April 30, 2012, 09:30:37 pm »

Image 2: the light radial gradient was too intense. But the shapes are good.
Image 3 and 4 are great  :)

Thanks for the feedback. I toned down the highlight in this verion (see below.)

Picture #4 (the green mushroom character) is not mine, I used it as a reference when I made the orange and red mushroom guy.

Game Art / Re: Look upon my mushrooms, ye mighty, and despair.
« on: April 30, 2012, 08:34:51 pm »
As an Inkscape user (and Corel Draw before that), vector art is definitely different than raster graphics. You're doing well though!

Your comments seemed to be aimed at osiaslemuel's image, but would you mind commenting on the ones I've attached to this post?

The ghost is from a tutorial, but I made a few modifications.

The orange mushroom was just another attempt at getting a cool video game mushroom.

The red-and-orange mushroom style character is something I did on my own, using the fourth picture (the green mushroom character) as a reference. Do you think I did a reasonable job recreating the feel of the green mushroom? I had to figure out all my own techniques as I went, but I feel like it actually came out quite well (by my rather low standards.)

Feedback on any of my efforts is appreciated.

Game Art / Re: Cheap game graphics!!!!!
« on: April 30, 2012, 05:43:11 pm »
Does anyone know any sprite sheet compilers? Or do I have to put them together in photoshop?

Here's one from Reiner, who is something of a god in the hobby game programming world:

It's not the greatest in the world, but it is the only one that I always know where to find. There are others that you have to track down through old Megaupload accounts and stuff that are just too much hassle to acquire.

Chit-Chat / Re: free tilesets for your games.
« on: April 30, 2012, 02:24:58 pm »

*Basic tileset is available for free, with additional tiles available for unlocking. Inside corners for $2, Outside corners for $5, background and foreground objects $0.50 per tile or $10 for the set of objects. Additional themes available as downloadable content Bonus Packs also.

What am I missing, here? I feel like there should be a post somewhere in this thread that puts the one above in context. Was someone in here giving away "free" tilesets with silly restrictions? I recognize the photo as one of DanC's free tilesets, and I know he doesn't do stuff like that. I feel confused, and lost. Also, a little lonely. Maybe hungry.

Game Art / Re: Look upon my mushrooms, ye mighty, and despair.
« on: April 30, 2012, 04:14:59 am »
Here is my finished product:

If you need any help in making game art just tell me, maybe I can help.  ;)

That's a nice one. I just took another shot at the mushroom and I think I've got the process down pretty well. I always need help with graphics, I am completely hopeless in that regard. I'm thinking about buying some graphics for my space shooter, but it would be nice to become competent enough to roll my own.

Game Art / Re: Look upon my mushrooms, ye mighty, and despair.
« on: April 30, 2012, 12:21:15 am »
Here is a site with tutorials on how to use inkscape.
It is specialized for programmers and non artist so I think it will help you a lot.

Here is a tutorial on how to create a mario-inspired mushroom, but he use adobe illustrator.
But you can still get some ideas.

Thanks for the links. I've actually been reading the first site, and I like it, but he leaves out a lot of details. For instance, his grass tile tutorial doesn't show how he got the great shadow/highlight effect. He mentions it in the comments, but doesn't give details.

The second one is kind of trippy - I actually saw that 1-Up banner, and that was what inspired me to make the mushrooms, in the first place. I didn't know the banner was related to a tutorial. The way he does it is pretty much the way I did it, making it up as I went.

Game Art / Re: Cheap game graphics!!!!!
« on: April 30, 2012, 12:16:11 am »
You should definitely think about arranging your products into tilesheets. Pretty much all map editors import graphics that way, and many libraries for programming languages do, too. If you decide to do that, tell us when it's done, because I see a few sets I would like to buy.

Game Art / Re: Look upon my mushrooms, ye mighty, and despair.
« on: April 29, 2012, 03:21:40 pm »
I actually did make the reflection on the red one way off-center, but I forgot to re-render it. I'll try a thicker border and see how that looks. I fiddled with everything up to an eight pixel stroke, but ended up going with the minimal version you see, here.

I will definitely check out that program! I can use all the help I can get. Thanks for the feedback.

Windows / Mac / Flash / HTML5 / Re: Dude's where's my planet!?
« on: April 29, 2012, 03:18:58 pm »
I love this, great concept and great execution. I really like the fact that it's not just another "hold mouse button until power reaches X" game mechanic.

Pages: 1 2 3 4 5 6 ... 8