Although online multiplayer games have become more and more mainstream and successful over the course of the last few years, there still are games being released that feature great local multiplayer modes. Games like Mario Kart are the proof that splitscreen multiplayer is far from dead and can be great fun. This is the reason why this recipe will show you how to create a splitscreen mode for your games!
Follow the steps found in Setting up the game structure in Chapter 1 before proceeding with this recipe to have the base for the following sample code.
Let's get to work by implementing a splitscreen mode:
Open the file Application.py and add the following code:
from direct.showbase.ShowBase import ShowBase from direct.actor.Actor import Actor from panda3d.core import Vec4 class Application(ShowBase): def __init__(self): ShowBase.__init__(self) self.pandaActor = Actor("panda", {"walk": "panda-walk"}) self.pandaActor...