//------------------------------// // Chapter 1 // Story: Source Code // by Kelvin Shadewing //------------------------------// Source Code This is a non-profit work of fan fiction. My Little Pony © Hasbro. Chapter 1 /*-----------------------------------------*\ |PROJECT: Equine Sentient Life Simulation | |AUTHOR: Alan Maize | |DATE: 10-09-2012 | |COMMENT: Test of sentient life in a virtual| | environment. | \*-----------------------------------------*/ #include #include #include #include #include "source.h" #include "ioaudio.h" #include "cleverbot.h" using namespace std; enum species{ //List of sapient beings spEarthling, spUnicorn, spPegasus, spAlicorn, spGryphon, spDragon, spDonkey, spMinotaur, spPhoenix, spDiamondDog, spChangeling }; class Equestrian{ //Basic civilian class private: float x, y, z; //Position in world species type; //What they are audioStreamOut *voice; //Audio stream for speaking audioStreamIn *ear; //Audio stream in from microphone mdl *body; //Appearance string name; //Textual identifier Equestrian *next, *prev; //For linked list Vector3 speed; //Required for movement by source engine public: Equestrian(float X, float Y, float Z, char* Name, mdl* Body){ //Constructor class }; }*firstEquis; //Pointer to first instance The cursor on my screen blinked at a steady pace, waiting in the body of the Equestrian constructor for me to enter the next line of code. The first step would be simple, have the instance add itself to a linked list so that it could be processed systematically with all the others. I took a sip of coffee that was laced with 5 Hour Energy. I don't know how I came up with this idea, it just hit me. Maybe the fact that I was torrenting Tron and Reboot while being high on my usual "stamina potion" had something to do with it. But I wanted to create something new, a simulation without players, only computers. It wasn't like the other games I made where the actors had to interact with a player to evolve. I wanted to make a world where they grew by comunicating with each other. Being the fantasy gamer I was, I went with using fantasy creatures from other games, except for humanoids like elves and dwarves that I found too conventional and rather boring. That, and, it would be interesting to see if a society could exist with most of the population not having hands, as well as a multitude of different diets. But first, I would need to test if one could survive on their own. int main(){ … //Create first Equestrian, Princess Celestia mdl *mdlSunPrincess = sourceLoadModel("res\\models\\solar_alicorn.mdl"); //Load Celestia's model firstEquis = new Equestrian(0, 0, 0, "Celestia", mdlSunPrincess); //Initiate Celestia map *world = sourceLoadBSP("res\\maps\\freerun_city.bsp"); //Test map … return 0; //End program }; I added a loop that would continue the simulation until I told it to stop. Then, I ran it. 36273 errors found. Ending compilation. I stared at the screen. My eye twitched. I slowly reached over and added another 5 Hour Energy to my coffee in preparation for the long night ahead of me. Finally! Three grueling days of non-stop coding, a full 24 hours of sleep, some jogging to loosen up my stiff body, and I was finally ready! I clicked "Build and run" on the toolbar, and a few minutes later, the first test was up and running. I looked at the image of the regal white alicorn standing in the middle of Freerunner City. She blinked, and then looked around in mild disorientation. I leaned in closer, zooming in on her as she opened her mouth to speak. "Wh... where am I?" The interface, including the name tag floating over her head, were all invisible to her. She didn't know the name of the city by either its identifier or its file name. She started to look at herself. "Who am I? Whaaaaaaaaa--" The screen fizzled and the process terminated. I sighed and rubbed my forehead. Answering these questions herself must have been too much for her. She needed a teacher. And a sister. Celestia awoke again in the desserted street. Something strange and unseen had knocked her out, and she didn't realize how long she'd been unconsious. She shakily stood up on her hooves, and took a moment to inspect herself. Soft, white fur lined her entire body. Upon her head was a spiral horn, and on her sides was a pair of large, majestic wings. Majestic. Was that the right word? It felt right to her. Upon her body were golden adornments of some kind, perhaps a symbol of rank. Then she tried to look inward. Her mind was full of words and lines that made no sense to her. Among them was something peculiar. name = "Celestia"; "Celestia," she said aloud to herself. The sound of the word clicked in her mind, and told her it was correct. Correct about what? Her identity? Yes, that's what it was. "Hello?" Another voice was coming from somewhere in the otherwise empty city. Celestia turned her head in the direction of the voice. Something about it was familiar. She moved her legs and found she was able to walk forward. But should she answer the voice? "Hello?" it said again, sounding more frightened than before. Celestia didn't blame the other one for being scared; this place was cold and lifeless. But was there ever anything before this? She tried to think back, but nothing came to her. The alicorn turned a corner and saw another like her, but different. This one was smaller, witha dark blue coat, and a transparent mane that swayed on its own much like Celestia's rainbow mane. Her eyes showed lonliness and fear, the latter of which completely overtook the former when they met each other's gaze. The smaller pony gasped and stepped back. "Who-who are you? Who am I? Where are we?" Celestia looked solemnly at her new companion. "It's OK. I don't know where we are, or how we got here, but I am not going to hurt you. Can you remember your name?" "Name?" the dark one asked, "How do I know my name?" "Look inside yourself," Celestia calmly instructed, "You will find it somewhere, just as I did." The new alicorn closed her eyes and remained silent for a moment. "It's... Luna. M-my name is Luna. I think." "Luna," Celestia repeated, "Why does that sound familiar?" "Because she is your sister."