Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Jeff

Members
  • Posts

    2669
  • Joined

  • Last visited

    Never

Posts posted by Jeff

  1. Don't listen to anyone above.

    The truth is unless you have explicit permission from them, it's illegal. Does this mean they'll shut you down? Not necessarily. They may not notice it for years, or they might not really care. However, there have been attempts at Zelda/pokemon fan games that were shut down before they were released because nintendo was a female dog.

    tl;dr:You should try it, but so long as you use their intellectual property you're subject to being shut down.
  2. > Who is this Wacko guy? I don't like his name -.-

    When I went by Frosty I changed my name for a week and some newb who was active for about 2 weeks stole it.
  3. > The only IDE I actually do use is Microsoft Visual Studio, otherwise I simply favour a shell (at least, if you do have a proper build system such as make, CMake or Ant), a version control system (such as Git or Mercurial), and a text editor that offers syntax high-lighting, line numbering, proper indentaton and guide lines instead. Some people might as well, and some might prefer an IDE.
    >
    > Yours faithfully
    >
    > S.J.R. van Schaik.

    First off you don't count because you're a certified genius ;D

    In seriousness, I learn by doing and experimenting, and if I have an IDE it's significantly easier to figure out why my shitty code is so shitty, or why it doesn't work. Breakpoints are helpful, and Eclipse offers quick fixes that make guessing what the syntax is easier.

    > I have a BizSpark account so I could easily obtain Microsoft Visual Studio.
    >
    > Is that also a compiler/IDE for Java? ..

    No. Eclipse and netbeans are both free though, so obtaining them is easy.
  4. > I am unsure if people already do this (or if this is possible) but rather then posting a screenshot wouldn't it be better to just take the map file and allow someone to load it into eo? (They can include screenshots as well) this way people could just enter the map that was created…

    Personally my maps are pretty sloppy for a mapping contest. I use layers poorly, and I never use attributes. Using the EO map file would prevent making the map in another map editor, though.
  5. > The only tools that are obligatory for this tutorial are the Sun/Oracle JRE (for run-time purposes) and the Sun/Oracle JDK (for development purposes).
    >
    > Yours faithfully
    >
    > S.J.R. van Schaik.

    very true, edited my post giving a few more options on how to compile it. You really shouldn't need Eclipse for this tutorial, but Eclipse is extremely helpful when you start creating your own code. Other IDEs are also good, Eclipse is just my favorite.
  6. Yeah, Java is fairly easy.

    As far as IDE goes, I go with [Eclipse](http://www.eclipse.org/), but you can use any IDE or even [notepad](http://introcs.cs.princeton.edu/java/15inout/windows-cmd.html). Setting it up is a bit of work, but if you google for a tutorial it's pretty easy. The tutorial series has been put on hold, but it shows you enough for you to make a simple simple game. For more complicated 2d game development, I'd recommend slick2D.

    edit–

    Added more about how to compile/run without Eclipse.
  7. Hello all, this is the first tutorial in a series that I've intended to make for a while. In this series, you will learn how to create a basic Java game using Java2D.

    This tutorial will teach you how to create a window using JFrame. It's not really interesting right now, but it is the most important part. Without knowing how to do this, you won't be able to do anything else in the tutorial series.

    Anyways, let's start. In your fresh, blank project, create a class called "App" or "Aplication", really whatever the duck you want to call it. You should have a class that looks generally like this:

    ```

    public class App {

    }

    ```
    Now, add the following code between the curly braces.

    ```

    public static void main(String[] args) {

    }

    ```
    This is the main function. It is the 'entrance point' of a program. It is called when the application is started. As it is currently, if you run this program nothing will happen because there is nothing in the main function.

    Now create a class called GUI, or Frame, or anything like that. At the very top of the page, above the class, add the following:

    ```
    import javax.swing.JFrame;

    ```
    This code tells Java that it's using the JFrame library. Speaking of which, you need to make the class extend JFrame now. Make the class header look like this:

    ```
    public class GUI extends JFrame

    ```
    This tells the program that the GUI class is a JFrame component. Now let's define some variables. Between the curly braces, add these variables:

    ```

    //public members

    public final static int HEIGHT = 400;

    public final static int WIDTH = 600;

    //private members

    private static final long serialVersionUID = 1L;

    private static final String title = "TEST";

    ```
    The HEIGHT and WIDTH variables define the size of the window that will be made. The title variable is what will show up in the OS' GUI(In windows it's the top left of the window frame). Now, let's make the GUI class do stuff. The only method in the GUI class will be the constructor. The constructor will make a window pop up with the title in it. I know, fancy, right? Let's hop to it. Add this code below the variables you defined.

    ```

    public GUI()

    {

    this.setSize(WIDTH, HEIGHT); //set the size

    this.setResizable(false); //make unresizable

    this.setLocationRelativeTo(null); //center it

    this.setTitle(title); //set title

    this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); //make it close when it's closed.

    this.setVisible(true); //make visible

    }

    ```
    The comments should explain this code pretty well. I would recommend experimenting with some of these, like setLocationRelativeTo or setResizable. What setFocusable does is make it so that you can click on the frame of the window and have it come to the front.

    If you were to compile and run this code now, nothing would happen. That's because the main method is empty. Let's remedy this. Open up your App class and add a static GUI variable at the top called "gui". Then call the gui Constructor in the Main method. Your app class should now look like this:

    ```

    public class App{

    static GUI gui;

    static Game game;

    public static void main(String[] args)

    {

    gui = new GUI();

    }

    }

    ```
    and your GUI class should look like this:

    ```

    import javax.swing.JFrame;

    public class GUI extends JFrame

    {

    //public members

    private static final long serialVersionUID = 1L;

    private static final String title = "TEST";

    //public members

    public final static int HEIGHT = 400;

    public final static int WIDTH = 600;

    public GUI()

    {

    this.setSize(WIDTH, HEIGHT); //set the size

    this.setResizable(false); //make unresizable

    this.setLocationRelativeTo(null); //center it

    this.setTitle(title); //set title

    this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); //make it close when it's closed.

    this.setVisible(true); //make visible

    Game game = new Game();

    add(game);

    game.start();

    }

    }

    ```

    I hope this post helps you understand a little bit of Java, as well as teaching you how to use JFrame to make a window. You can now compile and run it to see the fruits of your labor. I encourage you to experiment with this code, try things and get to understand it.

    More tutorials [here](http://forum.devoxstudios.net/index.php?board=11.0).

    EDIT–

    I can't use tab to make indents. Java coding convention says that everything inside brackets{} should be indented. If you use an IDE, it should indent at the right places for you. If your indents are wrong, it's no big deal, the code will run fine, but indenting code makes it easier to read and you should always do it.
  8. @Likestodraw:

    > Pony- It is. It really is. Wanna' know why? Because this is JC we're talking about.

    It's not really. JC has offered programming work in the past. Other head developers have offered programming work in the past(robin, rose).

    Now if Stephan was offering work, that would be straight up crazy.
  9. @McAdams:

    > How were they better? They lacked decent shading and looked more flat than actually pixel art.

    They were better because they were unique. Now they just look like any other new RPG trying to pass itself off as retro. The old graphics had character.
  10. @Aaaron:

    > http://www.reddit.com/r/truegaming/comments/x26jp/sandbox_vs_playground_games/
    >
    > Good article right there about Sandbox games, etc. Forgot where I got the link though?

    You might've gotten it from me… I think I posted it on devox.
  11. @daxterxx:

    > I fear I may have to re write some major aspects of the engine, wich im not going to do..

    All programmers realize it's time for a rewrite at some point or another. Right now I'm working on a game that I _know_ I'll have to completely rewrite, but it's my first time using Slick so I know I need to learn some stuff. If you refuse to rewrite your code, you're not going to get far on many projects.
×
×
  • Create New...