Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (788)
Games in Android Showcase (234)
games submitted by our members
Games in WIP (862)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  My First Java Game.  (Read 4098 times)
0 Members and 1 Guest are viewing this topic.
Offline ISeeTheTruth

Senior Newbie

« Posted 2013-07-05 05:36:19 »

I have a grasp on basic knowledge of Java and wish to learn more. Alot more. Can anyone point me in a direction? Or like where should I start? I sit here and think "where do I start..." like I don't know weither or not to code the player and stuff first or what. Can someone point me to a guide or something? Atleast for me to learn more? Thanks.Smiley
Offline heisenbergman

JGO Coder

Medals: 14

L___ o_ G___ a__ P___

« Reply #1 - Posted 2013-07-05 05:48:12 »

Do you already know what type of game you plan on making? I think before you start just jumping in a coding, you should have an idea of what kind of game you want to try creating.

Offline _Scyth_

Junior Devvie

« Reply #2 - Posted 2013-07-05 21:21:08 »

One simple question that could mean a lot in where you want to go with programming games with Java.

Do you understand OOP?(Object Oriented Programming)

If you can then it'll make it a lot easier.

Get a game idea. That's how to start. Nothing too complex. Something simple.

Now about actually starting somewhere. You're going to need some additional hardware. A Pen and Paper. Expensive right?

Now you'll want to plan absolutely everything.
  • Player
  • Enemy

Each one of these will be a class. If they share common variables such as:
  • hp
  • strength
  • agility
So on.

Then go on and plan out and create an idea of how you'll do everything.

You'll need to know:
How the game is won?
How will the player interact with the game?
What feedback will the game give to the user? (Sound, new images, etc)

How will the player know what they have to do?

There's a hell of a lot of planning. Then you can begin programming.

Its always nice and helpful for when you come back to solve all the problems that will arise when you go through making the game.

So you might want to set up a couple of packages within your project in eclipse. These can store different types of classes.
For example:
A package for the screens
A package for the entities

There's a lot of work involved. But when your ready to start programming, you'll want to start from the base up. Not somewhere in the middle.

Set up your screens, drawing surface and game loop. Then work on say a superclass called Entity.
Might look something similar to:

public class Entity
   int hp, maxhp;
   int str, agi;
   int level;

   double x, y;

   boolean active = true;

   public void destroy()
      active = false;

Hope this helps you in some way or another.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline TrinityGamer

Senior Newbie

Medals: 2

« Reply #3 - Posted 2013-07-08 07:58:55 »

I agree with _Scyth_ for the most part, with 1 small difference.

Before you actually get to making your game, the best thing to do is to do a 'how to make a game' tutorial so you know the basics. the first chunk of pretty much every game (2d graphic based games, i mean) are pretty much the same for the most part. So watching/reading tutorials will help you learn how to set everything up before you actually get programming the stuff you want for your game.

While learning these basic things, and doing the tutorials, you should write down a basic outline of what you want in your game, then fill it out in as much detail as possible. Doing this WHILE learning the basics makes it much easier to learn to think like a game programer, without turning it into a really daunting task. (seriously, just sitting down and saying 'how do i want to have the save system set up, what about the maps and mobs?' seems REALLY scary if you're doing it all in 1 go) Their explanations on things in game programing can also help you come up with with some good ideas on how you want to do things:

For instance, while i was watching TheChernoProject's and coding along (he has the BEST explanations for just about everything, with the exception of saving, even if he does use Notch's codes for the starter) when he explained how his mapping code worked, i actually thought up a really good way of doing something that i hadn't been able to figure out until then:

The idea i got? Well, that was how to do chunk-loading, of course (which he doesn't actually cover, but that's kind of what i mean by getting inspired by their explanations:
Chunk loading ideas:
(Idea 1)
- As terrain is basically read from a text file, then placed on the screen, then having each world made
   out of multiple text files, with each text file holding 4 16x16 (or 32x32) grids of blocks
   (background, wall art, front, extra art), and have the game load each one when the camera
   screen is within 4 blocks of that chunk. (base which map should be loaded by the ID)
- The chunk loading guide file should be handled like this:
- Map Ids are composed of 4 numbers, with each number having 4 sets of letters:
   If(PlayerWalkingLeft==true & x == 0)xn++;
   If(PlayerWalkingRight==true & xn == 0)n++;
   If(PlayerWalkingLeft==true  & x > 0)x--;
   If(PlayerWalkingRight==true & xn > 0)xn--;

   If(PlayerWalkingDown==true & y == 0)yn++;
   If(PlayerWalkingUp==true & yn == 0)y++;
   If(PlayerWalkingDown==true & y > 0)y--;
   If(PlayerWalkingUp==true & yn > 0)yn--;

   LoadMap('x' + x.toString() + 'y' y.toString() + 'xn'+ xn.toString() + 'yn' +yn.toString());

- xn and yn stand for 'x-negative' and 'y-negative'. this should allow for sudo negative numbers (since java doesn't allow for negitives T_T).
have the game use Xn for negative x, and Yn for negative y.

As for the actual game itself, i started writing the basics of what i wanted, which started off like this (yes, this is actually the original file, with the exceptions of the edit notes, lol):

Name: Huh (Name ideas so far: Lemuria, expanse, blank world, or just call it chicken and let people wander why)
Game type 1: Rpg (quest, mobs, exploration)
Game type 2: Adventure (LOTS of exploration)

Character custamization: find out how hard this is. i think it would be a int[] based thing, with each slot corresponding to a
                                   specific body part or something, and each number representing which image to use. (note: it is)
Species: have the player be able to choose their species, have many different speces (maybe make them randomize, with
                                   their body parts be picked out of a random 'body parts:
                                                      -Head extras
                                                      -Torso extra

Special things: Farming, crafting, mining, fishing (erm... harvesting maybe...)
Combat system: Anything but overworld fighting. i HATE ZELDA STYLED FIGHTING SYSTEMS
                       (note: was i on something when i wrote that? lol, this is actually what i went with)

Art type: 2d tile style (old school rpg, like star ocean 2, golden sun, final fantasy 1-6), not iso, side scrolling platform, or 3d
                       (dear god, find out if 3d is really as hard as it looks) (Note: it is)

Pet system: player should be able to either capture or by pets, or maybe recruit people instead (or both)
crafting system: DON'T DO THE REDICULOUS 'by the recipe' crafting system! I HATE THIS SYSTEM. Maybe make it modular instead?
Ship system: Make modular ships.
Weapon system: MODULAR WEAPONS! i hate it when games have only a hand full of weapons. (also make explody things)

housing system: Player can by land or build anywhere (decide later), houses should be modular inside, but house graphic should be
                       based on basic 'build' or 'basic house design'. or something.
storage system?: no idea how to do this.
Inventory system: Make the inventory size based on a changeable int, so that the size can be 'upgraded'.
                       (base size 10-20, somewhere in there)

Exta notes: make as much of it as possible be randomly generated.
Masic: Basic spells, healing, fire, water, lightning

Modding: Make it possible for players to mod it.
Multiplayer: figure out how to do this, and if it's worth going into)
BIG NOTE: MAKE ENDLESS. spores' supposed 'endlessness' sucked, make an actual endless game, or a game that is as good as endless.

Then i went in depth about everything that i wanted. i detailed the mobs i wanted (even went into how many different slimes i want, every rpg needs it's obligatory slimes) the weapon 'parts', the 'ores' and 'mine-able things'. and all of that, and then i thought about how i would do them. (chunk-loading came up during this, which is when i started having problems)

Anyway, the first 2 things you need to do, is think about what you want, and learn the basics. here are 2 tutorial series that you should watch (both are on going, but they already have everything you need): - I learned MOST of what i needed from watching TheChernoProject's first 20-30 videos on his 'java game programming tutorials' (NOT THE 3D ONES! just the regular) - MrDeathJockey's videos taught me what Thechernoproject didn't. (I only watched MrDeathJockey 'java intermediate tutorials')
Pages: [1]
  ignore  |  Print  

hadezbladez (2129 views)
2018-11-16 13:46:03

hadezbladez (809 views)
2018-11-16 13:41:33

hadezbladez (2102 views)
2018-11-16 13:35:35

hadezbladez (419 views)
2018-11-16 13:32:03

EgonOlsen (3453 views)
2018-06-10 19:43:48

EgonOlsen (3680 views)
2018-06-10 19:43:44

EgonOlsen (2275 views)
2018-06-10 19:43:20

DesertCoockie (3004 views)
2018-05-13 18:23:11

nelsongames (3084 views)
2018-04-24 18:15:36

nelsongames (3853 views)
2018-04-24 18:14:32
Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!