Jump to content

  • Log In with Google      Sign In   
  • Create Account

Help Deciding On New Language

  • You cannot reply to this topic
17 replies to this topic

#1   Members   -  Reputation: 108


Posted 23 July 2016 - 04:20 PM

  Okay, first things first. I am new to the community and am looking to find a new programming language for making simple 2d games, mainly on windows but I would be open to mobile or browser if it was easy enough to get into. I have been programming in BASIC (qbasic and then QB64) for nearly a decade and am fairly efficient at it. I enjoy it, but I am looking to branch out to maybe something with a bit more "shelf life" moving forward. I don't really care much about speed or super powerful programming. Its just a hobby right now.


            Ideally I would like to learn a language that has:


*fairly easy/ simple syntax (preferably better than C++)

*simple ways to draw/print to screen without 50 import declarations or API's or whatever

*easily compiles to executable without jumping through hoops to make a stand-alone game.

*Not overly complicated file I/O commands (mainly for save games and whatnot, in QB64 it would be something like 'OPEN filename FOR INPUT/OUTPUT AS variable')


           Languages I have tried and did not care for:


- C/C++, I understand it is one of the best and most powerful languages, but I do not care for the syntax and don't plan on making a career out of simple game programming anytime soon

- Java, I actually like java quite a bit, but IMO its not very practical for simple game programming due to overly long disorganized feel and particularly strict OOP style.

- Objective C, same reasons as JAVA

- actionscript, I somewhat enjoy actionscript but it still feels a little disorganized to me, looking for something a little cleaner.


           Languages I am interested in but not sure about:


~Python: I like the syntax a lot, it seems pretty clean and versatile. basic graphics seem easy from what ive read. But, ive heard creating exe or stand alone games is pretty complicated, which is a bummer.

~Ruby: ive heard that Ruby is super simple to learn and actually pretty powerful for a high-level language, but I also heard its not very practical for game programming. Also, I wonder about compiling exe, etc.

~Lua: don't know much abut this? any comments?

~Other Basic-derivatives. Newer more developed basic-derived languages might be the answer, but there are a ton and I don't want to spend the next six years sorting through them all. Any help here is appreciated.


Any suggestions are appreciated but please add detail relevant to my information.

Thanks everyone!

Edited by blesseddisciple, 23 July 2016 - 04:28 PM.

#2   Crossbones+   -  Reputation: 10701


Posted 23 July 2016 - 04:50 PM

You might like C#, DarkBASIC, or maybe GameMaker.

Anyway, your best bet is to try each language-of-interest out for a while (a couple weeks or less). Create simple programs to test out each one of your requirements that you listed, and if the language doesn't fit, try the next one. After you've tried them all you'll be able to choose which one you think fits your style the best.

Edited by Nypyren, 23 July 2016 - 05:06 PM.

#3   Members   -  Reputation: 108


Posted 23 July 2016 - 06:05 PM

DarkBasic actually looks pretty sweet. Seems to be much more developed than QB64. I will definitely switch over, although I was hoping to learn a non-basic language moving forward. Gamemaker doesn't offer enough mechanical programming for my taste. I will look into C#, thanks

#4   Members   -  Reputation: 838


Posted 23 July 2016 - 07:27 PM

Lua is a blast! You can use love2d library they used Lua. Leadwerks engine on steam used Lua as well and it's an easy engine to make 3D games in too. Lua is one of the most embedded scripting languages around and used in a lot of AAA studios for game dev.

#5   Members   -  Reputation: 6116


Posted 24 July 2016 - 03:40 AM


Welcome here.


Wow, it has been a long time since I programmed anything in BASIC :)

I think it's a good step you try a different language, expand your horizon.


My path is mostly BASIC, C, assembly language, C++, Python, Java, Lua, and nowadays, just any language.

Let me run along your choices.


- C/C++. Powerful, yep. "best" is more difficult. Both languages live near the "bare metal". If you want the raw CPU power, this is where you have to be. C is very small. C++ is much better for writing applications. Both languages give you performance, in exchange for no limits, and no safety net. If you make an error, it just crashes without any message why or what happened. I think it's good you don't go there now.


- Java. A bit simple language to me, but I came from the big powerful C++ corner there :)

It's a simple language, quite powerful, and it tries to protect you from harming yourself, and gives useful reports on crashes. It likes long boiler-plate code, although a lot of it is more pushed by the community and the "learn Java" books, than by the language itself.


Classes do make a more fragmented code style, but that's general to anything OO-ish. That is however not all bad, this style of programming does have a lot of merit, but it takes time and experience to understand how and where to apply it (and how and where not).

I would say, this is one journey you should make, one day.


- Objective C. Don't know it at all, and as far as I know it's an outsider, as only Apple uses it. Unless you're programming apples, I wouldn't go there.


- C# (mentioned by Nypyren), is close to Java. It's mostly in Windows-country only (although Mono exists too). Never used the language, but it has more bells and whistles, since it's a main language by Microsoft.


- actionscript. Don't know any of it.



If you really want a truly compiled language, I think this is mostly it. (Don't know about Ruby.) Java is already a bit edgy here, as well as C# afaik.

I am not sure why you want a compiled language though. If you just want to have fun programming games, you don't need a compiler. Why is a compiler important to you?




- Python. Definitely a good choice. It's a well designed language, easy to learn, has very sane ideas how to program, with a big community. Documentation is good and readily available. It is a full blown general purpose language. You can write real big things in it. Loads of libraries ("batteries included"), pygame is for writing 2D games. After 10 years, this is still my first choice of language, if there are no special requirements that need to be met.


- Ruby. Never programmed in it, but I read about it, but that was a lot of years ago. I think your estimate is about right, but I might base that on old information.


- Lua. Really really simple language. It's high level, and very minimal, and mostly aimed at embedding in another program (ie scripting) rather than as language to write applications in. Really fast to write code, but you don't get much help beyond that.




Other languages you may want to consider... I miss the Pascal-derived languages in your list. While Pascal fell off my radar before C++, it's bound to exist still. The design of the language was quite neat, although what I consider to be Pascal, is probably totally obsolete by now, as that was 20-25 years ago.


- JavaScript is also a language that I am told is quite nice. It has no relation with the Java language, except the 4 letters in its name. Used a lot in web browsers. Never done anything with it.



As Nypyren said, check the languages you're interested in. Find a tutorial that you like, look for game related libraries, and try it for a while, form an opinion about it.

We can talk all day, but nothing can replace actual experience with a language.

Edited by Alberth, 24 July 2016 - 03:40 AM.

#6   Members   -  Reputation: 108


Posted 24 July 2016 - 06:14 AM

Thanks for your reply, Alberth. I appreciate the information you provided. As far as compiled goes, I just want a language that doesn't make it overly complicated to create an executable. Basically, I want to know that if I make a cool game I can save it to a disk on pop it in a different PC 5 years from now and it will run with having to download a bunch of old outdated stuff. I want portability, not for commercial purposes, just more for personal archiving.

#7   Members   -  Reputation: 6116


Posted 24 July 2016 - 07:23 AM

Ah, ok. Yeah, I can see the purpose of that :)


I consider executables mostly as "throw away" data, and use the source code as archive.


An executable runs at the platform that you compiled it on. Microsoft takes an effort to keep old stuff running, so it mostly works there (at least it used to, as I am not  a Windows user, I don't know how that evolved to now). I use Linux instead, where I update to a new OS version about every 6 months, where libraries that you use are typically updated as well, and binaries of the previous version just fail to start (note that a Linux system provides pretty much every standard application that you need, and a lot more that you don't need, so it's not as bad as it sounds). Building your own programs from source is the normal thing to do. Having the source around also means you can just fix things, and rebuild, rather than being stuck with an old executable that you lost the source of.


Even at source level, you're not completely done though. Different languages have different ideas about backwards compatibility. Older C/C++ source code will continue to work, Java source will also continue to work (Java is extremely conservative, even to the point that it sacrifices some functionality of its own new features to stay compatible).

Python 2 lasted about 10 years, where Python 3 is now the newer version that everybody migrates to.


I don't know about the other languages.



Obviously, if you use a language, you read about it, which means you'll know that new versions are coming out, and you'll know what new features it brings. Generally they also state whether it's compatible with an older version of the language (at source level), so you know whether your source compiles on the new version.

#8   Members   -  Reputation: 524


Posted 24 July 2016 - 11:54 PM

Rust? It's the cool toy around these days, powerful language, compiles fast and safe code. There are some nice collections of libraries, which help starting from zero
(like piston).

Downside, you have to deal with complex things, like ownership, borrowing etc...

shaken, not stirred

#9   Members   -  Reputation: 6116


Posted 25 July 2016 - 01:02 AM

Don't know rust, but a concept like ownership is required anyway, if you scale up to larger programs and you don't want to go mad.


Basically, "ownership" expresses what object is responsible for what other objects. In languages without garbage collection, the owner is typically responsible for releasing the memory of its owned objects afterwards. It is often extended that owners can make changes in owned objects. Any other object that wants to make changes, has to either take ownership from its previous owner, or ask the current owner to make the changes. This is often also clearly defined.


Together, it makes it predictable what part of the variables may get changed if you make a call to some other object. If you are working on some modification, and you make calls to other code that may also make modifications in the same object as you're working on, nasty surprises are lurking around the corner. By making ownership and these rules explicit, you can predict in advance whether such problems may happen, and take counter measures.

#10   Members   -  Reputation: 3940


Posted 25 July 2016 - 02:10 AM

You could try Monkey which is very similar to BASIC:





Or also Haxe which is also a very easy language to get to grips with:

#11   Members   -  Reputation: 126


Posted 01 August 2016 - 09:14 PM



  So I'm not a complete expert but I'll give you my two cents for fun.   

Java is a great programming notation, although it has lots of outdated libraries, some of them are still useful.


  The answer to your question lies within what your goals are: If you want a programming notation that allows for

RAM addressing and copying of all objects by value, bit by bit, then obviously C++ is the way to go.  If you want

something maybe a little faster than Java and/or something that can compile to x64 then Python or Cython are

probably good choices.   If you want something that can be used to create internet applications, in browsers,

but has more organization and easier to use than the weaker notations, Javascript, then go with Java.


  My personal recommendation is Java+ Jython and C++.  Hopefully someday something a bit more ideal

than C++ will come around, but as of now there is only Python, Cython and C++ for using C libraries, which

are the root of OpenGL and Vulkan commands, as far as I know. Actually, on second thought I believe there

are a few more, maybe something like that lisp. There are also a few newer notations like Clojure and Kotlin,

but those both compile to Java Virtual Machine codes too. 


   Java is compiled, although it compiles to something that then gets run through an interpreter, but it is

thought to run nearly as fast as C++, at about 1.1x the speed.  I found this data in Killer Game Programming,

near the beginning of the book, its an O'rielly book with a wild cat on the cover.


   C++ is a bit less than perfect, as somethings require some extra lexicons compared juxtapose to other notations. but,

C++ is certainly the most prominent notation today, arguably the very most important of all. I believe this may change, but

for now that is how I see it.



Edited by KenDoll, 01 August 2016 - 09:18 PM.

#12   Members   -  Reputation: 125


Posted 03 October 2016 - 04:50 AM

hello I have the next questions, about python and beginners languajes:


knowing a Little C, if I prefer to progress smoothly and quick in game programming and get a game in few time, better to be in any C compiler or jump to python.

Because I read very good critics to python and advices against C to beginner programmers.

Another point of doubts is if I choose LUA because it has also good critics.

Evidently I am not going to program directly in one or other, I prefer to be in that looks to be its more promising frameworks: PyGame and Love2d


Maybe I'm slightly more inclined to start create in Python, but still no serious study in any of the two.

Only I'm studying the pros and cons of either.

An example: how to compile, what's the IDE, etc.

my questions only go feeding with every new advice I read about one or another, so thanks.

Edited by tenket sura, 03 October 2016 - 04:54 AM.

videogame dev

#13   Members   -  Reputation: 252


Posted 03 October 2016 - 10:52 AM

Not many mentions for html5 based gaming & javascript, any reason? It's what I was interested in learning next because it has great multi-platform potential.

Edited by Patliteon, 03 October 2016 - 10:53 AM.

Mend and Defend

#14   Members   -  Reputation: 6116


Posted 03 October 2016 - 11:29 AM

Because I read very good critics to python and advices against C to beginner programmers.
If you know neither C nor Python, the choice is easier to make. In your case, as you know some C, switching to a new language is an extra step that doesn't immediately give you anything game-related.

On the longer term, Python is probably going to be simpler to use, in C you have to write a lot of additional code that you get provided with Python without any effort.


Another point of doubts is if I choose LUA because it has also good critics.
Lua is typically used embedded into another program, and not much as stand-alone language. Com[ared with Python, Lua is super simple, also known as "minimal". There is only one data structure, namely table, and it's used for literally everything. It has no class system by default (but you can make your own). Great for small scripts / snippets, which you typically get if you hook high-level callbacks into a surrounding program, a bit limited if you want to write a complete program, and learn about the various data structures.


Evidently I am not going to program directly in one or other, I prefer to be in that looks to be its more promising frameworks: PyGame and Love2d
I don't know Love2d, but for PyGame, there isn't much framework. You pretty soon start providing your own logic in normal Python code (which makes sense of course, a generic framework can't do your logic).

Besides that, if you want to understand programming it's more useful to understand the plain programming language as well, as that makes life a lot easier to predict what code is going to do.


An example: how to compile, what's the IDE, etc.
Neither Lua nor Python need an explicit compile step, it's just "save & run". It does compilation along the way, but pretty much instantly, so you won't even notice it happens.

Python comes with an IDE called Idle. There are many more though, a search engine can find them for you :P  I use a plain text editor and a shell.

I don't know if Lua has an IDE of its own, likely there exist IDEs for the language, given the popularity. I use the same plain text editor and the same shell for Lua too :)



Not many mentions for html5 based gaming & javascript, any reason?
For me, I know nothing about it, so can't compare it really. However, it seems the primary language used in web games, so studting it seems like a good idea, especially if you want to do browser games.

#15   Crossbones+   -  Reputation: 6686


Posted 03 October 2016 - 12:29 PM

You might like C#, DarkBASIC, or maybe GameMaker.

Anyway, your best bet is to try each language-of-interest out for a while (a couple weeks or less). Create simple programs to test out each one of your requirements that you listed, and if the language doesn't fit, try the next one. After you've tried them all you'll be able to choose which one you think fits your style the best.

I second Python and DarkBASIC, as far as ease of use, language longevity, and game dev libraries. GameMaker if you want to get a game up and running easily and quicker than other options.

External Articulation of Concepts Materializes Innate Knowledge of One's Craft and Science
Beginner in Game Development? Read here. And read here.
Super Mario Bros clone tutorial written in XNA 4.0 [MonoGame, ANX, and MonoXNA] by Scott Haley
If you have found any of the posts helpful, please show your appreciation by clicking the up arrow on those posts smile.png


#16   Members   -  Reputation: 125


Posted 05 October 2016 - 05:36 AM

oh thanks for th reply,and it´s OK with the plain text to commpile it`s only that I seek about Idle and feel disappointed because in wikipedia is said to not support GUIs and that risks it to be my final choice (on the other hand Lua gets more points, and if that´s not so powerful lang, it is well related (and linked) with C, a language moderately known by me, but only superficially) .
  Maybe it`s the popularity of PyGame that compensates for the lack of GUI on its own IDE, if someone knows about.. 
Sadly, I dont understand the paragraph:
"don't know Love2d, but for PyGame, there isn't much framework. ..generic framework can't do your logic"
but Im not saying who is right or not, only that other people consider framework this (probably beginner like me in this case)
In fact, I am only learning the meaning of framework through the forums so I thank experienced opinions like that of Alberth because open my view of so many  complicated stuffs.
And of course to be able to determine if that resource (Löve2D vs. PyGame) is able to portability and making of executables and in what platforms.
But at the moment, the sinking advantage (in my personal preferences to learn) of PyGame/Python over Lua (Love2D/Lua) is maintained by its supposed ability to export to Android.
Thanks to all.

videogame dev

#17   Members   -  Reputation: 6116


Posted 05 October 2016 - 10:38 AM

... it`s only that I seek about Idle and feel disappointed because in wikipedia is said to not support GUIs ...
What does "a GUI" mean to you?


An IDE is basically an fancy editor, with some tricks. It knows how to run a Python file for example, perhaps it can also display errors reported by Python, it may be able to rename variables, etc, but basically it's a way to enter your program.



Wikipedia claims "lack of ..general user interface design" https://en.wikipedia.org/wiki/IDLE_(Python)

Note that "user interface design" there means a graphical program with windows, pop-ups, drop-downs, and menus, etc.


The claim means that you can program a Gui using Idle (an IDE is just a fancy way to write Python code), but Idle does not help you with extra tools. Thus if you want to make such a program, with lots of interactive fill-in forms, and reports, and popups and other dialogues, Idle is likely not the right tool for you.


This is however not a problem. While commercial software normally gives you 1 solution to a problem, open source software (such as Python and Lua), typically give you between 3 and several dozen solutions. Editors are definitely in the latter category, and "a few dozen" is probably an underestimation.


Python itself gives you Idle (if only to make sure you do have at least one way to edit a Python program), but nobody prevents you from finding and using a better IDE ("better" here means better to you). python.org likely has a list, and even Wikipedia provides a list (and if you look for 5 seconds at the Internet, you'll find even more lists).

Personally, I never even considered using Idle, as I like my gvim editor too much (but you may not, it has a very steep learning curve).


Just have a look at a few, and pick one that you like (and if you later find out it's not any good, ditch it, and find another that's better.



Note that programming PyGame will work fine even in Idle, as pygame only provides a rectangular area for you to draw on (see also below for a more detailed discussion), it doesn't have dropdowns, popups etc (unless you make them yourself).


Sadly, I dont understand the paragraph: "don't know Love2d, but for PyGame, there isn't much framework. ..generic framework can't do your logic"
When you use pygame, you get a program that displays a window. You get notifications that the user clicked the "close program" button, or moved the mouse, or clicked a mouse button, or pressed a key. The window is black, unless you paint rectangles, lines, or text in it. You can also display image files.


The decision what to draw, and where, or how to react on a mouse click or a pressed key, is your game logic. For example, I have a pygame program running where I track time, so it has code that catches mouse clicks, and then changes some time variables. In your code, a mouse click may mean to go left, or to remove the thing you clicked, so you'll have different code (different logic) than my pygame program.

All this logic is just normal Python code. Using a framework does not mean you won't write normal code. The framework just gives you some additional functions so you don't have to write them.


but Im not saying who is right or not, only that other people consider framework this (probably beginner like me in this case)
Did you read my reply on open source providing you with a lot of solutions for any problem that you may have?

Guess what, that also applies to frameworks.


There are a lot of solutions, and people can only point them out for you. You'll have to decide yourself. I can't tell you much, as I have no experience other than with PyGame. You may not consider that a good framework, and that's fine. Your proiblem is likely different from mine.


Just have a look at some frameworks, download a few, and try them. If you like them, keep them for further exploration. If you hate them, throw them away and find better ones.

#18   Members   -  Reputation: 173


Posted 06 October 2016 - 05:42 AM

Not sure if this topic is still relevant, but I'll just toss this here:


http://haxe.org/ using the framework http://kha.tech/


In short - Haxe is a language very similar to Flash's Actionscript and Java in syntax. It compiles to other languages though, including C++, Javascript, C#, Java, Python, PHP etc.


For game development, this is handy. The Kha framework (and other ones in the language's ecosystem) compiles the source code to Javascript for HTML5/WebGL, or C++ for all desktop and mobile platforms. Currently, this means 1 codebase gives you all these targets, and they run in a native way - the only overhead is an implemented garbage collector for the C++ target, but this is less than a VM.


It also does some cool stuff that transforms your shaders written in GLSL, to target specific shaders. Basically, for many parts of the development process, you truly write once, deploy everywhere.


I think it's definitely worth a look, I use it for my own projects!