Skip to content

Feni/Pulsar

Repository files navigation

Pulsar

Author: Feni, Victor, Marv

Pulsar is a game program written from scratch in java as our first major project in java in high school CS-2 class. The basic design was based off of uncountably many tutorials online. It has since evolved into a code monstrosity spanning dozens of classes and thousands of lines. 
It was mainly meant as a learning project more than a serious game. There are a fair number of bugs as well as optimization issues, but it runs and does what it was programmed to do. 

There was an original storyline planned to the project. It's included at the end of this document. It was written 4 years ago and I haven't changed it since, so please ignore my 10th grade vocabulary and writing style (especially the cheesy character names. They were only supposed to be placeholders, I swear!). 

Basic capabilities: 
2D side scrolling
Text-file based maps
10+ levels
2 types of monsters + AI
Decoration capabilities for maps (simple text-based scripting)
Health, ammo and fuel meters
Parallax background scrolling


This code is being released under GNU General Public License

Please note that the graphics associated with this game were, * ahem *, borrowed from online sources as temporary place-holders while we program. As such, they're owned by their respective copyright owners (and does not fall within the bounds of this GPL license). I'm uploading the graphics under the assumptions of fair-use-policy, since the source code for this project is being freely uploaded as being an educational resource for anyone else interested in game programming. If the original artists would like the materials removed, please notify me. 



The Story (read the terms described above. tl;dr Thou shall not judge my poor writing style)



Pulsar
	Humans have long searched for the meaning of life. What is my purpose? Who am I? Like them, I asked these same questions. I looked everywhere for the answer. In books, in music, in dreams. Then the answer came. No, not as a vision in my sleep, not as a revelation in a book, not as an inspiration from a song. No. It came with a bang. A big bang. And then another. I opened my eyes to peer into the glossy eyes of a reformer. 

__________________________________________

Chapter 1:
	The game is set at around 2121 when an alien race known as the “Reformers” come in contact with the humans through radio messages sent over space. Soon, they began establishing colonies on the moons of Saturn and on Mars. 
All was friendly until another colony was established even closer to us. On our own moon. Seeing how their technology was far ahead of anything humans have ever thought of, we tried to ally with them to learn about them and their intentions. Human diplomats quickly learned that they had no plans for invading or colonizing earth, (As many humans feared). Instead, they learned that the aliens were planning on capturing our sun and feeding it as fuel to the long dead star (a pulsar) known as Omni located deep in the center of our universe. 
Chapter 2:
The Omni was once a gigantic star around which 9 resource rich planets rotated. 3 of those planets once held life. The Reformers inhabited one of them. In the second planet lived primitive creatures that later occupies early earth. The third planet was inhabited by a highly intelligent species known as the Omnians. They were advanced beyond all measures, being one of the first life forms to appear in the universe. 
The wise ones were aware that like all things, their sun (the Omni) must come to an end. In the years before the projected “dooms day”, the wise ones evacuated the other 2 planets of it’s inhabitants. Led by Helios (A courageous warrior and Wise leader of the Omnians), they searched for other prospective planets for the evacuated Humans, Reformers and themselves. 
Chapter 3:                            
After searching long and hard, they were able to find only two planets that could possibly sustain life. The Omnians moved the two civilizations to the new planets and then patiently awaited and accepted their impending doom. 
Since the humans were the weaker of the two civilizations, the Helios was afraid that the reformers would invade Earth as soon as the Omnians (who were the peacekeepers) were gone. Fearing this, he left a large amount of their precious technology to the human leaders, including his signature suit of armor before leaving them in the little known corner of the universe known as the Milky Way. Using these newly acquired technologies, the humans rose up and took control of the earth. They lived happily, having dominance over all other species, until they began fighting amongst themselves. The treasures given to them by the Omnians were soon separated and scattered over the earth, mostly forgotten and lost. 
Chapter 4: 
The Reformers were initially placed millions of light years away from earth so as to avoid inter-planetary conflicts. The 12 different species that make up the Reformer Civilization worked continuously to grow and expand. Imperror was a prominent Reformer who invented Faster-Than-Light travel and theorized that they could bring the Pulsar Omni back to life if they were able to provide it fuel from another sun that brought forth life forms. None of the other planets they knew could be as rich in resources or as favorable for life as the planets surrounding Omni. The Reformers also hoped to salvage remains of Omnian technology there (including the Helios’ legendary Suit of Armor that Imperror was obsessed with) that they could use to aid in their goal of Universe Domination. 
Once perfecting Faster-Than-Light travel, they attempted many times to colonize the planets of Omni. But any life form exposed to the dangerous conditions of the Pulsar Omni could not survive long. All of the robots they sent failed to function there as well because of the high magnetic field that made sending and receiving data impossible. 
By AD 1700 (Earth time), a group of Reformers set up a colony on planet E19S486, located near the violent center of our Milky Way Galaxy. By this time, the Reformers had close to 1000 different colonies established all over the universe. Contact with the humans came as a surprise to them when they received the radio messages in 2097.  
Chapter 5: 
	War was declared between the Reformers and Humans immediately after learning of the Reformer’s plans to capture our sun. In a surprise attack, Humans were able to recapture the moon, but at the cost of heavy losses. Large fleets were assembled to attack the Reformer colonies in Mars and Saturn. Here, the Reformer’s advanced technology proved to be their greatest strength as they were able to assemble defense much faster than we were able to take them down. Even the latest Human technology in space travel took months to reach distant planets such as Mars, while Reformer technology allowed them to travel from one end of the solar system to the other in 12 minutes. Before our fleet was even half way to mars, the Reformer’s launched a deadly attack at Earth. The battle lasted less than a day and ended when every last life form on earth was either killed or taken as prisoners. 
Chapter 6:
	The Reformers (on their way back after the Battle of Earth) attacked the fleet still on the way to Mars. The fleet put up a good fight, but accepted defeat upon learning of Earth’s fate. Nitro Nine, a well-known fighter, refused surrender. With a few hundred soldiers, he retreated to Earth, becoming the Rebels that actively launched guerilla attacks at Reformer Colonies with what little technology they had. 
	On a large-scale mission to take down a Decomposition Factory situated on Mercury, Nitro lost half of his teammates. Forced to retreat, him & the few dozen remaining teammates raced to the safety of Earth. The Reformers, annoyed by the constant attacks by the Rebels, followed them to Earth. The two groups raced through the piles of debris left over from the Battle of Earth 2 years ago. When it became obvious that they stood no chance of out-racing the Reformers, the Rebels snuck into a cave carved neatly into a mountain (one of the few natural mountains left on Earth). Fearing the Reformers, they explored deeper and deeper into the cave. But nothing could hide so easily from them. The panicking Rebels had caught attention of the Reformer’s motion sensors. The dim, grim light of the Reformer hovercraft appeared at the entrance of the cave, drawing closer and closer to the Rebels every minute. Nitro Nine and the others fired blindly at the lights, but with little effect. As the lights drew even closer, the Rebels were forced to retreat to the back wall of the cave.
Chapter 7: 
Blinded by the bright light in front of him, Nitro Nine stumbled and fell, hitting his head hard on a piece of rock jutting out of the wall. Instead of falling down, Nitro was pulled back and enveloped in what seemed like just a piece of rock a moment ago. The dust accumulated over the years fell away and the bright, metallic surface of a suit came into view. Nitro noticed the array of weapons attached to his hand and as if by instinct, fired into the blinding light ahead of him. With a loud crash, the lights went out and the faint light of the outside world shone through the opening of the cave, leading them to a way out. 




Basic storyline: he finds these answers in himself when the very existence of human kind is doubted, when his very humanity is questioned. He signs up to fight in the war against the reformers. Human soldiers were running low. The aliens were a million times better than us. A lil bit on the first time he went to space, starting back at the beautiful earth... He was untrained, under prepared, and un / under armed and thrown into the middle of the battle. He survived by pure instinct alone. His whole team was destroyed, they fired at the earth. They all chased him. He escapes to earth. Hides out in a forest like place. They find him, another chase. He gets to the mountain / cave. Gets the sute. Rest of the story as usual...

Somewhere along the line, he losses the suit (somehow). He must fight without the powers of the suit and prove that the suit doesn't make him a hero, his own actions does. 






The Game:
	The Game begins with a cut-scene that shows the story from Nitro Nine’s point of view. It shows everything from the moment humans came in contact with the Reformers through the radio message until the point where Nitro stumbles over and hits his head on the disguised suit. After the suit merge with Nitro, another cut-scene in Helios’s perspective is shown in black & white (like a flash back) about how it all started with the death of Omni. Once the flash back is over, Nitro wakes back up and takes down the hovercraft. As an alternative to movie-like cut scenes, we can add in stills with captions at the bottom. After an image of him running to the cave exit (the light), the game becomes playable. 
On the bottom part of the screen, Helios “talks” to Nitro Nine, telling him what to do. The first mission is to simply take out the few dozen Reformers that had followed them to the planet. The setting is the debris filled Earth littered with mazes of many collideable tiles for a strategic play. After a few maps, the player finds another Rebel who informs him that 3/4th’s of the Sun has already been transported after being decomposed into basic elements at the decomposition factory they were trying to attack. The factory must be taken down immediately, but due to the failed attack by the Rebels, security has increased greatly. Helios advises to free the captive Rebels & other humans held on 3 of Saturn’s moons and on Mars first before going to Mercury so that he’d have some support in the final battle. Nitro agrees and the Rebel he met takes him to one of their launch pads. Nitro climbs into a small space ship and sets out. 
Here, the Game Play changes so that the player is controlling the space ship. This requires only a few minor changes to the code (such as changing variables for Gravity, max velocity, along with some tweaks to the display to make it seem like it’s a top-down side-scroller). Since maps for this space-themed segment of the game are empty of any tiles (which frees up more memory), the map can be made into a huge blank arena filled with just the player and the enemies (maybe some asteroids too ;-) in fast passed chases. After the space segment, the player battles different settlements on mars. Mars, by then, had been transformed to sustain basic life. The 3 different settlements vary widely (one being the red, volcanic Mars we know of. The second being the artic-like Mars and the third being like Earth) and offer different challenges. After freeing the captives here, the player enters the second space segment to get to Saturn. The player faces new types of monsters and environments here. Once succeeding in all of the 3 moons, Nitro must get back to earth where all of the freed captives are waiting for him. To do this, he has to come back through the maps he had passed earlier to get there, but now the maps have been given extra security by Reformer reinforcements. Passing through all of the maps and reaching earth, the player leads the new Rebel Army towards the highly defended Mercury. A cut-scene here can show a quick battle between the Rebel Army and the Reformers. The Rebels tells Nitro to get to mercury while they weaken the defenses as much as they can. At Mercury, the player is outnumbered with scores of Reformers.
The first maps in Mercury are fire-themed. But as the player progresses, the maps are more ice-themed and the sun in the background keeps getting smaller. Getting through dozens of map, the player walks into a cut scene of what seemed like a huge Reformer gathering. Imperror is giving a speech in great joy and the behind him, the last light from the sun disappeareds and the final capsule full of gas that used to power the sun lands near Imperror. With cheers from the croud, he send it in through the Faster-Than-Light portal. Nitro, knowing that even he couldn’t battle all of them at the same time, waited until all of the Reformers except Imperror had went through the portal. Then he stepped in and a long battle between Imperror and Nitro takes place. Imperror weakens Nitro, and then a cut scene shows him trying to take Nitro’s suit. Just then, the rest of the Rebels appear and Imperror escapes quickly through the portal. The portal disappears. Nitro praises the Rebels for their efforts and accepted their defeat. Helios talks to Nitro and says that all hope is not lost and directs Nitro on how to create another portal (which the Omnians had first mastered before the Reformers ever thought of it). He appeared on the planet that the Omnians had originally occupied. Exploring a few fairly empty maps, Nitro collects dozens of items, then portals again onto a huge Reformer spaceship located near Omni, the Pulsar. All of the capsules of Gas containing the sun were loaded on it. Nitro battles through several levels of Reformers until he reached Imperror again. Before Imperror was defeated, he laughed and said that even if he tried, he couldn’t bring back the Earth’s sun. So after defeating Imperror, Nitro fired the capsules onto the surface of the Pulsar. The plan seemed to have momentarily worked. The Pulsar burnt brightly like a sun, but soon began flickering as if it’d burnt up all of the fuel. In a last desperate move, Nitro goes outside the ship and fires a super charged shot into the sun. Tired from the energy it took from him, Nitro falls down onto the planet the Omnians had previously occupied. The screen goes to a cut scene that starts out as if he had his eyes closed. After a few moments, he opens his eyes and stares at the bright sun shining in the sky. The screen zooms in on the sun and the white light from the sun becomes the background. The credits roll. The End. 




About

Java 2D side scrolling adventure game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages