Results 1 to 15 of 15

Thread: Ambitious App

  1. #1
    Bubba_OH's Avatar
    Bubba_OH is offline Member
    Join Date
    Oct 2008
    Location
    SW OH
    Posts
    12
    Rep Power
    0

    Default Ambitious App

    I want to create a GUI tool for a RPG to speed up the math involved in the combat (which was the downfall of the game). I have it roughly spec'ed out, but am not sure where to begin. This will require a database of some type (maybe not a real db), drag and drop (for gear) etc. Note that this tool is NOT a game, but rather a tool to HELP play the RPG.

    I am a seasoned old-style programmer, but am relatively new to Java and OOP.

    Anyone have any pointers as to where to start?
    Using Windows Vista, Eclipse, NetBeans, jdk1.6.0_07

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    maybe better would be to go through some lessons first, such as the Sun tutorials or a decent intro book, and then do the specific project. just a suggestion, take or leave. Good luck.

  3. #3
    Bubba_OH's Avatar
    Bubba_OH is offline Member
    Join Date
    Oct 2008
    Location
    SW OH
    Posts
    12
    Rep Power
    0

    Default

    I took a professional class (i.e. not a "school") about 2 years ago, and have been doing on-line stuff for a while. My problem is that every example I see is too simple, too hard, or not in any way related to what I am trying to accomplish. I have a specific goal, but am not sure about the path to get there.

    But I do hear what you're saying. :o
    Using Windows Vista, Eclipse, NetBeans, jdk1.6.0_07

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,397
    Rep Power
    25

    Default

    Break the design up into small bits that do simple tasks and write a program to solve them. When they are all working, merge them into a single program

  5. #5
    Bubba_OH's Avatar
    Bubba_OH is offline Member
    Join Date
    Oct 2008
    Location
    SW OH
    Posts
    12
    Rep Power
    0

    Default

    Normally, I would run something like this with a db of some kind. However, in this case, I want the app to be completely stand-alone. I could give a non-tech person the Java code, and it would build its own data (or at least the stuff unique for that person). This app will likely not have huge amounts of data (and machines are fast these days). I do not want people to need to install extra stuff.

    Any suggestions on how to structure a fake db? XML? Tab-delimited text files?
    Using Windows Vista, Eclipse, NetBeans, jdk1.6.0_07

  6. #6
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,397
    Rep Power
    25

    Default

    It depends on your access requirements. Bury it all in a set of methods and use the easiest way to store the data until you find you need a faster, larger more robust storage and then change it.

  7. #7
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    7

    Default

    Quote Originally Posted by Bubba_OH View Post
    Normally, I would run something like this with a db of some kind.
    I'm not sure what kind of math calculations that an RPG would use could be stored in a DB.

    I would argue that XML is not a DB, its a flat file that is self describing. While you can do some heirarchies with XML, only very limited ones work, and there can be a ton of duplicates.

    There are pure Java databases, I tend to just use MySql.

    If it was a dungeon walk, the dungeon geometry makes sense to be stored, but how you populate the dungeon with monsters and treasure is closer to runtime than DB. I guess you could populate the dungeon once for each time you, as King or DM, create one, which may need to stay in existance if the quest takes many days to play

  8. #8
    Bubba_OH's Avatar
    Bubba_OH is offline Member
    Join Date
    Oct 2008
    Location
    SW OH
    Posts
    12
    Rep Power
    0

    Default

    I am not looking to put maps or anything like that into this app. It is purely to track the character's stats, possessions (and the stats of these items), and to speed up combat. On a scale of 1 to 10, this game is a 10 for complexity. It goes very smoothly until you get to combat, then it drags to a crawl.

    I understand that XML is not a db (not even close). I am simply looking for a solution for the end user so that they do not need anything but this tool to run the app (i.e. they do not need to have MySQL or anything else to run this). If this thing ever gets off the ground, its intended audience may not be at all technical, so it needs to be as simple as possible from their perspective. I was suggesting that XML might be the solution for that.
    Using Windows Vista, Eclipse, NetBeans, jdk1.6.0_07

  9. #9
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,397
    Rep Power
    25

    Default

    to track the character's stats, possessions
    Can you describe what the I/O to this data is like? And what the data is like?
    Does it require a lot of I/O? What are the accesses to the data like? How much data? Type of data? Relationships between parts
    etc etc

  10. #10
    Bubba_OH's Avatar
    Bubba_OH is offline Member
    Join Date
    Oct 2008
    Location
    SW OH
    Posts
    12
    Rep Power
    0

    Default

    I will roughly describe the data as if they were tables in a DB, though as I said, it might be XML, tab-delimited txt, or something else.

    Each character has about 25 hard stats that never (rarely) change. These would be mostly integers and strings. Other stats are calculated.

    There are 10 general areas of skills (parent table), each of which has multiple skills (child table). Each skill has multiple sub-skills (grandchild table). Each character has their personal skill levels and sub skill levels, stored as a value between 1 and 100 (or more).

    Each piece of equipment has a name and weight. Equipment can be anything (a specific weapon, body armor, a corvette, a laptop, etc). Based on the type of equipment (in this case weapons), they also have about 10 stats, most of which are integers or string (the name, description).

    Each character has their personal equipment (link between the character and specific pieces/instance of equipment).

    (Man! This is hard to describe w/o images!)

    There would be a lot of initial data entry on my part. I accept this.

    Data entry would be a series of screens, each with whatever is specific to that type of equipment, the skill, or the character.

    Roughly speaking, the tables might be:
    Characters
    Skill Types
    Skill
    Sub-skill

    Character_Skill_Type
    Character_Skill
    Character_Sub_Skill

    Equiment
    Firearms
    Melee
    Body Armor
    Vehicles
    Misc
    Ammo

    Character_Equipment

    Once all this stuff is entered into the db, there would be a master combat screen where you would choose a shooter and target from the list of characters. Most of the time is spent here once the data has been entered. You would then choose the shooter's weapon from the list of things he possesses. Then the target is chosen. Use check boxes to assign any fixed penalties (dark, moving, etc), then try to hit. Determine where the target is hit (might not hit where you want if at all). If the body location has armor, that is taken into effect before determining damage.

    There is a lot more, but I don't want to go too far in this post.

    I hope this makes some sense. I could diagram this out and E-mail it to whoever is interested.
    Using Windows Vista, Eclipse, NetBeans, jdk1.6.0_07

  11. #11
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,397
    Rep Power
    25

    Default

    I take it there would be a lot of I/O and that bits of data/records are related to other bits/records and would need links to keep track of them. The relationships and sizes of the llsts and records would be constantly changing. You'd need a fairly dynamic file organization to handle this.

    I've never coded DB. Most of my coding has been utilities, OS and compiler stuff.

  12. #12
    Bubba_OH's Avatar
    Bubba_OH is offline Member
    Join Date
    Oct 2008
    Location
    SW OH
    Posts
    12
    Rep Power
    0

    Default

    The more I look at this, the more I think I need a db (either Access or MySQL). I had a bunch of this done with a WAMP setup, but somewhere along the line, I upgraded my PC and the stuff "walked away". Even so, it was not what I really wanted.
    I work with DBs for a living (PICK/UniData), so that does not scare me at all. It's the Java interface I need help with.
    I have just built my first applet based on some very simple fractal stuff I saw on TV about 20 years ago.
    Using Windows Vista, Eclipse, NetBeans, jdk1.6.0_07

  13. #13
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    7

    Default

    I think you will find MySql easy to work with. Its free. Has a complete JDBC interface, so any book that talks about Java and relational databases will be fine.

    One consideration. You talk about applets. Applets run on the client machine, typically inside a browser. They were very cool in 1996. They are no longer cool at all. Browser support for them is flakey. And they live in a sandbox that prevents you from doing what you want.

    The modern approach is to write servlets and JSP pages that run on a server, with a lightweight connection to the server from the client. Most folks use AJAX or similar stuff, but you could write the client code in any language and just use HTTP.

    The world uses HTTP not because its idea, but rather because you can get through firewalls in homes and offices.

    So the typical application architecture has something running on the client's machine, talking to a server. The server has a container such as Tomcat that dispatches the servlets. The servlets use Beans (which are nothing special) and they can call Java objects. These Java objects can then use JDBC to talk to the database and you are done.

    So far, I've used zillions of "object to relational mapping" tools, and hated all of them. I write my own. Its eazy to do.

  14. #14
    Bubba_OH's Avatar
    Bubba_OH is offline Member
    Join Date
    Oct 2008
    Location
    SW OH
    Posts
    12
    Rep Power
    0

    Default

    The applet was just something to do to get my feet wet.

    I would LOVE to do something like you describe, but am not sure that is the right approach for this app since either 1) I would have to somehow host everyone's stuff off my web site or 2) each user (who are likely not technical) would need to set up their own Tomcat server.

    That being said, I would still LOVE to learn about Tomcat, Glassfish, JSPs, and all that other stuff.
    Using Windows Vista, Eclipse, NetBeans, jdk1.6.0_07

  15. #15
    Bubba_OH's Avatar
    Bubba_OH is offline Member
    Join Date
    Oct 2008
    Location
    SW OH
    Posts
    12
    Rep Power
    0

    Default

    Norm,

    The interface would clearly need to be GUI. I have been playing with NetBeans and its tools. I easily followed their tutorial, but after making a fairly cool form to enter info, it ended at that point (i.e. nice window dressing with no substance). I guess the lesson was in how to add buttons, labels and input fields, but not to actually make it work. :(
    Last edited by Bubba_OH; 10-14-2008 at 05:40 PM.
    Using Windows Vista, Eclipse, NetBeans, jdk1.6.0_07

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •