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 ... 8
31
The ejected spent cartridge looks awesome, nice attention to detail. Those little touches can really separate a game from the pack.

32
Old Bugs (1.x/2.x) / Re: Plummeting performance
« on: May 05, 2012, 08:19:23 am »
Create/Kill shouldn't cause a FPS drop, it should always have the same impact on performance. Creating an actor is slow compared to "creating" a recycled actor, but it shouldn't become slower over time.

I went into this assuming the slowdown was not "supposed" to happen, but it definitely does. Any ideas why? It really looks like killed actors are leaving behind ghosts who eat resources.


Create/Recycle is not supposed to be used together, so that's not an issue.

I think this still qualifies as an issue. "Compiles and executes, but utterly cripples your game" is a pretty poor outcome for this scenario. I think we'd be better served by having the game throw an exception or error, rather than happily gobbling cycles and RAM until the game halts, completely.

Also, there may still be an underlying problem. The performance loss is not linear. It isn't like we're adding thirty items at a time to the recycled actor pool and it's causing a gradual slowdown, it's more like the entire pool is being doubled or trebled every single frame.

New data: I attached my Scene Profiler behavior to both of the behaviors/events in the FPS test game and got some interesting/bizarre results.

Format = Block being used | Total milliseconds | Average milliseconds per call | Approximate FPS
Start = Data from first few frames of gameplay, Final = numbers after allowing program to run for some number of minutes

Create / Kill
(Create Start) | 128ms | 32ms | 60fps
(Kill Start) | 2ms | 0ms | 60fps
(Create Final, 24 minutes) | 41700ms | 32.6ms | 30fps
(Kill Final, 24 minutes) | 182ms | 0ms | 30fps

In this scenario, the problem is obviously happening outside of our behaviors and events, since the behavior profiles don't change, much.


Create Recycled / Recycle
(Create Recycled Start) | 258ms | 10.75ms | 60fps
(Recycle Start) | 420ms | 1ms | 60fps
(Create Recycled Final, 22 minutes) | 35472ms | 8.89ms | 60fps
(Recycle Final, 22 minutes) | 12300ms | 0.85ms | 60fps

No FPS loss or obvious resource drain.

Create / Recycle
(Create Start) | 37ms | 1.16ms | 60fps
(Recycle Start) | 134ms | 44.67ms | 60fps
(Create Final, ~2 minutes) | 3703ms | 88.17ms | 1fps
(Recycle Final, ~2 minutes) | 18856ms | 16.51ms | 1fps

Now, in this case, you can see that the slowdown came in the actual create and kill blocks, inside the behaviors. Unlike Create / Kill, where the profiled times stayed about the same despite the FPS dropping, this time we can actually see where (some of) the lost time is going. Clearly, although the creation block takes the most time per call (it is creating 30 items at a time), it is the actual recycle command that eats up most of the milliseconds. While the creation time just about doubled per call, the recycle time went up by over 10x. Whether or not those blocks are meant to be used together, I am guessing there is something in there that is not performing exactly as expected.

33
Old Bugs (1.x/2.x) / Re: Plummeting performance
« on: May 05, 2012, 03:46:01 am »
Seriously, with upcoming 2.5, it would be nice if you can hang around to test and uncover all these nitty-gritty things. Particularly in android and html5 domain.

I've already decided not to invest too much in Stencyl. I won't bore you with details, but I discuss why in the Stencyl Pro thread. So, I can't make any promises, but if I'm around when 2.5 hits, I'll certainly contribute anything useful I come up with.

So there is no issue at all. It's just a matter of reminding users to use above strategy.

Well, there's definitely an issue, but it looks like we've found a workaround. The workaround may have issues, too, though. See my other thread about recycled actors.

34
Old Bugs (1.x/2.x) / Re: Plummeting performance
« on: May 04, 2012, 06:06:55 pm »
Well done here. We definitely need more users like you to help nail down some of these gray areas.

I have two talents: I can sing, and I can beta test. If I could find people to pay me steadily for either one, I'd be in hog heaven. There are many projects floating around out there with my stamp on them in everything from features and interface design to reliability. Once I get my teeth into something, I don't like to let go.

I've done a study with the 4 scenarios you mentioned:

FPS Study

Create Recycled/Recycle -> 40-50 fps all the way
Create/ Kill -> 40-50 fps down to 18 fps after 15 minutes
Create Recycle/Kill -> 40-50 fps down to 18 fps after 15 minutes
Create/Recycle -> 40-50ps down to 2 fps within 2 minutes; game at 0 fps and not moving at all after 5 minutes

where:

Create Recycle -> create recycled actor as part of scene behavior
Create -> create actor as part of scene behavior
Recycle -> recycle self as part of actor behavior
Kill -> kill self as part of actor behavior

My system takes a bit longer to bog down, but, other than that, I'd say our numbers agree quite well.

35
Old Bugs (1.x/2.x) / Re: Plummeting performance
« on: May 04, 2012, 05:20:53 pm »
Let's just try to reduce this one by one and see if you can nail down the culprit with your game.

You rare absolutely right. If I use recycle actor/recycle for my game, I do NOT see any (hardly any) degradation at all.

One more very important note - my window task manager showing flash-10-win.exe at constant 37K mem usage. The other combinations showing much larger memory leak of up to 230K and bigger if I let it go for a while.

Yeah, this reeks of improperly disposed assets, which is what I've suspected from the beginning. In addition, I think the logic may be getting processed for some of them, but that's harder to pinpoint. I am working on something else, at the moment, but I will get back around to fiddling with my space shooter sometimes today or tonight.

36
Old Bugs (1.x/2.x) / Re: Plummeting performance
« on: May 04, 2012, 05:03:09 pm »

Also, Rob: I did some more tests.

Create Recycled/Recycle = Minimal problem
Create/Kill = Problem
Create/Recycle = Disaster

Great find, Nomo.

Did you say "Create Recycled/Recycle" has minimal degradation. If so, we just need to use that and stencyl should plan on defaulting to that and plan on to remove the others.

Can you post the exact game or code that you change for Create Recycled/Recycle?

I would really like to test it.

I have a "Die" behavior that all my actors share. So, to recycle, I just swap the "recycle" block for the "kill" block. Same thing with creating actors - I have a very complex spawn behavior that can spawn a single actor type, or multiple actor types from a list in order, or multiple actor types from a list randomly, and it can spawn every X seconds with Y probability, it can spawn in the visible screen area, or anywhere in a scene, or randomly in a selected region, and on and on, but it only has one "create" statement, and I can just swap that with a recycle. The thing is, when I tried it inside my game, I did not see the same minimal degredation. I will have to try, again.

Edit: Oh, and bullets are all spawned by my "Gun" or "Burst Gun" behaviors, and those also each have only one create spot, so it's easy to swap out. I still saw slowdown, I think. I will check again.

37
When I recycle an actor immediately on collision, then create a recycled actor of the same type, the new actor's Y-speed and rotation speed are both still set to the previous actor's values. This happens even if I use a "set y-speed to 0" block immediately before using "recycle self." So, not only do some values seem to be carrying over, it would appear that new values (at least those set in a collision event) don't take effect, immediately. I don't know if there is some sort of buffer that sets the properties the following frame, or what, but it may need to be flushed on a recycle call.

If I "create recycled" twice, without a "recycle" call in between, the values are zeroed out.

38
Old Bugs (1.x/2.x) / Re: Plummeting performance
« on: May 04, 2012, 04:34:57 pm »
I suspect this is a Stencyl issue, but I can't say for sure.

However, I have just discovered a bizarre bug with recycling actors that may be related to this. I am fiddling with it, now, and will post a thread if I don't figure it out.

Also, Rob: I did some more tests.

Create Recycled/Recycle = Minimal problem
Create/Kill = Problem
Create/Recycle = Disaster

39
Shared Resources / Re: seeking coder for paid position
« on: May 04, 2012, 12:38:49 pm »
Hi guys,

I'm looking for a stencyl programmer/coder to join our team and this would be a paid position, and not only for one game if both parties find it fine for long term cooperation etc.

If interested you can drop me a line at admin-at-relaxonlinegames-dot-com

have fun,
Hashem

It would help a lot if you provided some more details, such as what kind of pay you're offering, how many hours commitment you need per week, what sort of projects you have in mind, and so on.

40
I am looking for some future collaborations as well. I am primarily a programmer with several years of experience.

I just finished working on an online multiplayer game called Kingdom Island - http://kingdomisland.com

It wasn't developed with Stencyl (it was developed with C++) but I just picked Stencyl yesterday, went through the wiki and feel really comfortable using it to develop some flash games.

I am working on several projects right now but am really interested in working with other developers (artists and programmers alike, even music composer). Collaboration is extremely crucial not just for self development but also to network.

I'm basically looking for a lot of people to collaborate with. My goals are to develop a multitude of quick small games and a few larger projects. The small to large game ratio I'm estimating would be something like 5-1.

Of course coming up with the game ideas will be more difficult than the implementation (atleast for me as an experienced programmer) but I'm working on a unique approach of how a game studio develops video games, an approach I'm not aware is largely done. The first step to this approach is collaborating with other fellow indie developers. I'll tell you more once we get to know each other on a more personal level as fellow indie devs. :D

PM me if you're interested or if you know someone that might be interested.

I'm always interested in hearing proposals for collaboration. I have varying levels of proficiency in BlitzMax, Monkey, PHP, PERL, C#, C++, and Stencyl (although I know only a little actual AS3.) I prefer hobby languages and environments like Stencyl, BlitzMax, and Monkey. I am completely useless for art and music, but I am pretty sharp on coding and ideas.

I have a straight job, so I can't work under boiler room deadlines for writing games, but I can put in a fair few hours per week.

41
Old Bugs (1.x/2.x) / Re: Plummeting performance
« on: May 03, 2012, 05:56:22 pm »
That's great. We should try:

1. create actor, kill actor
2. create actor, recycle actor
3. create recycle actor, kill actor
4. create recycle actor, recycle actor

I am also monitoring the flash-10-win.exe mem usage as it creeps up.

I'm about twenty minutes into running the create recycled/recycle version, and the performance drop is negligible, so far. The thing is, I tried that in my game (all my actors share a single dying behavior, so it's easy) and it did not help. I am going to put "kill" back and see what happens.

42
Old Bugs (1.x/2.x) / Re: Plummeting performance
« on: May 03, 2012, 05:34:18 pm »
Thanks. I'll try both regular and recycle actors and measure them for 0.5 hours each and post my observation in a couple of hours.

RECYCLED ACTORS

START 40-50 fps  (20-30 fps spike)

END (AFTER 30 MINUTES) ---

REGULAR ACTORS

START ---

END (AFTER 30 MINUTES) ---

I left your creation loop alone, but I changed the Kill to a Recycle, and am running the program, again.

43
Old Bugs (1.x/2.x) / Re: Plummeting performance
« on: May 03, 2012, 05:25:49 pm »
I am going to give it a a try here using my game above with absolutely NO changes.

You mean after more than half an hour running, it would degrade like this:

START

60 fps (15 fps during spawn spike)

30 MINUTES LATER

18 fps (3 fps during spawn spike)

I am not 100% sure of the time line, since I was away from my computer, but, essentially, yes. I started your game and let it sit. Some time later, 18FPS.

Edit: In case I didn't make it clear, the degredation accelerates as time goes on. It takes X minutes to lose the first two or three FPS, then only X more minutes to lose the next 10-20 FPS.

44
Old Bugs (1.x/2.x) / Re: Plummeting performance
« on: May 03, 2012, 05:13:30 pm »
Did you say it eventually dropped to 15 fps? If so, how long does it take for this to happen?

What if you swapped in regular actor instead of recycled actors?

Thanks for investigating this. These are my cup of tea also. Get me some good stats. I'll also try on my end.

It was spiking down to 15 FPS while creating new actors. When it started, the FPS barely blipped when new actors were created. I just got back from the bank, and the program is down to 18 FPS, (~42ms update, ~52ms Flixel), dropping to 3 FPS with ~300ms update and ~ 270ms Flixel when new actors are created.

45
Old Bugs (1.x/2.x) / Re: Plummeting performance
« on: May 03, 2012, 04:00:21 pm »
I've created a simple game that:

1. create 30 recycled actors on the screen every second.
2. kill them in 1 second.

Using flash player and turning on debug with ~, I see my fps constant at around 40 (with quick dips during spawn) but I do not see any degrade over time.

I've win-xp with 1GB ram.

Please see how this game run for you. Possibly change it to show your degrading fps case.

Just stick this game under stencylworks/games folder.

My machine is a Core-i3 2120 @ 3.30GHz, 8 gigs of ram, and a Radeon 6570 graphics card.

The slowdown is less severe in your example, but it is definitely there. When I started your program four of five minutes ago, I was getting 60 FPS, with an update time of ~1ms, a render of ~1ms, and a Flixel of ~3ms. Now, I am getting 58-59 FPS with an update of ~6ms, a render of ~4ms, and a Flixel of ~10ms. It is slowly climbing. I'm pretty sure if I leave it sit while I go to the bank, it will be significantly worse when I get back.

With more things going on, more behaviors attached to the actors, and so on in my real game situation, the slowdown comes much faster. Although it is not as sever in this simplified test program, it is certainly there. In fact, every "create" action is taking much longer, now, than when I first opened your program. Now, instead of a quick flicker while the old actors are destroyed and 30 new ones are created, there is a distinct wiping of the screen, the FPS drops to ~15, and then takes a couple of frames to get back. It's getting worse as I watch. Maybe I should use Fraps or something to record the effect.

Pages: 1 2 3 4 5 ... 8