Friday, May 9, 2014

Simulating Lag

Hello, and welcome to the first post on the Pokemon Multiplayer Red blog. I thought about doing an introductory post but scrapped what I had because it gave away too many secrets that cannot be revealed until the game is released! :)

So I figured I'd start on a rather "controversial" topic (in quotes because it's probably the most common thing mentioned but isn't like debated and hushed on the streets), which is in regards to delays and proper timing on things.

Now you obviously know the Gameboy doesn't stand up to the power we have in computers today. You could probably smash a hammer through your case right now and it'd still be able to do more. Not to say the Gameboy is bad on its own, but in all honesty, it was too weak for even Pokemon Red and Blue. Sure, the game was playable, but there are a lot of points in the game that struggle to keep up. Noticeable examples of this are opening the start menu, walking around with other NPCs on the screen, crossing between maps, loading a Pokemon in the stat summary screen, and so on and forth. We can point fingers at GameFreak for some of these things, but ultimately it was because the Gameboy ran at a whopping 4.2MHz, and unfortunately that just wasn't fast enough.

So why does this matter? Well it's this lag that give the games their authentic feel - that feel when you're in a rush and want to view your Pokemon's stats, so you hit the A button 20 times while waiting for things to load. When a menu appears it feels like it's shifted the game's state, like the menu wasn't there before and you had to wait for someone to build it. It felt good and rewarding.

Unfortunately (ironically), our computers are too good. When we need to construct and produce the start menu, bam - it's done in a millisecond. There is no waiting involved, and it feels like it doesn't play as big of a role. The fact that it just pops up instantly seems like you're not creating anything, but rather just bringing it into view as if it was there.

Long story short, the lack of proper delays doesn't make PMR feel super authentic. You can feel it's a clone because everything is super sharp. The answer to this "problem" is to force the game to wait before drawing that start menu. "What's that? You're ready to go right now? Shut your mouth. Sit down and wait 20 frames." is what it really comes down to.

If the answer is that simple - just add some delays - then why is it such a big deal? The big deal is how the engine is programmed. It's made to be flexible and hopefully pain-sorta-lessly be able to be used for second generation. The only way to get delays accurate is to add a bunch of loading modes, which will no-doubt clutter up the Textbox class (which isn't pretty as it is right now). The rest of the project will get uglier with this seemingly-useless code everywhere, and suddenly people will start criticizing my public static friend boolean void c0d1ng sk1llz. Not that the last part matters, but keeping your code clean is like keeping your desk clean. You can get work done, but every time you need to put something down or find something, it becomes increasingly time-consuming, ugly, and upsetting.

In conclusion, I've been working on getting really basic delays working. There is no one-size-fits-all method of simulating lag, but having some exist does really add depth to the game. Isn't that kinda odd? But anyway, until I find a real solution or break down and just add the different types of delays that exist, the game will have some off delays. You don't need to tell me.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home