Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (710)
Games in Android Showcase (212)
games submitted by our members
Games in WIP (784)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Java and 3D Meshes. And Database advice  (Read 929 times)
0 Members and 1 Guest are viewing this topic.
Offline _Scyth_

Junior Devvie

« Posted 2013-08-30 12:12:35 »

Ok, so I have two questions, one about 3D meshes and java, and the other is about using databases for games.

Right so, first one. If i was to create an object/mesh in Blender3D, is there a java library, or a way for me to use this mesh with my java code. Like, how could i create a 3D world using 3D objects and java code, or would be better to stick to a game engine like Unity and learn C#?

Next question, if i was to have an RPG would it be better for me to create a database which stores weapon stats, shop locations, building locations, user details and stats, and can then be updated when anything changes, or is it better for me to save them to a txt file and read it everytime I try to get user data?

Also, would using a database, not set it up, so that i could turn the RPG into an online one?
Online jonjava
« Reply #1 - Posted 2013-08-30 12:29:04 »

First question: Sure.

Second question:

What's the difference between saving to a "txt" file and using a database?

Nothing, essentially - well, that's not entirely accurate - but they fulfill a similar basic purpose. Storing data for loading later and storing data for later that we don't need right now so as to save RAM.

Databases come with a lot of useful stuff, however. You can deny or grant access to specific data. You can quickly search and or modify specific data. You can make the database available remotely etc etc.

There is no right or wrong answer - what do you think?

Offline _Scyth_

Junior Devvie

« Reply #2 - Posted 2013-08-30 12:38:23 »

Well for the database, the remote database, and the quick searching might come in handy with a rpg, because as the game gets updated, all i have to do is insert new fields into the database, and therefore, means less time for users to download the client files, however it also means they need to connect to the internet to play a singleplayer game, which some may not like, unless i was to give them an option of online/offline play with online granting them some other benefits.

Thank you for the answer Smiley
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline StrideColossus
« Reply #3 - Posted 2013-08-30 12:45:12 »

For the database bit, it sounds to me that there are actually two parts to that question:

1. how to implement 'static' configuration data, i.e. your weapon stats, shop locations, etc.

2. how to implement 'dynamic' data, i.e. user location and data.

For the static stuff you could use a simple text or properties file.  You might also want to consider using XML which is nicely structured and there are any number of supporting libraries to parse it.  Although this is 'data' it doesn't change (for the duration of the game) so there doesn't seem much point in storing this stuff in a database.

For dynamic data then you would definitely want to persist this to some sort of database: you could use a standard SQL database such as MySQL, or use an object-based persistence store such as Mongo.  The latter is probably a better approach for an online RPG style game.

Depending on the load (number of players, volume of network messages, etc) you would probably want to periodically update the database with changes to relatively transient information such as the players stats, location, etc. whereas 'important' changes (kills, inventory changes, money, etc) should be persisted immediately.  This is how many MMOs are implemented.
Offline _Scyth_

Junior Devvie

« Reply #4 - Posted 2013-08-30 12:53:49 »

So what your saying for player position etc, they can be sent every second or slower perhaps, but kills etc, should be instantly updated?
Offline StrideColossus
« Reply #5 - Posted 2013-08-30 14:14:41 »

So what your saying for player position etc, they can be sent every second or slower perhaps, but kills etc, should be instantly updated?

Absolutely.  As a player (and especially if you're a paying customer) you're going to be REALLY mad if you lose an inventory item for example because the server crashed, whereas you're not going to be too concerned if you're a few yards away from where you were meant to be.
Offline _Scyth_

Junior Devvie

« Reply #6 - Posted 2013-08-31 14:19:57 »

Understood, thanks for all the help guys, gives me a lot to think about and look into, and learn.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

theagentd (65 views)
2017-02-18 13:42:33

theagentd (70 views)
2017-02-18 13:35:16

h.pernpeintner (1234 views)
2017-01-24 22:39:11

h.pernpeintner (1222 views)
2017-01-24 22:38:32

Galdo (1774 views)
2017-01-12 13:44:09

Archive (1890 views)
2017-01-02 05:31:41

0AndrewShepherd0 (2426 views)
2016-12-16 03:58:39

0AndrewShepherd0 (2277 views)
2016-12-15 21:50:57

Lunch (2358 views)
2016-12-06 16:01:40

ral0r2 (2151 views)
2016-11-23 16:08:26
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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‑
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!