What is the most effective model to use in terms of representing game characters and/or sprites?
I am in the process of designing an RPG style game however in terms of storing data wanted to use a database modeling/system that would make the most sense.
Some of the choices I have 开发者_如何学JAVAour:
- Class relational database (Old school queries)
- Classic relational using ORM (doctrine 2?)
- NoSQL/schema less database(No Joins)
In my mind I was thinking that ORM would make the most sense since you can deal with game objects and they can be mapped by database objects. However I am open to opinions and practices that existing game developers have used.
I would appreciate feedback in this matter.
For the best performance I would go with DAO classes, plain old queries and specialized data objects that suit the best what you need. Could become very complex to handle, but you have the control over everything. You can map game objects to database objects and vice-versa by using Mapper classes.
An ORM is much easier to use but it loses when it comes to performance and flexibility to do special things (targeted queries with joins and other things like this). I'd also choose them if your team is not very experienced developing database driven applications without ORM.
NoSQL might be a good option too, but you details are not enough to further comment on it especially since it has quite some advantages/disadvantages when compared to relational databases. It's a matter of do the advantages outweigh the disadvantages in you specific case.
精彩评论