Gw Temp


Tutorial - 'Loading a CMS/CBS' by GameHunter

An item about RPGMaker 2000 posted on


A tutorial about making a "Loading..." screen to get the player off of the laggy parts of your CBS/CMS (although it can also be used for any type of bar or gauge).


\\ Loading a Custom Battle System //
\\ or //
\\ a Custom Menu System //
\\ By GameHunter //

Sample Pictures:

Friendly Neighborhood Programmer: "Oh great and powerful GameHunter, please enrich me with your knowledge!"

GameHunter: "Why not; I have enough knowledge to share."

GameHunter: "Have you ever noticed that custom systems can be really cool, but maybe when they first show up on the screen it can get a bit laggy and make it not look so nice anymore?"

Friendly Neighborhood Programmer: "Oh all the time, it really turns me off when I see games like that. Are you going to teach me how to make the rm2k3 not lag at all!?"

GameHunter: "Of course not. That is an impossible task, but how would you like to have a nifty little loading screen that really works. And if you don't want a loading bar you can make your own animation that dances and twirls to distract the user from wondering why there is a screen pausing before his battle or menu appears."

Friendly Neighborhood Programmer: "Oh please tell me how, please I beg of you!"

GameHunter: "Well, alright."


First off, you need to ask yourself:
"Does my CMS or CBS lag or look funny when it first appears?"
goto hell;

Now, you need to ask yourself:
"Do I want a loading bar or a goofy animation?"
replace loading_bar with a goofy animation playing until loading is complete;
wtf...why would you have a different answer!?

You need to now look over your code in your game and see what makes your game lag. Now count all the things that made it lag or had lots of conditional branches, which probably means it will lag. The number will be used later for creating the graphic. If you are confused on what you are looking for then let me tell you what I am using the loading screen for. In my battle system I will have an event that figures out which picture to display for the monster in each of the six monster slots. If Monster Slot 1 equals a Dragon then it will show a dragon on the screen. When I first enter the battle I notice that the things are not on the screen, you see the monsters and heroes appearing out of no where, which makes it look bad.

[Create GFX]
For the loading picture I am only going to take up 1 picture slot so that you can use more for your battle system or menu. Make a 320x240(the size of the screen) sized picture that is a color you would like. You can download some sample pictures that I created for this tutorial up above. In the center of that picture make it say Loading with a box next to it, like in my sample picture. The bar that will be in the box should be 100 pixels long(horizontally) for simpler mathematical purposes. It does not matter how tall(vertically) the bar is. Now save the picture as Loading[0].

Take the number of spots that lagged in your game that you counted earlier and divide 100 by it. In my example pictures I had 5 spots that lagged in my battle system so I did 100/5 and I got the answer 20.
Open up your Loading[0] graphic and draw X amount of vertical lines for the beginning of the bar, X being the number you got after the math. Save that as Loading[1]. whatever number you got after the math. Repeat this until your bar is filled up. If you got a number with a fraction in it like 33.3333333 then make the first 2 loading pictures 33 pixels long and the last one can be 34.

You are now complete with the graphics... mmmmmm coding time.
[/Create GFX]

Go back into every spot that you counted that made it lag and put a line of code in there that says:
"Variable: [Loading] + 1"
Now create a new event that is called "LOADING SCREEN" and call it before you enter the menu or battle system.
In the event, "LOADING SCREEN" make a fork condition that says:
"if variable Loading == 0 than display picture "Loading[0]" in picture slot 1."
Repeat this for whatever amount of pictures you have.
Now when the variable Loading reaches its max you can then clear that picture off of the screen, preferably creating a new picture with the same background but without the Loading bar and then fading that into the the menu or battle system.

Still in the "LOADING SCREEN" event put a line of code at the bottom that says:
"Variable: [Loading] = 0"

Well that should be it, you now have a fancy loading screen! Have a good Independence Day and make sure your fireworks have passed through a loading screen properly before you light them; half might go off and then 10 minutes later the other half might go off in your hands as you pick it up! Hehehe.



Hell: // LOL this is where you go if your cbs/cms // doesn't lag.