Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

old 3ds performance problems #2

Open
Trickiy opened this issue Feb 7, 2024 · 38 comments
Open

old 3ds performance problems #2

Trickiy opened this issue Feb 7, 2024 · 38 comments
Assignees
Labels
Performance Laggy behavior

Comments

@Trickiy
Copy link

Trickiy commented Feb 7, 2024

For old 3ds's the home page is slow and sluggish(literally every game too) and the animations for some of the animals on the top screen will not play out(it seems to be only the chicken ), in the pong game the ball physics will be sped up, in jetfighter due to the slow framerate the jet will start spinning and shooting in all directions when moving left/right including the helicopters. Will notify if I see more issues.

@Wolfyxon Wolfyxon self-assigned this Feb 7, 2024
@Wolfyxon Wolfyxon added the Performance Laggy behavior label Feb 7, 2024
@Wolfyxon
Copy link
Owner

Wolfyxon commented Feb 7, 2024

I'll try my best to fix that.
Although it might not be easy since I don't own an old 3DS.

@Trickiy
Copy link
Author

Trickiy commented Feb 10, 2024

A idea I have to fix some of the bugs and issues is to temporarily limit the framerate to simulate the lack of performance so it is easier to debug. and can the faster scrolling be a little bit gradual it's too snappy and even more snappy with the old 3ds specs due to the lowered framerate.

@Trickiy
Copy link
Author

Trickiy commented Feb 10, 2024

And yeah I see how it would be hard, kinda fixing a problem blind I guess.

@Trickiy
Copy link
Author

Trickiy commented Feb 10, 2024

I went into the debug app and noticed that when idle with old 3ds specs the fps hangs around mid 50's but as soon as I start mashing all the usable buttons the framerate tanks to around 10fps.

@Trickiy
Copy link
Author

Trickiy commented Feb 10, 2024

(can't edit comments)and tapping click me kills fps too.

@Wolfyxon
Copy link
Owner

A idea I have to fix some of the bugs and issues is to temporarily limit the framerate to simulate the lack of performance so it is easier to debug. and can the faster scrolling be a little bit gradual it's too snappy and even more snappy with the old 3ds specs due to the lowered framerate.

I've done this before when migrating to the delta time system, but I'll give it a deeper testing. Thanks

@Trickiy
Copy link
Author

Trickiy commented Feb 10, 2024

I managed to get a hold of my shared phone for a bit and recorded a video of what I am seeing. https://www.youtube.com/watch?v=SOzVaL_yy9w

@Wolfyxon
Copy link
Owner

Thanks

@Wolfyxon
Copy link
Owner

I pushed an update that fixed some performance problems and dying to off-screen spikes in Jumpy.

@Trickiy
Copy link
Author

Trickiy commented Feb 10, 2024

Just tested the update Jumpy and Pigeon play with no issues. But Pong and Jetfighter still have issues like the ball in pong and the bullets in jetfighter keep rock skipping in and out of existence. The other bug exists in jetfighter where the player won't move all the way to the far sides and top and bottom most parts of the screens old/new dosen't matter still occurs. But spinning of the jet and helicopters has been fixed.

@Trickiy
Copy link
Author

Trickiy commented Feb 10, 2024

Forgot to mention that the menus feel a bit smoother and in Debug framerate has improved by 10 fps acationally hitting 70fps but spamming the buttons still tanks performance. I think the button detection system is the culprit.

@Trickiy
Copy link
Author

Trickiy commented Feb 10, 2024

Final thing I forgot is the chicken is no longer a statue. :)

@Wolfyxon
Copy link
Owner

Final thing I forgot is the chicken is no longer a statue. :)

Actually I haven't touched the animation code, but good to know lol.

@Wolfyxon
Copy link
Owner

Wolfyxon commented Feb 10, 2024

Forgot to mention that the menus feel a bit smoother and in Debug framerate has improved by 10 fps acationally hitting 70fps but spamming the buttons still tanks performance. I think the button detection system is the culprit.

Yeah, that's the issue. Since I'm not using the Gamepad API anymore (it's a bit pointless) I'll create a new input detection system using the keyup and keydown events. It will be more direct in terms of code but I'll also include checking keys in a loop.
I'm already using direct key events in the homepage and some games so that's why they feel smoother.

@Wolfyxon
Copy link
Owner

New input detection system is complete. FPS don't drop that much anymore.

@Trickiy
Copy link
Author

Trickiy commented Feb 11, 2024

the new input detection system still lowers fps by 10 much better than before where the fps would go single digit. But the click me button still kills fps. Also I noticed using the chicken as a fps guide when idle best performance start scrolling up or down lowers fps. hold down left/right the chicken goes statue.

@Wolfyxon
Copy link
Owner

Hmm

@Trickiy
Copy link
Author

Trickiy commented Feb 13, 2024

I just found out that while in debug and enabling request mobile sites will change the optimal interval from 0 to 16 and lower performance.

@Wolfyxon
Copy link
Owner

The optimal interval thing was used before switching to the delta system. Basically it chose a loop delay for fast devices to match the speed of the 3DS.

I'll remove it completely, I see It's still somewhere around.

@Wolfyxon
Copy link
Owner

Update pushed, I'll also take a look at the mobile layout enforcement to see what it exactly does from the technical point of view.

@Trickiy
Copy link
Author

Trickiy commented Feb 14, 2024

I found this site http://browscap.org/ua-lookup that shows what the 3ds browser capabilitys are. I think this will be usefull to you.

@Trickiy
Copy link
Author

Trickiy commented Feb 14, 2024

In the site it says backgroundsounds are false. So having base64 sound effects or a (midi)web audio api are not possible?

@Trickiy
Copy link
Author

Trickiy commented Feb 15, 2024

I just saw a video about how to make snake in java applet. Would it be possible to make games on 3ds browser using it only java applet, or in tandem with java script and have better or worse performance?

@Trickiy
Copy link
Author

Trickiy commented Feb 15, 2024

I don't know how to spell tandem so what I mean is at the same time or together when I am trying to say tandom.

@Wolfyxon
Copy link
Owner

In the site it says backgroundsounds are false. So having base64 sound effects or a (midi)web audio api are not possible?

Sadly no, I would love to add sounds.

I just saw a video about how to make snake in java applet. Would it be possible to make games on 3ds browser using it only java applet, or in tandem with java script and have better or worse performance?

I don't really have experience with using Java applets in the web, but I might give it a try. However I think the performance could be worse since Java can be resource hungry. But cool to know that both the Old and New browsers support it.

@Trickiy
Copy link
Author

Trickiy commented Feb 15, 2024

There might be a way to use audio that is not backroundsounds we just don't know how to do so at the moment.

@Trickiy
Copy link
Author

Trickiy commented Feb 15, 2024

So let's do visible txt sounds for now for instance doing a bunch of pews when the jet in jetfighter is shooting and when helicopters explode have a BOOM in place when dead.

@Trickiy
Copy link
Author

Trickiy commented Feb 15, 2024

And for the 3d gun game have a invisable circle where visible sounds would be if on the top of the circle the sound be in front, bottom being behind and so on. With different colors and or icons to idicate what types of sounds.

@Wolfyxon
Copy link
Owner

There might be a way to use audio that is not backroundsounds we just don't know how to do so at the moment.

The only possible way to play audio is to play a video, but you can't watch it without showing controls on the bottom screen so whatever game would use it it would be unplayable.

So let's do visible txt sounds for now for instance doing a bunch of pews when the jet in jetfighter is shooting and when helicopters explode have a BOOM in place when dead.

Sure

@magiczocker10
Copy link
Contributor

Performance issues on home page should be resolved.

@Wolfyxon
Copy link
Owner

Well it runs faster, but still doesn't match the new 3DS speeds (unless the settings I change on my New Nintendo 2DS XL to make it run like Old 3DS are inaccurate).

@magiczocker10
Copy link
Contributor

Pong should be much better and playable after recent pull request is merged. Performance is not perfect, but don't think faster gameplay is really possible due to hardware limitations.

@Wolfyxon
Copy link
Owner

I'll review and test all PRs soon, I needed a little break since I've been coding intensively for the past few weeks.

Wolfyxon pushed a commit that referenced this issue Jun 5, 2024
@magiczocker10
Copy link
Contributor

@Trickiy Could you give an update on this ticket? I know that „breakout“ is not optimized yet, but which of the other games do you think need further optimization?

@Trickiy
Copy link
Author

Trickiy commented Jun 29, 2024

@Trickiy Could you give an update on this ticket? I know that „breakout“ is not optimized yet, but which of the other games do you think need further optimization?

The games that need further optimization are Jetfighter, Pigeon, and maybe Brush. The input detection system also needs to get looked at, at some point as it still hurts performance.

@magiczocker10
Copy link
Contributor

@Trickiy Breakout was optimized in the latest update. Do you think its well optimized?

@Trickiy
Copy link
Author

Trickiy commented Aug 25, 2024

Sorry for the late response the @ did not notify me for some reason, Is it ment to show up in my inbox?. Ignoring the issue on my side the breakout optimizations are great, Feels way better than before. Now for breakout the ellement of skill, brick regeneration, and point system needs implemented.

@Trickiy
Copy link
Author

Trickiy commented Aug 30, 2024

@Trickiy Breakout was optimized in the latest update. Do you think its well optimized?

I just changed my settings so things are much more managable, so feel free to ping me whenever I will be much quicker to reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Laggy behavior
Projects
None yet
Development

No branches or pull requests

3 participants