Maxplayers problems

Chris Monvel

Active member
I got a huge question while creating my game. According to the manual you can declare how many players can join per game set.

Well i did so because my MAIN GAME set has two players since it's specifically focused on a coop gameplay and also an UNLOCKABLE BONUS MODE only for one player. And yeah essentially that happened, the Main Mode has two players and the Unlockable Mode has one player, the problem is that the latter has a bug that causes A LOT of lag and the frame rate is very poor, making it practically unplayable.

Is that normal? If so, my Unlockable Mode might not be a reality then because it was specifically conceived as a single player mode.
 
Valentine Wong,

The number of players really shouldn't affect speed at all. It's far more likely there is something else is the culprit. Can you tell us something about the special stage?

DC
 
Yes. Well, it's an ordinary stage, with notime set. In my Levels.txt i didn't declare the maxplayers for the MAIN MODE since i assumed it was no necesary because it's the default one and it even works perfectly as usual but when i load the BONUS MODE (the one with one player) to make some tests the frame rate drops and precisely the game speed decreases.

This is how my text file looks:


---------------------------------------
set Main_Mode
nosame 1
noshare 1
credits 9
lives 3
hiscorebg 1
completebg 1
p1smenu 65 230 82 245
p2smenu 415 230 420 245

file    data/levels/begin/begin.txt


set Bonus_Mode
maxplayers 1
nosame 1
noshare 1
credits 30
lives 3
ifcomplete 0

file    data/levels/bonus/bonus.txt
 
I declared the maxplayers with the respective specifications in each level set and things seemed pretty normal but i've figured out something. I made a test level for the Bonus Mode and it seems that Openbor's speed decreases with plain level stages:

index.php

The green color is the wall and the blue color is the floor. Like i said, Openbor seems to work in a very weird manner with these type of stages because i tested the Bonus Mode with a normal stage (one fully drawn) and it worked perfectly. Weird.

I think i fixed it XD Thank you so much for your time anyway. I appreciate it.  :)
 
Valentine Wong,

I can't see your images for some reason, but I'd still like to take a look at the resources and text for your bonus stage. I use blank stages all the time and don't have any problems. Seems something really weird is going on.

DC
 
Oh I'm sorry, i tried to attach an image of my level but since the forum totally changed since my last visit i couldn't get it right, I'll try it one more time once i get my hands on a computer tonight.

You know what I discovered too? The blank level was not a problem, it was actually the length of it. I designed this test area using the current size of the screen without a scrolling feature, which means i only used the visible on-screen area to make it. Openbor reacts strangely to a small-size area. I'll try to send you some pictures with my text tonight.
 
Valentine Wong,

Valentine Wong said:
...Openbor reacts strangely to a small-size area. I'll try to send you some pictures with my text tonight.

I'm not trying to dispute your word, but the thing is... it really doesn't work that way. I use levels with the design aspects you describe on a regular basis for testing and debugging, and none of them cause any issues. The same code does the same work regardless of of size or shape. There's only a few possible ways to slow it down:

  • Pile on more stuff than the hardware can render at full speed. Most contemporary PCs running a 480*272 resolution module need ~1000 sprites to cause any noticeable slowdown.
  • Using a very tiny (~20 pixels or less) image for a background layer and setting it to infinite repeat. This one is very unlikely because when it occurs the engine will shut itself down.
  • Accidentally triggering the slow motion effect.
  • Some undefined behavior caused by an anomaly in the module's deign (scripts, models, faulty images, etc.).

IOW, smaller stages just can't cause slowdown because they're small. That's why I'd really like to see what you have. I bet it's something we can find and fix.  :)

DC
 
Openbor reacts strangely to a small-size area
I never saw such thing. I saw the opposite, with big images.
But that was my fault, using a 15000px wide image with water raster effect on it, lol.

As Damon said, small stages can't slow down the engine per se. very tiny images with infinity repeat does - and is that way in many engines I know.

I think it would be better if you host your test somewhere so you we can take a look., If you want, you can send the link by pm.
 
nsw25 said:
I have observed frame rate drop (or perhaps more accurate frame skipping ? as there isn't slow down per se, but more of a jump and skip in animation) on multiple occasions and both on PC and android, but unsure what culprit is and cant try to get a particular event or game to replicate it on command.

Good luck getting to the bottom of it as I would be very curious to know.

I can't speak for the Android port. I just don't know anything about it. I've seen the frameskip now and then - but the thing is, I see it just as often on every other app I have too. Word, Excel, Photoshop, you name it, they'll glitch. An easy game example is Streets if Rage Remake. Once or twice a game it will have some skips, and that's on an absolute top of the line Alienware gaming Laptop with 64GB of RAM.

Consequently, I've pretty much written off frameskips as inevitable. Since there's no way to reliably reproduce them, there's nothing to diagnose and fix. All I can do is find every bottleneck I know of and eliminate it, but at this point there aren't too many of them left.

This does remind me nsw25, I revisited your coin collection mod last Summer, and discovered of all things, the slowdown wasn't slowdown at all. It's the slow motion effect activating. That's why the module ran at full speed until you collected one or two coins. I don't recall the specific reason why, but it was a catch-22 situation going on with no easy fix. But if you ever want to have another go, there's a starting point for you.

DC
 
This is my text file:
-------------------------------------------
set Main_Game
maxplayers 2
nosame 1
noshare 1
credits 30
lives 3
ifcomplete 0

file    data/levels/begin/begin.txt



set Bonus_Mode
maxplayers 1
nosame 1
noshare 1
credits 30
lives 3
ifcomplete 0

file    data/levels/test01/test01.txt
--------------------------------------------------

Test01 is the level causing conflicts. The Bonus Mode, which uses the Text01.gif is a bit problematic but i tested the same Bonus Mode using a common stage (one fully drawn) and it works perfectly. I mean i could simply use a finished level but the conflict is actually caused by the stage lenght, which only uses the visible area in the screen, there's no scroll or anything else in this level. This is it:

 
Mmmm.... it's hard to tell the cause with only picture and level info.
The best way for us to know what's wrong is by playing the level ourselves. Do you mind uploading your mod so we can try it? :)
 
Back
Top Bottom