Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
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 392 times)
0 Members and 1 Guest are viewing this topic.
Offline _Scyth_

Junior Member





« Posted 2013-08-30 14: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?
Offline jonjava
« Reply #1 - Posted 2013-08-30 14:29:04 »

First question: Sure.

http://www.youtube.com/watch?v=EmfIT4BALK8
http://www.youtube.com/watch?v=izKAvSV3qk0

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 Member





« Reply #2 - Posted 2013-08-30 14: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 14: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 Member





« Reply #4 - Posted 2013-08-30 14: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 16: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 Member





« Reply #6 - Posted 2013-08-31 16: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.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (24 views)
2014-07-24 01:59:36

Riven (23 views)
2014-07-23 21:16:32

Riven (18 views)
2014-07-23 21:07:15

Riven (21 views)
2014-07-23 20:56:16

ctomni231 (50 views)
2014-07-18 06:55:21

Zero Volt (45 views)
2014-07-17 23:47:54

danieldean (36 views)
2014-07-17 23:41:23

MustardPeter (39 views)
2014-07-16 23:30:00

Cero (54 views)
2014-07-16 00:42:17

Riven (54 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org 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‑gaming.org
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!