[Improved] How to Actually Improve Performance in Your Games

Thanks for letting me know! I will change it immediately!

2 Likes

You did come across as a little aggressive, though I understand you’re just trying to help… it was simply a change in rhetoric!

2 Likes

I understand I was a bit blunt with you, but please understand it was out of concern of the impact on others a guide like this can have. For a community guide that a lot of developers will probably use extensively, the information should be accurate all the way through, as it can have a big impact on many developers’ current games and all their subsequent games too, and the advice they spread to other developers and so on, like a sort of butterfly effect.

Additionally, the page’s information has not changed since at least March 27, as the internet archive shows, so it must have been a misinterpretation, which is fine and happens to everyone! I’m not blaming you for anything, everyone makes mistakes, I just want you to understand the impact (positive or negative) you can have on other people, and understand the extensive caution and review that should go along with making guides/tutorials, due to their potential widespread impact.

7 Likes

maybe incude hollowing of parts turning off castshadow on parts tht dont need it unioning all the parts tht have the same: transparency,reflectance,materials,texures and decals. color doesnt matter since unions uk wht i am saying right.

2 Likes

Hey! Thanks for the tips, I did include most of those already but I don’t want to advise using unions since in my experiences it’s lead to unoptimized geometry

3 Likes

I’m a newer developer and this is of great value to me. I have been direction less as far as how to program for optimizations and now have a great reference moving forward. Please don’t ever remove this and I’m looking forward to any other guides that your willing to provide!!!

2 Likes

As a starting developer, don’t worry about performance. All those things indeed make performance better, but for games that are typically made by starting developers (not to put you down!) optimalization isn’t really needed. Roblox handles most things for you and optimalization will only have a significant effect in larger games.
I suggest focus on practicing scripting in general, optimalization is a thing for later!

3 Likes

I’ve actually built a whole game in unreal engine somewhere around 15 years ago and then released it onto the iOS store. It was a hobby project, but I was still proud of it.

I haven’t coded for a long time, but I understand at least some of the core principles. And now for Roblox, I’ve been struggling with simple things like when to put something into server storage vs replicated storage vs local and things of that nature. So I ignored it and have been placing everything in workspace… which now takes 60 seconds to load my map, lol. Just learning to optimize via learning where to place each item in what storage will help me to not be completely dumb.

Per your advice, I’ll focus on scripting and not pay too much attention to the optimizations while still being aware of them so I don’t make crazy errors.

4 Likes

Nice! For loading the map, check out Content Streaming | Roblox Creator Documentation ; this will probably limit your loading times!

2 Likes

I would advise good practices, don’t focus too hard on optimization but don’t just ignore optimization. If you get used to doing things the right way then you’re better off in the long run! The API reference is an amazing source! Starting developers should worry about performance, otherwise when they work on bigger projects- getting overwhelmed with new practices or having to change how you work or work you’ve made is horrible… it can hurt your motivation and delay your game, so I’d still say you should worry about performance! You may not need to go as in depth as some developers but you should still keep it in mind!

2 Likes

This one is weird, why would a pre-built constructor be slower than explicitly setting the Instance’s Parent?

2 Likes

I don’t think they explained it in-depth enough. It’s because when the parent isn’t set, setting the properties of the instance is faster because the instance itself won’t be updating until it has a parent set.

I’ve always heard of people explaining that it’s faster, but never how much faster it is. If you need to set the parent right away, then do so, the small performance boost isn’t really worth it unless you’re creating a handful of instances every second.

5 Likes

Some front page games(not gonna mention not sure its legal) should use this if they want more players.
Am I right?

2 Likes

My machine (like many others) is pretty cheap and has trouble running a lot of games at decent frame rates. I noticed with my projects that it’s made the gameplay smoother, especially when instancing multiple objects a second! Even if the boost is small, it’s a better practice and at the end of the day, a boost! Tons of things are only “a little better to performance” but doing all of those can make a difference! Although, you probably already know this- I’m just explaining for those who scroll down the comments!

2 Likes

I have a question, does “Massless” affect performance too?

From: BasePart | Documentation - Roblox Creator Hub

If this property is enabled, the BasePart will not contribute to the total mass or inertia of its assembly as long as it is welded to another part that has mass.

If the part is its own root part according to AssemblyRootPart, this will be ignored for that part, and it will still contribute mass and inertia to its assembly like a normal part. Parts that are massless should never become an assembly root part unless all other parts in the assembly are also massless.

I would presume it has little to no impact on performance. It is possible that it has a very small positive impact when disabled if it removes variables from the physics calculation, but I don’t know the equations Roblox uses to calculate their physics. :frowning:

In my experience, it has never noticibly affected performance! If you’d like to look into more yourself, visit Understanding Assemblies | Documentation - Roblox Creator Hub.

If you have an issue with performance and a lot of geometry/parts in your game, I recommend ContentStreaming.

2 Likes

Base on my experience using between the task.wait() and wait() is that when i use task.wait() on a script that are cloning the template like pet inventory system, index system then some pets are not totally loaded (maybe the task.wait() runs too fast) but in the otherside when i replace the task.wait() to wait() then now all the visible pet is now show with the right amount of number. When I use task.wait() the pets showing like: 86/100 but with wait() it showing exact number 100/100.

I am making a pretty big project which is a platformer inspired to the beloved original PS1 games like Spyro and Crash. (Mostly Spyro), we’d have around 10 different full worlds using terrain and moving parts, I was wondering would it be better to have the worlds be separate places or just have them load in from ServerStorage, though with that comes an issue, you cant load and deload terrain (and if you can, it’s probably complicated as hell), so I’m not sure if JUST having the terrain very far away just sitting there would impact performance.

Edit: It depends on the length of your levels, you don’t want them teleporting and loading into a small level constantly. If they’re decently long levels which could take more than 5 minutes, maybe 10-15 then I would separate them. Prototype and check the load times before committing to one model!

I would recommend splitting the levels into their own places. I would also look into Packages if you haven’t already! Tho, if it helps Terrain has some useful functions like FillBlock, FillRegion and plenty of other functions if you do go the route of dynamically loading levels in a single place. As for performance, if you can still see the terrain it’s still being rendered and enough of it will reduce performance!

2 Likes

Would also point out that setting parts, meshes, etc. to massless on top of setting things to cancollide off, etc.
Can also slightly help.