Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 13 Dec 2012
Offline Last Active Feb 03 2013 03:26 PM

Posts I've Made

In Topic: mysql database

27 December 2012 - 06:23 PM

I'm not quite sure, it just feels more efficient if u could virtually link a user with his own item table, instead of checking one by one every item the user has gotten on a database lots of users are going to use, lets say i have 1000 users and 1000 items, whenever i wanna see items for user 123, i would have to loop through the entire character_item table, to check for his CID, i am fairly new to the database subject but that just feels unefficient, i guess i'm just thinking like object oriented.


That's why you use a MySQL database. I'm not sure why you're looping through the entire characther_item database anyway?


Joining tables are actually the how relational databases are implemented. Again I recommend reading up on the subject. They are the efficient method of associating tables together when using a database.


Example Scenario


  1. We have a Character.
  2. We know his unique ID.
  3. We perform a SELECT query.

At no point do you have to iterate through the character_item table?

In Topic: mysql database

27 December 2012 - 10:38 AM

You can easily have multiple amounts of the same item.



Then you merely modify the Amount value to increase or decrease the number of items a character has.


The alternative is you store the list of items as comma separated values in the Character Table. However this is highly inefficient and will cause repetition of data, which is what relational databases are designed to eliminate.


I don't really see why you're against using a joining table, could you explain your reasons?

In Topic: mysql database

27 December 2012 - 02:29 AM

I think you're looking for something along the lines of:


Character <- Character-Item -> Item


Each character has a unique ID.

Each Item has a unique ID.


Each time a character "obtains" an item you add a record to the Character-Item table which contains both the unique ID of the character that "obtained" the item and the unique ID of the item that was "obtained".


Assuming you used the design that Sollum suggested (which is a very effective one) such that your tables are defined as:







Table CHARACTER_ITEMS { ID, CID, IID, RANDOM_FIELD_A, ..., RANDOM_FIELD_N } (where CID and IID are foreing keys from CHARACTER and ITEM)




That way if you wanted to get what items the character has you would perform a SELECT query such as:




Which will give you a list of unique IDs for items that a character with the unique ID of 0.


I recommend reading up on RDBM as Sollum suggested if this isn't clear to you:

  • Fairly decent article explaining database relationships on TechRepublic: Relational Databases
  • A good article from nettuts+ explaining database relationships (slightly more beginner friendly): Database Relationships


If you still need help I wouldn't mind lending a hand if I have some free time so feel free to pop a PM my way.

In Topic: I have a few easy questions about game development. (noob)

21 December 2012 - 09:33 PM

Willingness to learn is one of the best skills you can have in any subject matter in my opinion.

How much of Java have you learnt?

If you have just started programming then I highly recommend using an Integrated Development Environment rather than attempt to use command line compilers. I personally speaking from experience recommend Eclipse for Java Developers. Alternatively you can also consider Netbeans.

If you choose Eclipse here is a tutorial to get you started. If you really want to know how to compile java code manually through command line then look here.

Khatharr pretty much hit the nail with graphics/model/audio resources and at your stage you don't really have to worry about it farther from being able to make/find placeholder graphics.


There is no easy way to learn C++

So very true. Although funnily enough that is the first language I learnt. From personal experience I highly recommend you stick with Java first until you are competent at it before thinking about switching. (Get to the point where you know about object oriented concepts such as inheritance, polymorphism, etc.)

If you are crazy (like I was) and for some reason want to start with C++ then I recommend the following sites.

In terms of software there is a plugin for Eclipse which allows you to use it for C++ as well (A quick google search should give you a tutorial on how to setup eclipse for C++) or you can use Visual C++ Express.

Hope that information helps and good luck.

In Topic: Getting started but how to make a prototype of my game

19 December 2012 - 01:51 PM

I used to have the same problem of not knowing where to start after laying down the fundamental concepts of a game.

The best way to prototype a game is to take an existing game engine and build your prototype from there. This minimizes the amount of boiler plate code you have to write and allows you to focus on creating the game mechanics. They also often contain sample games and models which you can utilize in the prototype of your game. From the description of your game idea I would personally recommend using the Unity game engine.

Other engines you could look at:You can find a fairly comprehensive list on Wikipedia here.

You haven't stated your programming experience so I assumed you are proficient in that area. If you're just getting started at that then I would either recommend learning one first or using a high-level scripted game engine such as GameMaker (2D game engine) and create a 2D prototype whilst learning to program.

I only have a little experience with 3D model animation (Hopefully someone with more experience can help you in a reply) but if I am not wrong once you rig an animation using skeletal animation you can apply it to models that have similar skeletons (such as humanoids) with a bit of modification.

Hope that helps and good luck with your project.