5 Replies - 981 Views - Last Post: 09 September 2011 - 12:26 PM Rate Topic: -----

#1 hateborne  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 35
  • Joined: 22-September 10

Database/Programming Language Suggestions Needed

Posted 06 September 2011 - 04:50 PM

Evening ladies and gents!

I am interested in building a small, but obscenely complex database application. The application is to act as an overcomplicated calculator for the tabletop game Warhammer 40,000. I am curious on language/database suggestions. There is a program like this in existence for purchase at $40 a year. I would like to build a similar program for personal use (for both cheapness' sake and coding experience).

I am considering Java but I do not know how or which Database (type/system/etc) would go well with it.

The application itself isn't really that complex, but the amount of options is staggering.

In example, a Space Marine Commander may be added for 100pts. The standard bolt-pistol/chainsword combo may be replaced for a boltgun for free, a storm bolter for +3 pts, or a combi-weapon for +10pts (only 3 of 7 options). The armor may be upgraded, grenades (3 types) may be taken, or even replace the classification of the unit from normal to terminator armor (which unlocks a different array of weapon updates [3 sets of 3 weapon options]). On top of all of this, this is only for this specific unit. A game may include 2-3 of this unit, each of which may have unique equipment. As if that isn't exciting enough, he shares some of these upgrades with other units but not all (another HQ type of unit may carry similar weapon upgrades, but the standard foot soldier may take similar upgrades as well).

Started this in Visual Basic but due to poor grouping issues and database problems, I had to abandon it. It only handled 1/10th of what I needed it to do and was well over 2000 lines. The database setup was sloppy and I assembled the code poorly from start (as I was kind of using the piecemeal "code-as-you-go" approach).

Any suggestions would be GREATLY appreciated!

Overcomplicated? Of course.
Is $40 worth the 100+ hours to learn and code this? Probably.
Is either of those going to stop me? Nope.


-Hate



P.S - Included picture!
Posted Image

Is This A Good Question/Topic? 0
  • +

Replies To: Database/Programming Language Suggestions Needed

#2 andy_pleasants  Icon User is offline

  • D.I.C Head

Reputation: 41
  • View blog
  • Posts: 122
  • Joined: 08-July 10

Re: Database/Programming Language Suggestions Needed

Posted 07 September 2011 - 03:43 AM

Well if you're just looking for a database choice, I'd suggest either SQL Server. The reason for this is because it's a pretty complete RDBMS, with both free versions that can be installed on client machines (so the system can be used on other computers), developer editions (which is what you would probably use) and then complex server/data centre editions for data mining etc. It is also usually installed on peoples machines by other applications that require a client side DB.

Oracle Express Edition might also be a good choice, same benefits as the above, but isn't likely to already be installed.

So as a result of this, I'd say that a .NET language would be best, tools like LInQ to SQL and data entities are pretty invaluable if you're dealing with a complex database, and save you a lot of time writing boiler plate code.
Was This Post Helpful? 0
  • +
  • -

#3 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5643
  • View blog
  • Posts: 12,359
  • Joined: 16-October 07

Re: Database/Programming Language Suggestions Needed

Posted 07 September 2011 - 05:04 AM

Database doesn't really come into play here. Neither does language, really. First, you need your logic.

You have base options. These options can be replaced by other options. Options can be mutually exculisive. So, basic format could be something like:
Option Id
Option Name
Option Cost
Option Requires ( List of options )
Option Excludes ( List of options )



You could make the required and excluded list it's own list, depending on how things are organized. The and/or stuff will kill you. Presumably options can have impact on other elements of the character, like damage, etc.

Until you can model it in a programming language, there's no point in worrying about a database. You might not really need a database; just a well thought out config file. You're not doing tons of transactions and writes, you're just reading options.
Was This Post Helpful? 0
  • +
  • -

#4 metacatdud  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 07-September 11

Re: Database/Programming Language Suggestions Needed

Posted 07 September 2011 - 06:37 AM

Well!! Let go one step at the time. As @baavgai sad you need to draw on the paper the game/implementation logic. If you get this right then you can build it on any platform you want.
Get all the units, see what they have in common, build a general class, standardize your syntax.
i.e You have a soldier,medic
Both have:

Ranks
Options
Wargear
Special Skills

Build a class that handles this and then get the values only bay unit id or something.
i.e - Non-Working example

$unit = new UnitData($unitId);
outputs echo $unit->rank >> 10;

class Unit
{
  var $rank = 0;

  function __construct($unitId)
  {
     $this->Rank($unitId);
  }
  function Rank()
  {
    $this->rank = 10;
  }

}



Was This Post Helpful? 0
  • +
  • -

#5 metacatdud  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 07-September 11

Re: Database/Programming Language Suggestions Needed

Posted 07 September 2011 - 07:07 AM

Oops.There is an error there
$unit = new UnitData($unitId);
outputs echo $unit->rank >> 10;

class Unit
{
  var $rank = 0;

  function __construct($unitId)
  {
     $this->Rank($unitId);
  }
  function Rank($unitId)
  {
    $unitRank = get_rank_for_unit($unitId). //This will return 10 for example
    $this->rank = $unitRank;
  }

}



Either way if you ask me i think the data input will be a killer because i suppose you only have it on paper support :)
Was This Post Helpful? 0
  • +
  • -

#6 hateborne  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 35
  • Joined: 22-September 10

Re: Database/Programming Language Suggestions Needed

Posted 09 September 2011 - 12:26 PM

Thank you for all the input.

I do have another random question! For multiple values in one field, what data-type is recommended or "best-practice"? I was considering "BLOB" but having never attempted multiple values in a single field...I have no idea.

(This would be for adding many option codes into one field, drastically simplifying my later shenanigans.)

-Hate
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1