Prototyping a custom game engine
Back to Pastebinclass WebServer():
def process_page():
GameEngine::OpenRequestReference()
if not requestedData in CacheEngine::cache:
requestedData = DatabaseEngine::get
# process posted events
for EventClass in self::get_user_input:
GameEngine::pushEvent(PrototypeEvent EventClass)
GameEngine::CloseRequestReferenceandWaitForData()
class PrototypeEvent():
# subclassed into various custom events - EventClass
def process():
# do the event stuff here
class GameEngine():
def tick():
for queuedEvent in self::Events
queuedEvent::process()
def pushEvent():
self::Events.append(Event)
class DatabaseEngine():
pass
class CacheEngine():
pass