Hey guys, im pretty new in Java(like 1 or 2 weeks), and i started to see the basic java game programming series of a YouTube channel called “ForeignGuyMike” i dont understand at all, im searching every thing i don’t know(and sometimes i still not understanding that) and some simple things like set the FPS on my game is complicated to understand(and more because my main language isn’t english), and i know using a framework/engine to make games in Java makes the things more easy, but i want to learn correctly Java for my future programming, and i don’t know what to do. ??? ??? ??? ???
I don’t recommend learning to program via making games, which I did myself. Start to understand the logic first. Before giving any advice, I want to ask you, is Java your first programming language? Or did you have experience in programming in any other language and switching to Java now?
I learned programming in GameMaker but now i want to make games with Java but the things of GameMaker are easy i think, i learned the basics of Java
EDIT: i want to program in Java by doing something, i have the GameMaker with android module but i want to learn programming in Java to have more logic in game programming(thing i got a little) and finish a game with it, is weird what i want to do i think.
If you have got as far as scripts in GameMaker, then you can easily understand Java, because both are C-like syntaxes. You have to understand the OOP nature, variables and scopes, and the API that you want to use. You also need to learn the collections which you use almost everywhere.
If you want to make games, then it is better to use an engine, because it is what you are used to, and also makes things a lot easier. There are a lot of libraries, but I can recommend LibGDX, PlayN, SilenceEngine (shameless self promotion, I’m the author of SilenceEngine), etc.,
Take a look into the engine of your choice, and start making your game.
Thanks for the answer, i will see that engines!
I learned all the basics of Java that you said(variable scope, OOP, inheritance, etc) and i was thinking you need to learn some of the basics of Java game programming without an engine, because things like set the FPS(i think is a easy thing but i don’t understand that little thing because of the crazy math operations or if people memorize that).
What kinds of games do you want to make? E.g. a word puzzle game or textual adventure might need nothing but the console. Or there are quite popular games like Dwarf Fortress with just text-based graphics too.
You mentioned your “future programming” in contrast to game programming, maybe planning to take it up as a long term career option? In which case working without a game engine is a better idea IMO - draw shapes to image, put image on screen, bingo! Or as SHC said, don’t do games at all (experience with something database related will be far more lucrative).
I never said that, I said to work on games after he gains some experience with Java APIs, and specially collections API. It’s not that I don’t want him to make games. If he wants to make games, then his best choice would be to choose a engine, because it gets the job done quickly.
i said “future programming” because i want to study something of programming in university, the games i want to do are Arcade/Platformer games
Can I ask how old are you now? If you have never done programming before, then my suggestion is to start with simple ones, do something in CLI (Command Line Interface) until you understand core concepts well before stepping into GUI. I suggest you to learn some web technologies and how they works, and after that you can come back to Java and use JavaFX, a web like GUI framework.
I’d not recommend looking into AWT or Swing, which most people do use nowadays. Since you are talking about the future, JavaFX will be the standard by then.
If you just want to make games, then go with an engine seriously. But if you want to understand the concepts, try doing a game first in JavaFX. Or even better, try Processing, as it is a teaching utility nowadays.
I have 14 years but I programmed before using Java and i understand most basic things, i will see JavaFX and Processing, thanks for the answer.
I watched that guy’s series on Youtube as well when I was first beginning but IMO he doesn’t teach all that well. It’s mostly watching him code really fast without much explanation.
I actually enjoy writing my own library rather than using an existing engine plus I wanted to practice programming techniques. Eventually I’ll want to create an app that probably has nothing to do with video games, but by coming up with my own library, I think I’ll be better suited for creating a larger app. Structuring a game and juggling all its components takes A LOT of time and practice to learn how to do it. I don’t think it’s important to know how to make a game without one, since a lot of games that are a hit use existing game engines.
Oh, and where you did learn to code games in Java?
[quote]Eventually I’ll want to create an app that probably has nothing to do with video games
[/quote]
Yea, i was thinking the same thing with an app
I taught myself by using resources from the internet. The big problem with this though is in finding the right information, it becomes quite a task very fast.
Appears that people who post information on youtube are only interested in Marketing, which is fine. But to get the good stuff I’ve found that books are better suiting for self teaching. Articles in blogs and such are good too.
Here’s a link to a free version of an awesome book I used when I was first learning to makes games in a 2D space and using AWT. I think it’s fine to learn the basics with AWT but eventually Open GL is probably the way to go, even for 2D games.
I tried using Canvas on Android to make a 2D game and it scales like shit which becomes difficult to match various screen sizes out there. Open GL ES on the other hand, scales super fast and makes the game run smooth as silk.