Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Wondering if this will work... Please give me a heads up on: 2009-01-02 00:15:19
Okay so I'm pretty good at Java but I've never really made a game before using it. So my friends and I are making a game (do not go on a rant and tell me how thats a bad idea and stuff) and so the game is going to be an MMORPG game (3D) and so I wanted someone to check this out and see if this will work for what I'm doing...

So I have a class called Items.java, and it handles all of the ingame items, I also have separate classes for each type of item. I have the class Armor.class, Weapons.class, and Misc.class (that handles money, tickets, counters etc.). So I have my Armor class here...
1  
2  
3  
4  
5  
6  
7  
8  
class Armor {

   public Armor(String aTitle, int itemID, int defBonus, String itemDescription, int itemPrice, int defItemLevel) {
   
      itemID = 0;
      defBonus = 0;
     
   }


I then have my ItemHandler.java which handles ALL of the items in the game and gives the name, item id, bonuses etc. so that I can control each item by a whole bunch of different variables that suite the situation...
Here is a chunck of my ItemHandler.java (ps. I compiled it already and it runs just fine)...
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
   //***ARMOR***\\
// Armor ARMORNAME = new Armor("ARMOR NAME", ID, DBONUS, "ITEM DESCRIPTION", PRICE, LEVEL);

   Armor clayChainbody = new Armor("Clay Chainbody", 2, 1, "A chainbody made from clay", 15, 1);
   Armor clayPlatebody = new Armor("Clay Platebody", 3, 2, "A platebody made from clay", 20, 1);
   Armor clayPlatelegs = new Armor("Clay Platelegs", 4, 1, "Some platelegs made from clay", 10, 1);
   Armor clayHelmet = new Armor("Clay Helmet", 5, 1, "A helmet made from clay", 5, 1);
   Armor clayFullhelmet = new Armor("Clay Full helmet", 6, 1, "A full helmet made from clay", 7, 1);
   Armor clayPlateshoes = new Armor("Clay Plateshoes", 7, 0, "Some plateshoes made from clay", 3, 1);
   Armor clayBuckler = new Armor("Clay Buckler", 8, 1, "A buckler made from clay", 10, 1);
   Armor clayKitesheild = new Armor("Clay Kitesheild", 9, 2, "A kitesheild made from clay", 15, 1);


The reason I chose that section is because it is related to the first part in Item.java...
So this allows me to have a simplified version of creating new types of armor and controlling the price, name, level required, bonuses and item id.

The points that I'm curious about are

- The itemID int. I created that so that I could have this for when I click on an item (this isn't in the game yet and I know it's wrong)
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
 switch(itemID) {

  case 2:                                            // clay chainbody
     
     if(defLevel >= defItemLevel) {
           
          // equip item
             ...
      }
      else {
                 
           // don't equip item and say
              p.setString(.. "You need a higher defence level to equip that item");
      }

     break;

 default:
        ...
  break;

I want to know if itemID will work for that situation (and what it does is it creates a case for the ItemID and if the defence level of the player is greater than or equal to the defence item level then the person can wear that item, but if it isn't (thats the else statement) then it doesn't allow the person to weild the item...

- My second perdicament is "How will I get it to use the right model and icon?" So I want to ask you if this would work...
I change the public Armor class and make it this

public Armor(String aTitle, int itemID, int defBonus, String itemDescription, int itemPrice, int defItemLevel, Image itemIcon, ?? itemModel)

The ?? are there because I don't know what I would make the itemModel be...


So if you would answer these question I would greatly appreciate it...
Thanks,

- Mimz




2  Java Game APIs & Engines / Java 3D / Re: New to Java 3D Game Development and need help on: 2008-12-19 18:28:01
Thank you very much for your help, usually when I get on forums such as these and ask a question thats like this people will say things that only they understand or they will cut me down and tell me that Java game programming is not for me and that I need to learn more. But you actually helped me  Cheesy

Thanks and I've seen JME before but whenever I download it, it never works, but I'll try it again and see if it will help me
3  Game Development / Newbie & Debugging Questions / Re: Getting started on: 2008-12-19 00:52:32
Wow you've taken a semester final and you havent gone over arrays? I mean I can see a few reasons why but what do you do in your AP Comp. Class?
4  Game Development / Newbie & Debugging Questions / Re: Getting started on: 2008-12-19 00:24:02
Your in an AP Computer Science class and you don't know basic Java programing? (Also by any chance are you from Darlington?)
How I learned to make simple image (Gameboy Advance style) games is from a site called JavaCooperation. Look up "Java game development tutorials" on Google and you'll find it, and also other tutorials like it (and some better than it) but that got me started... Also look up Killer Game Programing which is all about Java games
5  Java Game APIs & Engines / Java 3D / New to Java 3D Game Development and need help on: 2008-12-19 00:19:07
     Okay so I'm looking to make a Java game in 3D but (as I'm sure you've heard many times) I don't know where to start. I've been reading up Java 3D programing but I thought I would go ahead and ask a human rather than a search engine. I want to make a tile based 3D game that I can easily just add objects and walls and stuff by typing in X coords, Y coords and Z coords. So I want to make it "easy" for me to edit my game when I get far enough to make the maps and objects and animations.
     First off, I just want you to answer these questions because it might help me out with what I'm doing...

- Where is a good tutorial?
- What is a good (free) 3D modeling system? (I'm using a program called "Art of Illusion" made from Java so that might work for me")
- Once I figure out how to import models, make maps, and do the basic 3D stuff, where should I start? (I.E. Controls, Player etc.)

So those are some questions that I have (other than my main question) that I would really like if people answered them for me. And also don't spam me or flame me without asking a question first...

Thanks for any help,

Mimz
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (37 views)
2014-12-15 09:26:44

Mr.CodeIt (30 views)
2014-12-14 19:50:38

BurntPizza (62 views)
2014-12-09 22:41:13

BurntPizza (99 views)
2014-12-08 04:46:31

JscottyBieshaar (59 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (77 views)
2014-11-29 21:32:03

toopeicgaming1999 (138 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36

toopeicgaming1999 (38 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org 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‑gaming.org
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!