Tag Info

New answers tagged

0

Another option may be using a quadtree structure or if you have many moving objects a spatial hashing aproach.


0

It looks like you can use the MarshalAs attribute like so [StructLayout(LayoutKind.Sequential, Pack = 16)] public struct cb0_t { public Matrix mWorld; public Matrix mView; public Matrix mProj; [MarshalAs(UnmanagedType.ByValArray, SizeConst=2)] public Vector4[] vLightDir; [MarshalAs(UnmanagedType.ByValArray, SizeConst=2)] public ...


1

"Success list" is a term you made up, don't use it. What you want to compute is some kind of score or rating of each player as an estimate of "player power". The difference between a score and a rating is that a score is typically expected to increase with more games played (e.g. the number of knockouts in a boxer's career), while a rating is expected to ...


2

Other responses have done a good job of pointing out how to use a database, and not to use a database for communication. One other aspect that you might look into is to categorize your updates based on how the information needs to be communicated to other entities. Rather than scope communication to servers, you could distribute your messaging and use ...


3

It's a quad tree so when you split it into 4 parts any entities belonging to the parent get divided between the children based on position.


2

Since javascript is a scripting language, updating it wouldn't be a big deal, it would mean restarting the server, but it would seem most online games go through some sort of restart when introducing new things anyways. You really don't want this. Yes, some items will need reboots, because they'll need new accompanying game logic. Minor updates, ...


3

Rather than hard-coding your data in Javascript, why not use JSON. It's always a good idea to separate your data from your program, and splitting out item definitions into JSON files would be very clean I think. Node even let's you use "require" with JSON files, how handy: How to parse JSON with node Databases are a great technology to learn if you haven't ...



Top 50 recent answers are included