CodeWalrus

Development => Calculators => Calculator News, Coding, Help & Talk => Topic started by: alexgt on November 03, 2015, 01:24:10 AM

Title: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: alexgt on November 03, 2015, 01:24:10 AM
I was just wondering because I am learning PHP and trying many languages but I have no real experience as far as computer programming. Thanks :). 
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: bb010g on November 03, 2015, 01:58:28 AM
If you want to try out 3D, just go download a copy of Unreal Engine 4 (https://www.unrealengine.com/unreal-engine-4/) and go through their tutorials. (You'll probably be using a mix of Blueprints (which are amazing) and C++ (less amazing, due to UE introspection boilerplate, but still nice).) As a bonus over Unity 5, you can play around with any of the source code for UE4. Any of it. Also, 2D support is continuously improving.

If you want 2D, you've got a couple solid choices. Elm (http://elm-lang.org/) is pretty awesome, and runs on JS. If you want a bit more nostalgic experience, go with Voxatron (http://www.lexaloffle.com/voxatron.php) or PICO-8 (http://www.lexaloffle.com/pico-8.php) (which you get with Voxatron). LÖVE (https://love2d.org/) for Lua isn't too fancy, but it works.

If you want to dig a bit deeper, Piston (http://www.piston.rs/) for Rust is cool. If you want to dig even deeper, go straight to OpenGL. There's a solid set of bindings (https://github.com/JuliaGL/ModernGL.jl) for Julia. (Julia is actually a really nice language. It's well designed and, due to being foremost for scientific work, is blazing fast.)

The main thing is to just to pick something and get started (https://www.reddit.com/r/gamedev/wiki/getting_started)! Don't try a big project at first. Start small, get comfortable, remake some stuff, work your way up. Also, go subscribe to /r/gamedev (https://www.reddit.com/r/gamedev) if you already haven't from that last link.
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: Dream of Omnimaga on November 03, 2015, 06:40:03 AM
If you ever go with C language, then you could probably port PC games to calculators or vice-versa, since the TI-Nspire CX and TI-84 Plus CE both supports that language.

And as always, if you need help or want to showcase your work, don't forget about CW :)
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: Snektron on November 03, 2015, 08:10:37 AM
I myself started with Java in OpenGL, but you can do OpenGL in a lot of other languages too. It gives ypu a really good idea how engines work behind the scenes, but it might take a while before you can make bigger projects. Also once you get into shaders you'll learn what power a GPU really holds O.O. Since shaders are programmed in GLSL which looks a lot like specialized C (and maybe Java), i recommend one of those languages (but considering C has no objects you might want to look at c++ too), but again, there are a lot op OpenGL bindings.

As for UE4, i like the engine and it looks good, but its like 4 gigabytes and takes like a year to compile. Also thr blueprints feel a bit like "look ma i can code" and "i've programmed my owm mod in modmaker" type programming which i don't really like, but thats personnal
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: Dream of Omnimaga on November 03, 2015, 08:40:00 AM
Regarding Unreal Engine 4 and the like, if you get into computer programming, I hope that you try to make your games so that they don't require insane computer specs.

Regarding pre-made game engines I don't mind playing games made with RPG Maker, Game Maker and Multimedia Fusion because some of them are really great and not everyone has the gifted skill of learning how to code complex stuff or deciphering code, but if you use those tools then make sure that they are compatible with most computers and that your games are original (eg not using stock demos with different graphics slapped on them)
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: novenary on November 03, 2015, 09:19:59 AM
I love C for this kind of stuff but it can be a bit of a hassle for some things. You might wanna check C++ out (although I don't recommend it, it's overly complex for a beginner), and D seems pretty cool as well (http://dlang.org/).
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: Dream of Omnimaga on November 03, 2015, 09:21:27 AM
To be honest, I am unsure if I would recommend C++, due to portability issues, but I guess it depends of preferences. The problem is if someone likes programming old-school platforms (eg Microcat or TI-84+CE), then it most likely won't support C++. It's fine if you program for other platforms, though.
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: novenary on November 03, 2015, 09:25:45 AM
C++ is about as portable as C actually. It has some good concepts but overall it's unnecessary headache if you're not working on a very large scale project and if you're working alone then other languages are better suited. That's why I recommend D, it should run on about any platform with a C runtime (not sure if it will work on the Nspire though, Ndless lacks some features for that). It's fully compatible with C libraries, partially compatible with C++ and there are a lot of bindings available to use libraries in a way that is more native to the language.

As for libraries, I like SFML, it has a pretty complete 2D library and allows you to use OpenGL is you wanna do 3D, and it does audio, input, networking and a few other cross platform things as well which makes it pretty versatile.
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: Dream of Omnimaga on November 03, 2015, 09:35:07 AM
Would D work on the TI-84 Plus CE? And is it quite different from C and C++?


Also is Lua a viable alternative for computer development? I never bothered learning that particular language because I sweared I would never do TI-Nspire development (due to TI's actions against Ndless) and wasn't interested in LuaZM for the PRIZM, but I was curious about computer development.


Now that begs the question: @alexgt did you want to know what is the best language on calc or was it for computers? Because your first post mentions computers, but the topic was posted in the calculator section.
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: novenary on November 03, 2015, 09:39:23 AM
Quote from: DJ Omnimaga on November 03, 2015, 09:35:07 AM
Would D work on the TI-84 Plus CE? And is it quite different from C and C++?
It won't, there's no compiler available for the ez80. It's similar to C by design while taking the good concepts from C++ and implementing them in a nicer manner, and kicking the bullc out.
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: add on November 03, 2015, 10:38:52 PM
Some programmers swear by language 'X' or 'Z', but really, the best thing to do is to get used to programming, then maybe consider what options the different programming languages give you.
If I were to program for PC I'd probably start out with something like Python and C.
Python for prototyping out stuff fast, then writing the real code in C. Unless I'm satisfied with the result given by Python.
Sure, some say not having OOP is a handicap, but it's mostly about how you think around the problem.
For the calculators goes the same thing, start in a high level language, progress to a lower level language.

I guess that's just my two coins..
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: Snektron on November 03, 2015, 10:50:26 PM
That seems like a smart plan. Again, considering how many OpenGL bindings there are, almost every relatively popular programming language has one.
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: alexgt on November 04, 2015, 02:38:15 AM
Thanks for all the advice guys ;). I am learning PHP for some real world work eventually. Right now I think I will look into C & C++ and work from there. After I learn a few I will start dabbling in some other ones and find my favorite :). Thanks again ^.^

Quote from: DJ Omnimaga on November 03, 2015, 09:35:07 AM
Now that begs the question: @alexgt did you want to know what is the best language on calc or was it for computers? Because your first post mentions computers, but the topic was posted in the calculator section.
Oh, you can move it to a more appropriate board (I must have note seen calculators in the board name xD (somehow...))
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: Dream of Omnimaga on November 04, 2015, 02:42:42 AM
Some people just can't get used to lower level languages unless they don't use hi-level languages for too long, but if you can do it then it's a good idea to do so.

@alexgt by the way do you still plan to do calculator programming?
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: alexgt on November 04, 2015, 02:49:33 AM
Yes, I do plan on calc programming (for the 84+ I am working on a little game in Axe) and (if/when) I find my prime (or beat the person up who stole it :P) I will start on my Prime projects :)
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: Dream of Omnimaga on November 04, 2015, 02:52:51 AM
Ah ok. I was more wondering in the case you would never find your Prime again 9eg if it was stolen). The TI-84+CE supports C but you need the real calc to debug stuff
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: alexgt on November 04, 2015, 03:02:16 AM
Yeah, I may have to buy a new Prime <_<  because I really actually use it for school (at least the CAS feature really comes in handy). And it is by far my favorite calc ever!!!
Do any of you have any Ideas for what to do to find it, I am at loose ends  :'(
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: bb010g on November 04, 2015, 04:03:23 AM
Quote from: DJ Omnimaga on November 03, 2015, 08:40:00 AM
Regarding Unreal Engine 4 and the like, if you get into computer programming, I hope that you try to make your games so that they don't require insane computer specs.
With regards to UE4 performance wise, it can be toned down pretty well. Engine/framework choice generally shouldn't be a problem for performance.
Quote from: Cumred_Snektron on November 03, 2015, 08:10:37 AM
I myself started with Java in OpenGL, but you can do OpenGL in a lot of other languages too. It gives ypu a really good idea how engines work behind the scenes, but it might take a while before you can make bigger projects. Also once you get into shaders you'll learn what power a GPU really holds O.O. Since shaders are programmed in GLSL which looks a lot like specialized C (and maybe Java), i recommend one of those languages (but considering C has no objects you might want to look at c++ too), but again, there are a lot op OpenGL bindings.
I would warn away from starting out with OpenGL directly. Game frameworks exist for a reason. Also, Java is not the best language for development in general. It's verbose, and that does hurt putting your program in your head.
Quote from: Cumred_Snektron on November 03, 2015, 08:10:37 AM
As for UE4, i like the engine and it looks good, but its like 4 gigabytes and takes like a year to compile. Also thr blueprints feel a bit like "look ma i can code" and "i've programmed my owm mod in modmaker" type programming which i don't really like, but thats personnal
Why the heck are you compiling UE4? (Compilation times for the games made have always been fine for me at least.)
Honestly, I don't care what Blueprints feel like. I don't care whether they're visual, and I don't care whether they're used by noobs. Plenty of Java has been written by noobs. Noobishness shows itself in the quality of the algorithm, not in the choice of the language. The import thing is that Blueprints are easy to deal with. I can prototype with them easily, and do 75% of what I want to do. I'm not here to format my C++, I'm here to make a game. That's why UE4 allows you to mix Blueprints and C++ so easily. They're made for early work and trying things out. You don't want or need to jump to C++ immediately. They even provide utilities to move your Blueprint code over to C++ when ready.
I dislike PHP due to its design, but that doesn't mean legitimately good code can't be made in it and I can't appreciate that code. Working code is working code, and Blueprints are well designed, even though they're visual. Get over yourself.
Quote from: Streetwalrus on November 03, 2015, 09:19:59 AM
I love C for this kind of stuff but it can be a bit of a hassle for some things. You might wanna check C++ out (although I don't recommend it, it's overly complex for a beginner), and D seems pretty cool as well (http://dlang.org/).
C's nice until you actually want to do objects and don't have RAII. I'd wait on doing pragmatic C++ until the Core Guidelines get sorted out. @Streetwalrus Do you know of any good D frameworks? I pointed out Piston for a similar reason; Rust is a very nice language that's similar to C++ in feel but tons safer and with (IMHO) nicer design. Nim (http://nim-lang.org) is pretty similar in wanting to be a fast, nicer C/C++ (more C/Python-ish to me). There's nim-csfml (https://github.com/BlaXpirit/nim-csfml) there, and some other stuff. Just nimble search game.

Most of the languages and frameworks I brought up were brought up to give you a spectrum to choose from, both language and game wise. As @add said, the important thing is to just pick something and start coding. Keep in mind that you're writing a game though. Just write for yourself at first. Don't worry about speed unless you think it feels too slow. You probably won't need to ever write something in a different language for speed here, especially if you stick to the language & library set I gave you. Read through that getting started link. Go make something. If you want, post it here. If you don't, don't. It's your code, your hobby. Do what you want, as long as you do something.
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: Strontium on November 04, 2015, 06:05:17 AM
Quote from: bb010g on November 03, 2015, 01:58:28 AM
If you want to try out 3D, just go download a copy of Unreal Engine 4 (https://www.unrealengine.com/unreal-engine-4/) and go through their tutorials. (You'll probably be using a mix of Blueprints (which are amazing) and C++ (less amazing, due to UE introspection boilerplate, but still nice).) As a bonus over Unity 5, you can play around with any of the source code for UE4. Any of it. Also, 2D support is continuously improving.

If you want 2D, you've got a couple solid choices. Elm (http://elm-lang.org/) is pretty awesome, and runs on JS. If you want a bit more nostalgic experience, go with Voxatron (http://www.lexaloffle.com/voxatron.php) or PICO-8 (http://www.lexaloffle.com/pico-8.php) (which you get with Voxatron). LÖVE (https://love2d.org/) for Lua isn't too fancy, but it works.

If you want to dig a bit deeper, Piston (http://www.piston.rs/) for Rust is cool. If you want to dig even deeper, go straight to OpenGL. There's a solid set of bindings (https://github.com/JuliaGL/ModernGL.jl) for Julia. (Julia is actually a really nice language. It's well designed and, due to being foremost for scientific work, is blazing fast.)

The main thing is to just to pick something and get started (https://www.reddit.com/r/gamedev/wiki/getting_started)! Don't try a big project at first. Start small, get comfortable, remake some stuff, work your way up. Also, go subscribe to /r/gamedev (https://www.reddit.com/r/gamedev) if you already haven't from that last link.

Right, I haven't read the whole thread yet, so I don't know if someone responded to your thing. But, anyways:

I do not think Elm will be good at all for anything @alexgt wants to do. First of all, he said he isn't very experienced in computer programming. He probably has NO experience in functional programming (unless he has somehow done functional programming on a calculator? A programmable calculator using a language like Clojure or Haskell would be awesome.), and trying to use functional programming for the first time for a task like making a game probably is not a good idea.
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: bb010g on November 04, 2015, 06:09:31 AM
Elm is actually pretty nice FRP. Check out their examples; they even have live code adjustment! The benefit here is that he hasn't really programmed a full on language before. Functional programming is less brain-melting if you haven't hardened it with years of procedural or OO first. Plus, if he doesn't care for Elm after trying it out, I gave plenty of alternatives. :)
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: novenary on November 04, 2015, 09:24:10 AM
Quote from: bb010g on November 04, 2015, 04:03:23 AM
C's nice until you actually want to do objects and don't have RAII. I'd wait on doing pragmatic C++ until the Core Guidelines get sorted out. @Streetwalrus Do you know of any good D frameworks? I pointed out Piston for a similar reason; Rust is a very nice language that's similar to C++ in feel but tons safer and with (IMHO) nicer design. Nim (http://nim-lang.org) is pretty similar in wanting to be a fast, nicer C/C++ (more C/Python-ish to me). There's nim-csfml (https://github.com/BlaXpirit/nim-csfml) there, and some other stuff. Just nimble search game.
Indeed nim seems really nice as well. For D, there are two bindings for CSFML which offer a more D-ish approach (I think it wraps the different objects into classes among other things).
The lack of classes and RAII is indeed something that is missing from C, but again, it depends on how well you can design your code. Manual dynamic allocation can be made efficient, it does require a little more experience though, that's why I was pointing out C++ and D which do have these features.
I might add that C will feel slightly familiar if you have use Axe before.
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: alexgt on November 04, 2015, 11:40:54 PM
^ I have used Axe before and am actually on the brink of posting a little game I am making, also completing JarvAXE 5.0 would be nice (but I forgot all of how it works and what I was working on and lotts of other stuff so I have to relearn Axe because I took a long break and then reprogram it <_<). I think I will poke around a bit and see what fits ;)
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: Dream of Omnimaga on November 05, 2015, 10:02:21 AM
If anyone is gonna pick java, just don't use it for web-based applications. It would be better if used for standalone programs. Because nowadays this is how about 99% of the web-based java applications look like in browsers:

(http://i.stack.imgur.com/X7PAR.png)
http://i.stack.imgur.com/X7PAR.png

IMHO tho people should pick the language they are comfortable with rather than trying to please a few fanboys of other languages. Just as long as their programs don't have compatibility problems. If somebody just can't stand any language other than Lua, for example, then I would rather see a quality Lua game from him with perhaps slightly slower performance, than a buggy C game where several features had to be scrapped because he spent 90% of his time debugging it and forced himself to program it in a language he doesn't like.
Title: Re: What is the Best Programminglanguage to learn for Game Dev? :-|
Post by: novenary on November 05, 2015, 01:59:05 PM
Quote from: DJ Omnimaga on November 05, 2015, 10:02:21 AM
IMHO tho people should pick the language they are comfortable with rather than trying to please a few fanboys of other languages. Just as long as their programs don't have compatibility problems. If somebody just can't stand any language other than Lua, for example, then I would rather see a quality Lua game from him with perhaps slightly slower performance, than a buggy C game where several features had to be scrapped because he spent 90% of his time debugging it and forced himself to program it in a language he doesn't like.
This is true, depending on the kind of game you are working on performance may not matter, for example most 2D games are pretty low on the CPU for modern machines, especially since they are most of the time designed as retro games. It also requires a lot less matrix/dot/vector calculations since you don't have to worry about moving models. Most of the workload is going to be on the GPU if you use a modern framework, so all the drawing will be very fast and the graphics can be quite complex (again, no models).