Jump to content

  • Log In with Google      Sign In   
  • Create Account

Calling all IT Pros from Canada and Australia.. we need your help! Support our site by taking a quick sponsored surveyand win a chance at a $50 Amazon gift card. Click here to get started!


Inferiarum

Member Since 02 Dec 2009
Offline Last Active May 21 2015 04:13 PM

Topics I've Started

storing the game state

12 May 2013 - 06:34 AM

Hello everyone,

 

So I was thinking about how to store the game state for all entities. Let's say we have two properties, position and velocity. If each entity has the same properties we can just store those in flat arrays (I hope my pseudo-code is understandable)

 

Array<Vec3> pos

Array<Vec3> vel

 

and then if we integrate the positions we can simply do

 

for ix = 1 to lenth(pos) do

   pos[ix] = pos[ix] + vel[ix]

end

 

which is also very fast. Now what if not every entity has the velocity property? We only have to update entities that have a velocity, but we also need to know the position of the entity. One straightforward solution would be to assign unique identifiers to the entities and store every property in a map or dictionary,

 

Map<EntId, Vec3> pos

Map<EntId, Vec3> vel

 

which could be iterated over similarly,

 

for each (id, v) in vel do

   pos[id] = pos[id] + v

end

 

however this is kind of slow (about 100 times slower in my benchmark with 1000 entities). And I think I remember reading something here on the forum where someone gave the advice not to store everything in maps like this.

 

So I know about these entity component systems, and what I am doing here is actually very similar, but I do not really want to use some kind of framework. I am totally happy with storing the whole game state in global variables. I already have some ideas on how to approach this, but none of them seem really elegant. I would be happy to hear some opinions.

 

 


Compressed Sensing for Voxel Data Compression

25 January 2013 - 03:39 AM

Hello guys,

 

Has anyone tried to compress voxel data with compressed sensing? It seems to be a suitable application. If you for example consider only voxels on the surface of an object to be important the whole data should be quite sparse.

 

Well, just an idea if someone wants to try it :)

 


Inter process communication between Renderer and Game Logic

04 December 2012 - 07:34 AM

Hello everybody,

So lets say you want to make a game in Go (http://golang.org), but because of the lack of preexisting solutions and because you think it is not what you want to spend your time on, you decide not to do the user interface (that is graphics, sound, input handling) in go, but you would want to use Unity.

Now we have one process running the logic, and another process running the 'viewer'. My idea is to do the IPC over a local TCP-socket since it seems the easiest to implement(?). I would then probably send delta updates of the information on entities which have to be drawn from the logic to the viewer, and input updates form the viewer to the logic.

My main questions are: Has someone already done something like this? And do you think it is a good idea? :)

I guess the lag from the IPC should be not noticeable, and the amount of data that needs to be transfered is not that high.

BR

Inf

Programming games

05 October 2012 - 07:45 AM

Are there any larger scale games that include the possibility to program behavior of in-game objects?
What I mean is something like http://robocode.sourceforge.net/ but with a more complex strategic gameplay.

If there is not, do you guys think there could be an audience for something like that. What I have in mind is a RTS game where it is optional to modify behavior of units.

client side interpolation and projectiles

29 January 2011 - 11:17 PM

Hello everybody,

I have a question about client side interpolation as implemented in the source engine. I read an article where they state that, since locally you see all players in the past, the server takes this into account when you shoot someone, moving the target backward in time to determine if you hit or not. So basically the shot took place in the past. but originated from the current player position.

Now would it make sense to do the same thing with projectiles like the rocket launcher in quake 3? That is, if someone shoots a rocket, the server spawns the rocket in the past (i.e. moving it forward for the time of the interpolation delay). And then of course also do the collision detection in the past. This should have the desired effect for the shooting player. But this would be problematic for the target because he doesnt display himself in the past and cant properly avoid the projectile.

Now should I display the projectile in the past for the shooting player and at the current position of all other players? The downside is that for the other players the projectile would suddenly appear in mid air, a few steps away from the shooting player, but they could properly respond to avoid the collision.

Am i overthinking this? Perhaps someone can give his opinion.

Thanks!

PARTNERS