Tuesday, February 20, 2018

Making Games With Java- Introduction

  • Need for Speed.
  • Mario Bros.
  • Sonic.
  • Grand Theft Auto.

Admit it, we all love games. Ever since we were little kids, we all remember the first game we ever played. How those tiny, beautiful cartoon things on the screen moved around at your command, getting the power-ups and little coins, beating the big boss at the end. And finally, that epiphany moment when you’re like “I now know why God gave me thumbs.”
Aaaah. The good old days. Before real life was actually a thing.
Growing up, most of us continued to indulge in the art of gaming. Whether it’s testing out the latest EA or Rockstar game, or sitting in your room playing the latest Subway Surfers update and ignoring your mom’s pleas for you to do your homework, gaming has evolved from a mere pastime to a way of life. Scientist also say that gaming actually improves your cognitive ability, allowing you to make better life decisions (take that underpaid guidance counsellor!)
Of course, as a lot of us grow in our gaming lifestyles, most people decide to use their very limited free time to ask themselves one of life’s most pressing questions.
“Won’t it be cool if I made a game?”
Now, if you’re reading this right now, it’s most likely you asked yourself that question and were like, “Of course it is! What kind of stupid question is that?”. I’m also one of those people. I mean won’t it be awesome to make something like this:



Or this:


Or even this:
Or probably even this:

Ok, I admit the last one’s not very impressive in comparison to the others, but you have to admit, that game was fun. Besides, when you start learning how to make games, believe me, you’ll think it’s the most impressive thing you’ve ever seen. I mean, I’m sure you’ve been told that games aren’t made by magic. Well, let me tell you that that is a complete fabrication, an utter falsehood and a disgusting misrepresentation! (basically, it’s a lie). Many have told me that games aren’t made by magic, but I say that they are. They are made by a very new kind of magic, not as old as necromancy, sorcery, or the dark arts, but just as diabolical. We all know this form of black magic, a skill even older than the IPhone 5. An arcane art known only by one name…

Programming


Now it’s no lie that programming is quickly becoming one of the most popular occupations in the world. Years ago, when it was still a noble art, only a select few with almost impossibly high IQ’s would choose to drop everything and dedicate their lives to their computers and codes. Now, everybody wants to code, even that girl in our class that probably didn’t even know what a computer could do beside Microsoft Word.
And it’s not like any one can blame them. Games are really just the tip of the iceberg. If you’re a very good programmer, you’ll be able to create so many things. You could create a million-dollar software, or a social network that could put Zuckerberg to shame. You could programme your own robotic butler to do everything for you, or you could just create a mobile game to show off your mad skills to your friends.
The possibilities are endless.
Programming is power. And with power comes responsibility.
Luckily, the complex appearance of most programming languages keeps the riffraff out, but that doesn’t mean anybody can’t code. As long as you’re willing and able to learn the basics, and you put a lot of time into practicing, then you’re well on your way to being a decent programmer.
Now, as a beginner, the best way to learn how to code is by browsing some tutorial sites. (But of course you know this, otherwise you won’t be reading this). This course is for beginners to Java and programming in general; of course those that have some knowledge of programming are welcome. But before you browse for sites, one of the most important questions a beginner should ask themselves is “What language do I learn first?”
With a myriad of programming languages in the world (many that are popular, and many that are largely unknown), sometimes deciding the one to learn is part of the hassle of learning to code. Many believe that starting with a hard language like C will make learning the others easier. I don’t know how true that is, but I know that starting with hard languages can be kind of discouraging for a first timer.
There have been a lot of programming languages created for new programmers; including Python and Visual Basic, two languages that are very good. But in this course, we’re going to deal the one I used to learn programming.
Java.

Why Java?

Now that is an excellent question. I’m sure you’re asking yourself that question right now. Since there are thousands of programming languages out there, like C, C++, C#, other languages that don’t start with C like Python, what’s so special about Java? I mean, it’s not even the strongest one out there. Compared to C++, which was used to make Windows, Java, which is mostly used for measly mobile apps and games, must be the scum of the programming earth, right? Right?
No, not right.
I admit Java may not be the strongest language, but compared to others, it’s actually quite simple. I mean have you seen C syntax (If you haven’t, I really envy you.) (Also, if you haven’t, probably means you’re new to programming, so on a quick note, syntax is a fancy word for the words and word structure used in a particular language).  To tell you the truth, Java may not be the best, but it may as well be the best, because it has a lot of advantages over older and comparatively more advanced languages.
In case you’re wondering what said advantages are, don’t worry, I’ve listed them below.
  • Java is platform independent. For those who don’t know, it just means that it is not limited to a particular operating system. Once you write your code, you can run it on Windows, Linux and even Mac OS. With the Believe it or not, most other languages can’t do this. In fact, the only reason it does this is because of something called Java Runtime Environment (JRE), also called the Java Virtual Machine (JVM). We’ll look at this in more detail in our next post. Basically; with it, code can run everywhere. Without it, it can’t run anywhere.
  • Unlike C and C++ which are procedural languages, Java is Object-Oriented. This is more lingo that experienced programmers use to confuse the noobs, and it just means that each individual part of the software (or object) is worked on as a separate unit, making coding easier to implement, read and maintain.
  • Java can easily be configured to the web. In the webbed based world, we’re in now (that’s just begging to be taken over by robots) this comes in really handy. In fact, a lot of websites make use of Java when operating. The reason for this is that Java was created shortly after the invention of the Wed, so the smart guys that made it made it to complement the web. Smart move, I say.
  • Most Android apps and games are made with Java. I said it before that Java run everywhere; did you honestly think that the Android could escape its grasp. In fact, before the Android even knew it would be invented, Java was being used to create mobile games for the Nokia Symbian OS. (Remember when that used to be a thing? Yeah, me neither). I’m sure people thought that Java would die out with the coming of Android, but I guess the Java people up there are a lot smarter than we thought.
  • Java is easier than most languages. It might not seem so at first sight, but it actually is. Java is very easy to learn, especially for those that know the procedural languages like C and C++, because it steals (I’m sorry, “borrows”) most of their syntax, so you don’t have to worry about learning a whole new language from scratch if you already know those and maybe some other languages. Also, like I said earlier, it’s object –oriented, which is simpler and more efficient than those “more advanced” languages.

I could mention more reasons why Java is the best (or at least more preferable) choice for programmers, especially those that are new to programming.
     If you’ve gone this far in this post, it means you didn’t get distracted by some random notification, and you might actually be interested in learning Java. Remember, Java is not for the fainthearted, so if you feel you’re up for it, look out for our next post, were I’ll be talking about how to get everything you need to be a Java wizard (sorry, “programmer”).
In Next Post we will see what all we need for Java to we in my system.

Thanks for reading 
Noeik





0 comments:

Post a Comment