As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I need to create a Java-based platformer game for a high school project (not computer science related), and I want to spend as little time on technical stuff as possible.
I'm already experienced in Java, and I already have most of the gameplay, graphics, etc. All I need to do is code it. I've looked and I'm considering one of two options that do not involving coding a game from scratch:
Copy an existing Java platformer (best option, but I can't find an open source Java platformer)
Use a Java game engine to avoid coding from scratch. I've looked at JGame but I'm not sure if it's the best bet for a platformer.
I am in the exact same boat as you. There just aren't enough (free, opensource) resources around to help start Java game developement. http://www3.ntu.edu.sg/home/ehchua/programming/java/J8d_Game_Framework.html
I think this is one of the best tutorials I have seen around. It basically gives you a template for the game.
There's a book called "Killer Game Programming in Java" that has an example of a 2D platform game using the Java 2D Graphics API. I think the source code for the book is available on the author's site here: http://fivedots.coe.psu.ac.th/~ad/jg/
It's a decent book, but the code examples are a little messy. It might give you enough to get started though.
Developing Games in Java is a great book, and the first half of it goes in detail about creating a 2D platformer game. Overall I found the book's explanation to be excellent, and the full game is on the CD so you could mod it to fit your needs. [edit: wait a second... it doesn't come with a CD... the source is on the website, see below!]
I don't feel like it's a super fully-developed platformer; it feels more like a demo. But you could use the game as a starting point and add anything else you need. And the code, being a book example project, is well documented and commented. It has a level format too, so if you find it fits all your needs you should be able to just drop in your images and make your own level files, and then load them in-game.
By the way, the rest of the book dives into creating a software 3D engine from scratch using Java 2D. It's really awesome. Just a bit of a bonus after this project is done, eh?
Also a downside, the book is now almost 7 years old. It uses Java 1.4 though, and the book website is still online, so I'd say it's still a viable resource! In fact, it looks like the book website has a demo of the game AND all of the source code, so you might not even need to buy the book. Go check it out!
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Ok, so I've decided that I want to learn Java. It's my first more hardcore coding language, because the only other coding I've done is javascript (And I'm still relatively new to that). What I need is a good tutorial, that will assume you have no previous experience in java. I figured that I would take some web tutorials before I bought a book. This is the tutorial I found. It's a kids one, and I'm only 12, so I figured this would be good for me. My only concern about this tutorial is that it's assuming i'm in older software like windows '98. I'm not sure if I should be concerned that this is outdated or not. Additionally, I would love any other suggestions for java tutorials on windows, as I have to admit that it currently seems quite intimidating :P. I appreciate any feedback. Thanks.
I'm not sure if I should be concerned that this is outdated or not...
The age of the tutorial would be my first concern, and Java Programming for Kids, Parents, and Grandparents is copyright 2004. That's a decent year for a starter Java tutorial, since it will be compatible with the latest version of Java (it just won't cover anything brand new, but you won't need any of that when you're just starting out).
Also, the references to Windows 98 in the document make it sound like they expect the reader to have a newer operating system. Case in point, on page 18 of the PDF we see this:
If you have an old Windows 98 computer...
So the document is good for anyone with Windows 98, but they assume that Windows 98 is an old computer (the author gives special advice for Win98 users that nobody else needs). The document also references Windows XP, e.g. when the author provides a screenshot from his Windows XP laptop, so the author isn't assuming all readers are using Windows 98.
Ultimately, I wouldn't worry about the age of the document you're reading or references to Windows 98. If it's helping you, keep reading. :)
As for other Java tutorials, I'll defer to the other answers here. Good luck.
When I learned java I used Central Connecticut University's introductory course. It tends to go slow enough for you to understand but also fast enough to where you don't get bored.
Be sure to do the exercises at the end of the chapters!
Personally, I like the Oracle/Sun tutorials.
Just stay away from the enterprise stuff for now.
*edit: I would like to add that one of the best ways of learning a new language is to try and recreate something simple in that language. This could be a little server which just tells you the current time, a simple tic-tac-toe game, etc.
I learn't most of the basics though TheNewBoston. It was clear and was separated into multiple sections. They are video tutorials, I did use more resources to supplement it later on.
Link: http://thenewboston.org/list.php?cat=31
It's a pretty good kid's tutorial, even if it is a little outdated. If you get bored with that book and are feeling a little adventurous, I recommend trying Building Skills in Object-Oriented Design. The book goes through a complete design of Roulette, Craps and Blackjack. Three games that are complex enough that they can't be trivially designed. Oracle/Sun tutorials are also good, like Steven suggested.
Oracle actually has a pretty good tutorial on their site (for starting out). I haven't completely gone through their graphics tutorials yet, but it does a pretty good job at covering all the basics, including beginner programming fundamentals for anyone who might be learning it as a first language.
http://docs.oracle.com/javase/tutorial/
If you do decide to purchase a book, I have heard good things about the following:
http://www.amazon.com/Java-How-to-Program/dp/0273759760/
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I'd like to port my Zuma-like game to browsers. It's not really complex 2D arcade game, just some animations and particle systems - really similar in complexity to the one I linked to.
I'm wondering what technology should I use. I'm thinking about Java, Flash or maybe some solution working without a plugin (SVG, Canvas?). The cost of the technology is also really important to me (I'd prefer a free solution of course, but don't know if it's possible).
It's really probable that I'll also port the game to Android and iPhone. Maybe if I picked Java, I could write one version that would work on both: browsers and Android phones?
Sorry for my lack of knowledge, my situation is pretty weird now, since I got an interesting offer from a producer.
If you really want to port game to the web (e.g. it is not a weekend project of yours), it is a real project which is supposed to be used by many users, and you are not paid specifically by Google or Microsoft to make this game using JS+canvas, you should choose flash. Making professional games with HTML5, which works on every browser is very time consuming task. Also I'm not really sure it is possible to make HTML5 game without Flash, as far as I know web versions Angry Birds and Cut the Rope are using flash player for sounds (since there is no low latency sound api in browser).
So this is one of the reasons why to use Flash. Another reason is that Flash is used for creating games for very long time, there are lot of resources, game engines , tutorials, user groups and etc.
Also you don't need to buy anything from Adobe to start building games, there free editors (like FlashDevelop) or more advanced commercial IDEs(f.e. Astella from JetBrains).
HTML5, javascript and CSS3 will make your game run anywhere, its free and its the future.
HTML, CSS, JQuery seems to be the emerging way of creating anything on the web. This includes games. Yes, this technology hasn't been "perfected" yet, but I would at least spend sometime with it. Hey it's free, portable, and is always improving.
I found the following link on Google by "searching HTML5 game engine". http://impactjs.com/
Someone posted an all CSS game on YCombinator a few days ago. It's amazing what you can do nowadays!
http://news.ycombinator.com/item?id=3483662
http://jsrun.it/GeckoTang/4rXg/
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I have followed tutorials where they show you how to make your own animation class and sound class as well as the basics but I was wondering if it would be beneficial if I were to just use an open source java game engine like jMonkey or the Lightweight Java Game Library, instead of coding my own game engine from scratch? What are you thoughts on this?
I was wondering if it would be beneficial
Beneficial to whom? Are you trying to learn, or to make a game with a group of people?
Is your goal to learn how games engines work, or make a game? Both will give you knowledge you wouldn't get otherwise, and neither is the complete story.
Learning how to create your own engine is useful, and learning how other people build game engines is also useful. Using an existing engine will get you one step closer to making a large game.
Neither choice will really hinder you much from making a small 2D game, as long as you're picking a 2D engine. If you try to make a 2D game in a 3D engine, that will take quite a bit more time to learn, as 3D adds another level of complexity.
LWJGL is an excellent platform to use, not because it makes your whole engine for you, but because it provides great interfaces into libraries such as OpenGL and OpenAL.
However, it really depends on what kind of game you're making and with what complexity. Since it seems this is a hobby type project, it's probably good to use a middleware layer, however make sure that you still understand what it's doing.
Note that jMonkey and LWJGL are fairly different, since jMonkey is actually a full game engine for the most part.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I am looking for a book which teaches Java very fast. Basically I am a C++ programmer and do not need to know each and every aspect of programming. I am learning java for android apps development. A lot of books like thinking in Java, learning java and others suggested are pretty big and I want something small to get me going.
A website like http://www.cplusplus.com/doc/tutorial/ for java also can be helpful. please answer ASAP.
I love to think of the javadoc as the equivalent of cplusplus.com. The comments on standard classes are much more detailed than stl comments are (and the code is a lot easier to read, too)
Personally I'd recommend just reading a tiny bit of literature and then using an IDE that provides really quick access to code and comments for any callable method (almost all do if you link sources and javadoc). Usually they provide greate usage exmaples and the code itself teaches best practices and proper design.
Unlinke for C / C++ I don't think using an IDE is much of a problem. Javac hides everything anyway and there is not much to know about something like linking unless you use a lot of libraries and enter "jar hell". But even then there is nothing to be learned by compiling from the shell that might help.
Build scripts to use will most probably ant or maven and both are a lot more high-level than Makefiles. While I'd really recommend never to rely on an IDE for C++, I'd totally do so for java.
What about Beginning Android 3 (http://www.apress.com/9781430232971)
It has 612 Pages but it really focuses on Android development and not really on programming basics.
Check the Table of Contents on that page and you will see.
Head First Java is a great book and very easy to read and understand. It got lots of graphics to support the reading. I find it perfect for beginners.
For pure java - Thinking in java (its nicely written but quite big (+1000pages))
For Android check notepad tutorial on official android page its good for beggining http://developer.android.com/resources/tutorials/notepad/index.html
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am a registered Student at a university in Switzerland, thus I know that programming is part of Electrotechnik (electrical engineering), the field I am going to take.
How can I learn programming with Java with easiest way, and without help by others?
I tried it through learning books, but I found it not easy, especially to do it alone.
For someone that knows nothing about programming, just reading tutorials will not do it for you. It would be good to download an editor and actually write the programs with any tutorial you use.
The thing about programming, the more you actually write the better you get at it.
Grüß, Thomas, if you haven't learned any programming it may be a little hard to start, but the Sun Java Tutorials are a good place to start.
Try the Java Tutorial. It will walk you through actual examples, with code that you can try out in various IDEs. I usually find that easier than reading a book.
Head First Java is good, if you can get past the style. Some people like it, others hate it (I haven't found anywhere in between). The funny part is the ones that like the style are the people who have more experience I find (not 100% true) but the book is aimed at those with little experience.
If you like the style it is a good book, if you hate the style, there are others, just let use know (as others have asked), are you 100% new to programming and if not what other languages do you know. Also what part(s) of the langauge are you having trouble with in particular?
In fact you have to learn two things, programming and Java.
I would recommend the book thinking in Java (Bruce Eckel), the current version is the 4th edition but you can download the 3th revision for free...
What books have you tried so far? When I started someone recommended to me "Sprechen Sie Java?" my Hanspeter Mössenböck which actually worked pretty well for me back then (having written not a single line of code before starting with Computer Science).
You could try a free course at Javapassion.
Another option for you if want to get a jump on your studies, you could go through the open courseware from M.I.T. For example, the Intro to Java Course.
Try the FREE book Java Programming for Kids, Parents and Grandparents by Yakov Fain
Get yourself set up and complete a "Hello World" tutorial, there are so many all over the next.
Once you know you can compile a Java program and view the output. Think of a small program. It might something as simple as converting Celcius to Fahrenheit and vice versa. Build that, using Google and whatever other resources you need to to find what you need to do. Once you get that running, think of something more complicated. Build that, keep doing this for a little while.
By building real apps, that give you something you want you will be much more motivated and you will understand what you are doing better because all the curly details haven't been solved for you the way they are in online or book tutorials. You may not use the most elegant design but you will learn more.
However at some point you will need to start to delve into books about Object Oriented architecture etc. but for now just jump in and force your brain to learn.
Another vote for actually doing some coding here. If you don't like the exercises in books then try programming something you're interested in personally. In my quest to learn C# I'm writing a program to correlate and display photos and GPS tracks and as a spin-off I'm trying to write a 3D graph component in WPF. Having a real problem I'm actually interested in makes a big difference to me, you can get a bit tired of implementations of bank account classes and vehicles.
Take a look at BlueJ. It was designed to teach Java
I recommend the Stanford course CS106A, which is available for free to download, and can also be found on iTunes. It's a great course, and the teacher is very enthusiastic:
http://www.stanford.edu/class/cs106a/
I agree with others that the Sun tutorials and the Thinking in Java free book are excellent, however, I don't think they can replace a video for someone completely new to the field.