Results 1 to 15 of 15
Thread: Ambitious App
- 10-10-2008, 01:49 AM #1
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
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.
- 10-10-2008, 04:37 AM #3
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. :oUsing Windows Vista, Eclipse, NetBeans, jdk1.6.0_07
- 10-10-2008, 02:34 PM #4
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
- 10-12-2008, 04:18 PM #5
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
- 10-12-2008, 04:47 PM #6
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.
- 10-13-2008, 06:09 AM #7
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
- 10-13-2008, 01:05 PM #8
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
- 10-13-2008, 04:28 PM #9to track the character's stats, possessions
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
- 10-14-2008, 02:07 AM #10
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:
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
- 10-14-2008, 03:03 AM #11
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.
- 10-14-2008, 04:47 AM #12
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
- 10-14-2008, 07:10 AM #13
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.
- 10-14-2008, 01:06 PM #14
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
- 10-14-2008, 01:12 PM #15
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