Question:
What Non-Complex programming language should I learn to make games?
2014-07-28 19:54:52 UTC
I am good with JavaScript but I can't get hands on to C Sharp or C++.I've tried Python but I just can't get a feeling it will help.Java don't even ask me.Flunked all the lessons I have gotten so it is not my type. :/ So I need a language that is non complex and can be used to make games...
Five answers:
2014-07-28 21:10:35 UTC
here's a free online book for game programming with Python and Pygame



Program Arcade Games With Python And Pygame

http://programarcadegames.com/



The book was written and is used by a professor for his Introduction to Programming class.

Since it is an introduction, it assumes no experience. So it starts off at the very beginning.



here's a video of a game one of his student's made

/watch?v=S7eMdoM1MTc

https://www.youtube.com/watch?v=S7eMdoM1MTc



nothing too fancy, but pretty impressive for their first game



here's some more

https://www.youtube.com/playlist?list=PLUjR0nhln8uZZjNv16i-v5Sgi_spcoWQS



but if you really have to use javascript then you can try Unity 3D (it's free, just go to the Unity site and download it)

they use a version of javascript to script their game engine (they also use C#, so make sure you pick JS when ever you look at a tutorial)



use the official tutorial on the main site

https://unity3d.com/learn/tutorials/modules/beginner/scripting



https://unity3d.com/learn/tutorials/modules



and the scripting reference (just be sure to set it to JS instead of C# or Boo)



http://docs.unity3d.com/Manual/CreatingAndUsingScripts.html



http://docs.unity3d.com/ScriptReference/





http://docs.unity3d.com/Manual/index.html



check the Answers section

http://answers.unity3d.com/



and the forums

http://forum.unity3d.com/



Unity is more powerful than PyGame, but it's also more complicated
Ramimy1555
2014-07-29 03:19:28 UTC
Well back when i discovered how programming works alltogether, i discovered batch scripting... I first found it wasnt too good but continued and realised there is more to it than it looks like... I even started making my own programs that i sent to my friends, successfull viruses that - believe it or not - allowed me to cheat in an exam... I put it on my usb, so when i open my project it copied the teacher's usb data onto mine... But a cool thing i did when i discovered the "choice" command and how to color each character individually is: a game... It actually is the simplest way of doing it, but there's a down side... 1) you cannot use pictures, or pixels... You are limited to ASCII characters

2) it takes a LOT of scripting... And by a lot, its 3 months if you work 4-6 hours a day...

Its easy, but for each and every possible frame in the game you need to code it... However im still proud of the batch files i made :)
?
2014-07-29 03:01:27 UTC
Are sure you aren't starting at a too high of complexity? I mean python is probably the "easiest" of languages for gaming since it doesn't deal with a lot of memory management. Ideally most games are made out of c or c++ since they are the "faster" languages despite being the more difficult in the sense that is more room for human error in those languages. To be honest, if you are pretty good with java you should relatively good at c++ since there is a lot of similarity between the two on exception to the memory management aspect.
?
2014-07-29 04:56:46 UTC
Scratch is a language created by MIT for game making geared specifically towards beginning programmers! Check it out! It's really, really easy!

http://scratch.mit.edu/
python
2014-07-30 12:32:55 UTC
Good, glad to see someone gave you encouragement here (James) . Don't worry about the language for now, but let’s clear up some of the facts up below so you don’t end up even more discouraged or confused.



1. Batch scripting: Ok, so you could probably create some neat for 45 seconds, unexciting text-based games. You might pull a few gems out such as a coordinate system, control statements, and user input. However, I don’t think this would keep your interest very long and I don’t think it’s the easy language you are looking for. As far as creating batch script viruses, I would just ignore this entirely b/c creating a few commands that hijack a miniscule resource isn’t creative, any script kiddie can do it, and your creativity is better suited for the next HALO.



2. Are sure you aren't starting at a too high of complexity?

a. So I don’t think you can answer this question yet, we haven’t selected a platform you’re comfortable with so we’ll ask this later.



3. I mean python is probably the "easiest" of languages for gaming since it doesn't deal with a lot of memory management.

a. No, not really, the concepts behind game development are sometimes difficult to grasp, often dealing with physics, math, and understanding threads, etc. However, the tools we use to implement these concepts are not what make them difficult. A carpenter would not choose a hammer by asking which hammer is less likely to strike his finger in a dizzy moment. A better question, what is my goal and which hammer will give me the greatest chance at success. If I’m building a dog house, the small hammer will do. If I’m building a cathedral, let’s get the nail gun out (Game Engine time). Forget about languages, it’s only difficult because you’re trying to install the roof before the walls are up. Well, I assure you no matter what tool you use it will fall down. You don’t select a tool without knowing what your task is, so spinning around which language is best without knowing what you’re going to do with it… Dumb.



b. Equally as absurd is for someone to suggest Python is easier for games, but C++ is faster and should be used, but you’re almost guaranteed to make allocations errors and crash the net. In addition if you’re good at Java you should be good at C++ b/c they are similar? Whoa! Ok, a Nascar is similar to my Honda Accord, so did I choose the wrong career?





4. C or C++ since they are the "faster" languages despite being the more difficult in the sense that is more room for human error in those languages.

a. A programming language should never be chosen based upon its statistical nature for human error. Secondly, I’m not sure where this stat came from. This was true about 7-10 years ago, but this is an old argument and it’s thrown around as if memory mgmt. is the root of all evil, pointers kill puppies, destroy lives, and can only be understood by talented mathematicians. The rest of us halfwits should chose Java and be thankful memory leaks are for geniuses. So if I’m decoding the human genome, this may be accurate, but you haven’t defined this so performance constraints are speculative leprechauns... Does Monopoly need a performance boost or should I use a language with powerful graphics library?



b. Orqin, all of the languages you mentioned reference memory addresses in some way or another. Some languages allow you control over that allocation and others don’t. The ones that do are cool, but you just have to remember to clean up after yourself. So if you rent a hotel room and the checkout time is 11am the next day, but you oversleep until 3pm. This simply means the hotel can’t rent this space to someone else, but you learned your lesson. Now you set a few alarms, pack only what you need, and walk around the room one time prior to checkout, you’re a pro. At face value pointers can add some complexity. However, so do homophones, but I don’t avoid using the words “there, too, or abstain from eating carrots until I buy a diamond ring.





5. Most games are created in C and C++.

a. I have no idea, but Moore’s law is on our side. So where are most games played today? Yeah XBOX is there, but I was invited to play candy crush 18 times today by 8 people, none of whom invited me to come over and play Wii tennis. So, are most games developed in C or C++? C probably not, Cpp I’m sure has a strong presence, but let’s not discount the hundreds of games currently sitting in android app store developed in Java or Objective C in the iTunes store.



6. more human error in those languages (C, C++)

a. No, forget this immediately. Where are these stats coming from? I assure you I have made the same error a few hundred thousand times in Python, Java, C++, HyperCard, C, Ada, and a turtle that couldn’t turn right. I forgot a semi-colon and my 0 was the letter o. It could be true that the more complex a problem is to solve, the chances of making a mistake increase. I don’t know, but I assure you the tool I am using has no idea either way and doesn’t care.



7. As Generic mentioned with Scratch (engine?), a lot of modern game development is created with game engines. Many of these engines allow the developer/creator to develop complete prototypes without typing a line of code. After you become comfortable with the basic concepts of game development i.e. sprites, collision detection, coordinate systems, event listeners, and so forth. You certainly have access to the code produced by the engine. Many engines also allow you to add custom scripts in languages like python, but you don’t have to.

Overall a game engine provides you with few essentials:

1. A rendering engine (2D or 3D graphics)

2. A physics engine (collision)

3. A set of tools to create the essential pieces of most games

a. Sound

b. Animation

c. Sprite or Scene creation

d. AI control

e. Movement

f. …



So I recommend GameMaker studio as a good start. Grab it from here: https://www.yoyogames.com/studio

Make something easy like Tic-tac-toe to see how it works, but here are a few tutorials if you get stuck. http://sandbox.yoyogames.com/make/tutorials.







A quick programming lesson to get you started….

You mentioned you were skilled with Javascript, cool. It has similarities to the way other languages create methods or functions. I would say largest difference with JavaScript and the other languages you mentioned is that JavaScript is commonly used as a client side scripting language to manipulate the DOM. If that makes no sense to you, don’t worry about it. Essentially it tends to run in your browser whereas say Java runs on a virtual machine. So fun fact: The two languages JavaScript and Java have absolutely nothing to do with each other, are in no way related, were developed by completely different companies (Netscape, Sun) and the only thing they share is the same name. Why? Because in the 90’s Java was the next biggest thing with the invention of the Applet (A java program which runs in your browser) so Netscape said hey let’s call this a similar name so we are on the cool train too.

Let’s create a character in our game, but first let’s agree on some similar attributes and behaviors most game characters have before we get into details. First we will describe our generic character

STEP ONE DEFINE OUR CHARACTER (SEE CODE)

I. Character:

a. Attributes

i. Name

ii. Gender

iii. Size

iv. Intelligence

v. Weapon



Cool so we decided that our game characters can be described by these common attributes listed above. Now let’s decide on some common behaviors our characters can do.



b. Behaviors

i. Move (left, right, up, down)

ii. Capture or use weapon (Shoot)

Awesome, so we have our blue print. Let’s use that to make an actual character….

STEP TWO CREATE A CHARACTER (See code point)

The fighter:

a. Attributes

i. Name: The fighter

ii. Gender: Male

iii. Size: 72 inches

iv. Intelligence: Stupid (to many fights)

v. Weapon: Boxing gloves, Fists

b. Behaviors

i. Movement: Left, right, up, down

ii. Capture method/weapon: punch bad guys

You have heard of Object Oriented programming? We just created an object above and these are the building blocks we use either together or independently to create larger entities. These entities interact; inherit commonalities, and are pieced together in elegant ways to create programs. Easy enough, so from now on we think of our program or game as any number of these objects. Some objects will be made up of other objects and other objects will exist alone. What we did above is programming and we never once mentioned a language. When it comes time to program this object, it’s easy. So let’s say Java to get you started on angry pigs 5.

http://pastebin.com/6c9i8SaA



Good Luck.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...