The above article will explain it better than I can!
Enjoy.
Not Telling
Glass_Knife hasn't added any contacts yet.
Posted by Glass_Knife
on 18 May 2013 - 03:44 PM
The above article will explain it better than I can!
Enjoy.
Posted by Glass_Knife
on 14 May 2013 - 02:35 PM
Eclipse will be fine. As for tutorials, start with all the Java tutorials. You will be way ahead...
http://docs.oracle.com/javase/tutorial/
Posted by Glass_Knife
on 08 May 2013 - 07:27 AM
I would like to point out that if you create the game with javascript, you can run it in the browser. If you go with something like libGDX then you are writing it in Java and converting it into javascript, so there are more layers to confuse you, but you can support many different platforms.
However, this doesn't address the problem of creating a fun game. I am of the belief that if your prototype game with crappy graphics and hacked UI is not fun, no amount of polish is going to help. So going with a framework like libGDX or GameMaker to prototype as easily as possible is a good idea. Once you have the game it is a lot easier to port it to different platforms. Until you know what you've got you might not even be sure which platforms should be supported.
Just my two cents.
Posted by Glass_Knife
on 05 May 2013 - 01:30 PM
If you want to do the input and sound yourself, check out
http://jogamp.org/jogl/www/ - OpenGL for graphics
http://jogamp.org/joal/www/ - OpenAL for Sound
https://java.net/projects/jinput - JInput for Input
This is what LWJGL is doing behind the scenes if you wanted to learn it all yourself.
Posted by Glass_Knife
on 05 May 2013 - 12:14 PM
Java 2D out of the box is a good API, but will not have the things you need for game programming. It is lacking input and sound. As for 3D, you can use JOGL with OpenGL, but I would suggest using a 3d party library.
http://libgdx.badlogicgames.com/
Depending on your requirements, one of the above libraries should suit you just fine.
Posted by Glass_Knife
on 30 April 2013 - 08:33 AM
LWJGL is a good choice. The reason is not OpenGL, which is easy to use JOGL and just set stuff up yourself. The reason is the JInput and OpenAL integration. There is very poor support for keyboard and mouse and none for other controls with straight Java. As for sound, the Java sound support is so terrible that you'll be switching. Rather that learn Java2D, OpenGL, JInput, and OpenAL all by yourself, starting with a wrapper API is a good idea.
Having written straight Java2D games and tutorials about it, I can tell you that learning one of these wrappers is time well spent.
If you goal, however, is to learn how all these things work, and you are not trying to crank out a game, then by all means give them a shot by hand.
Posted by Glass_Knife
on 26 April 2013 - 09:05 AM
There was an article just added about this...
Posted by Glass_Knife
on 17 April 2013 - 08:08 AM
Stumbled across this a few months ago. While they are still porting their docs to the new format, there are lots of articles and code example for coding 3D graphics from scratch.
Posted by Glass_Knife
on 15 March 2013 - 09:23 AM
http://scientificninja.com/blog/dont-write-tutorials - Here's a link to an article people have referenced again and again about not writing tutorials when you don't know what you are talking about.
What I really love about this is the update link added three years later, where the author has to update his explanation. So the quick tutorial about why making tutorials is wrong... was wrong.
Great tutorial writers make mistakes. That's how people learn. The only failure would be giving up and not learning from your mistakes.
Posted by Glass_Knife
on 08 March 2013 - 08:23 AM
Without wanting to labour the point too much, these are both reasonable architectures to use, but they aren't what the original MVC was designed for.
Yes, I agree with this. I think it is important to point out that patterns are a way to study complex systems. Many programs have been written re-writing the same structure, so some really smart guys (the gang of four) cataloged and named them so there would be a common language when discussing them. Now I can say I used a Factory Method, and other programmers will know what I mean (hopefully).
More important than how you make a MVC is why. You can structure the code in many ways, you can remove one of the three MVC objects, and you can allow or prohibit the objects from knowing about each other, and each configuration probably has some different name. But the reason you structure your code this way is so that it is easy to evolve the system with the minimum amount of change.
By having a data object that knows about the data, and observers that can listen for changes to the data, you allow new observer to the data to be added later without updating the data object. This way your objects are loosely coupled. This is great for a GUI that waits for user input. Some data objects may be observed by dozens of different views when the program gets really large.
The view displays the data. If you are doing a game, then there will be an input module polled or sampled every frame for the data. But a GUI application doesn't work that way. Each view is the object that receives the user input. In this situation, the view needs a reference to the controller to pass on the user commands.
The controller knows what to do when the user input is received. Sometimes it will do things with the data, and sometimes it needs to affect the view, such as enabling or disabling controls. So to just decree that the view doesn't know about the controller, or that the controller only operates on the data and not the view, isn't practical when you start trying to make a program that actually does stuff.
Think of these patterns like the "Pirate Code". They are guidelines, not rules. Use them as an example of structuring you code so that you code is loosely coupled enough to be extendable without adding too much complexity.
Posted by Glass_Knife
on 13 February 2013 - 11:48 AM
The -cp flag is short for -classpath, which tells the java command where to look for the class files. If you didn't put *.jar file in the classpath, then Java would not be able to find the code.what exactly does "-cp" mean?
Posted by Glass_Knife
on 06 February 2013 - 01:10 PM
Don't get confused here. The Java Server Socket library is a wrapper for using TCP/IP networking communication. Any socket, whether a client or server socket, has both an input stream and an output stream. It reads data "in" from the input stream and writes data "out" to the output stream. But the server or client doesn't hold a stream from the other code. You can write a client that talks to a Google server and gets the home page. You have no idea what language or operating system Google is using, and that's the point. The TCP/IP protocol handles all that crap for you so you can just write code. And all the (really) low level code is wrapped up in the ServerSocket library.the server has hold of the clients what? output stream or input stream? and what does the client have a hold of on the server? the servers output stream or input stream?
Posted by Glass_Knife
on 27 January 2013 - 12:59 PM
package falling; <- this is fine
// Note, convention is to use a Capital letter for class names
// Window, not window. Not an error, just what everyone does
public class window { <- start window class definition
this.setTitle("Falling"); <- this code isn't in the right place. Try a constructor or a method.
} <- end window class definition
// This code below the comment doesn't belong to the window class. It doesn't belong to any class.
// Fix this :)
if(false)
{
this.setExtendedState(this.MAXIMIZED_BOTH) <- somthing missing here
}
else
{
this.setSize (1024, 768) <- somthing missing here
this.setLocationRelativeTo(null) <- somthing missing here
this.setResizable(false) <- somthing missing here
}
Posted by Glass_Knife
on 26 January 2013 - 09:35 AM
I will be checking it out. Thanks. ![]()
Posted by Glass_Knife
on 26 January 2013 - 08:25 AM
Not sure if this question is better asked here or in the programming forum. I've been playing with sound programming, but I find the APIs hide too much stuff. When I learned 3D graphics, I started by learning from scratch. I would like to know if anyone has any resources (books or online) that teach audio programming from scratch. Much like writing a software renderer from scratch to learn about the algorithms.
I've googled and amazoned, but I don't really know enough about the subject to make a decision if the books I found are any good. And man, I though software books were expensive. Audio books are not cheap. ![]()
Thanks,
Find content