Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (121)
games submitted by our members
Games in WIP (577)
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 / Game Play & Game Design / Re: Proper way to implement vast amounts of character dialogue? on: 2013-03-04 22:13:57
Again I end up agreeing with 65k.

Games like TA:Kingdoms, if i recall correctly, used something like a custom INI file for scripted scenes and events. Xml is the rage now I suppose, but dude(?) is right. I would handle breaking up the elements and methods first, then worry about storage.

Please keep us posted as well, I am honestly a little curious myself, as I will eventually need to do something similar.
2  Game Development / Newbie & Debugging Questions / Re: Creating lots of different enemies (Inheritance, polymorphism, etc.) on: 2013-03-04 22:02:41
I am new to java , but in other languages I think the suggestion given by 65k would be most correct IMO.
If you pass an enemy type, and level to the constructor, you can set all of that stuff up pretty easily.

In fact, I did a similar thing in a c class some years back. The code to setup the monsters stats need not even be in the enemy super class, and in fact it may be better to remove it for sanity sake. Use whatever means you want to pass the monster type to the constructor. An enum works. Then inside of the constructor, you can have the values be something like

this.ac = rpgKit.getACstat(MonsterType, Level);
this.hp = rpgKit.getHPstat(MonsterType,Level);

then in the rpgKit, getACstat can use a straightforward case selection(switch) statement to determine which stat to return on that call.

switch MonsterType
{
case 0:
     //--rat AC--//
    ac = level \ 2;
    break;
case 1:
    //--dasterFunk Zombie--//
   ac =  (level/3) + 5;
}

boss switch can be done in couple ways
Boss type monster, then use the level to determien stuff, spawnCritter(Boss,1);//--rat boss--//
regular monster type, with a level of -1,-2 etc to represent the Boss level spawnCritter(RAT,-20); lvl 2 rat boss

or, use a subclass for the bosses, which makes it possible to determine other behaviors like healing and summons, without having those things isntantiated with enemies that never use them.
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.

theagentd (20 views)
2014-10-25 15:46:29

Longarmx (53 views)
2014-10-17 03:59:02

Norakomi (47 views)
2014-10-16 15:22:06

Norakomi (35 views)
2014-10-16 15:20:20

lcass (39 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (69 views)
2014-10-14 00:35:47

TehJavaDev (60 views)
2014-10-14 00:32:37

BurntPizza (74 views)
2014-10-11 23:24:42

BurntPizza (46 views)
2014-10-11 23:10:45
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!