• Advertisement

SuperG

Member
  • Content count

    85
  • Joined

  • Last visited

Community Reputation

1301 Excellent

About SuperG

  • Rank
    Member

Personal Information

  • Interests
    Design
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Enable
  1. Figuring out ECS DOD solution to. But I agree with @serumas. This solution will do very well for 100 entity. But might be very bad solution when you scale up in components and entitys. For 2Ghz cpu this single threaded solution has for FPS of 100 2G / (100 * 100 ) = 200.000 CP U cycles per entity to blow. So you can have a few 100 cachmisses of the slowes memory like 1000 cycles.penalty. You must go prety wild to get that with cache unfriendly solutions. But you will get there when you scale up. This solution works if you need solution for very light weight game. Now imagine game object could be made out of many entity with each pletora of components And scale it up to few dozen types of components and 10.000 entity. Then that second and third and Firth core running at 2GHz get probaly needed to. How ever if this low requierment is all you need and make sense for your use of very small game, then use it. Aspacialy if this design make much sense or are comfy with. But making it cache friendly avoid enums branch checks in critical loops doesn't need to be that complex. The way modern cpu like it is keep the same code in cache and compute the data sequential all nice inline in memory. Array is very basic solution. If you implement it like each component type has its own array. Where component manager compute everything in one loop. You get better way of cache utilisation. And bonus is it get trival to make it multitreaded. And because it all the same kind of data some cases possible to use SSE AVX .SIMD. Even offload it. To GPU using cuda openCL or C++AMP. Computeshaders But the simple form of it doesn't need to look complex. It might be even easy to read to. To me to test a good solution you stess test it. Because with today hardware and highlevel language making game like phong is so not demanding. So the very wrong wat might do the job. What I seek is a very basic solution that scale well up to large numbers of entity and components. The type of game is 3D space sandbox game and those game it often where there is one there are huge number more of.
  • Advertisement