Questions tagged [data-oriented]

Data-oriented design is a paradigm that boils down programming to transformations of data. Treating software in this way allows programmers to make better use of modern computing hardware, where transferring memory from RAM to the CPU cache is very slow and operating on large chunks of sequential data is very fast. Code also becomes simpler to write and follow, but it loses some reusability in the process.

Filter by
Sorted by
Tagged with
3 votes
2 answers
953 views

Implementing Runescape-style stat-based conditional buffs within an ECS

Prologue I'm quite new to data oriented programming and my goal is to implement a Runescape-style stats & damage mechanic in a data oriented styme. This is quite a complex topic (Runescape-Mechanics) ...
Lars's user avatar
  • 31
2 votes
1 answer
1k views

Tilemap collision in Pure ECS?

I'm currently making a 2D topdown dungeon crawler using pure ECS and Data Oriented Design. So I only use structs of arrays for all my components. I have now added tilemap generation, but was wondering ...
Styn's user avatar
  • 121
1 vote
1 answer
247 views

Should fields in components in an ECS use polymorphism?

I've just started to try and learn how to use ECS (Entity component systems), but I'm having trouble understanding the concepts behind components. Should adding more types of components, or trying to ...
Sarah's user avatar
  • 59
1 vote
1 answer
493 views

Load large quantities of data in Unity3D

I'm building an Android app using Unity3D where users can visualize data immersively. The data is immutable and stored using a MySQL database hosted on cPanel. When the user clicks a button in the ...
Tiago Martins Peres's user avatar
3 votes
1 answer
2k views

Should components in Entity Component System pattern have logic?

Is often read that in entity component system pattern we should treat components just as a passive data structure with no logic at all, this way we follow to a data oriented design approach with ...
Alejandro's user avatar
1 vote
2 answers
5k views

Design pattern for turn based strategy game in C++

I'm studying computer science at university. So far I've created several programs for school projects and homeworks in C++. They were usually smaller programs up to 1000 lines of code. Now I want to ...
kocourOggy's user avatar
3 votes
2 answers
1k views

Using polymorphism in an Entity-Component System without sacrificing data-oriented design

I've been planning out an Entity-Component System in C++. My idea of it is most in line with the one described on this page of the entity systems wiki. To summarize, components are just structs of ...
DragonOfAwesome's user avatar
4 votes
2 answers
1k views

Appropriate Cache Friendly Associative Container For An Entity Component System

The intro to this problem is a bit of a long one so my apologies in advance. In short I am asking for suggestion as to what type of collection I should use to store data for a particular part of my ...
Ryoku's user avatar
  • 187
2 votes
2 answers
801 views

ECS: is it beneficial to manage the data organisation of components before updating a system?

When I process a bunch of component data, I'd like that data to be sorted in such a way that I can iterate through the component buffers linearly. For instance when I want to update the physics system,...
PhilipMR's user avatar
1 vote
1 answer
1k views

What's the proper practice to organize relationship between components in an ECS pattern?

I'm new to ECS concept and trying to refactor my app with an ECS manner. After reading some articles, I still don't get a sense about how to organize hierarchy for such pattern. My questions are Is ...
Lin M's user avatar
  • 11
6 votes
1 answer
5k views

A more data oriented design approach to Entity Component System game engine

I'm creating my first c++ game engine project (for learning purposes) and in it I've attempted to implement an entity/component system utilizing some data oriented design principles while also not ...
Jason's user avatar
  • 413
1 vote
2 answers
157 views

How can I boost cache performance when storing objects in a scene with managed languages?

So, for reasons that I won't go into (has to do with my team more so than a good objective reason, unfortunately), I'm building a soft game engine in C# on top of SharpDX. C++ wasn't an option. I can'...
Scorch's user avatar
  • 257
0 votes
1 answer
1k views

Data-oriented design and Component Sytem cross-referencing

Let's assume we're talking about a game (engine) which is written in C++. This is more like a design question but I can't find any suitable description. Component System The Component System says ...
csisy's user avatar
  • 365
1 vote
1 answer
209 views

How do I use data-orientated programming without object-orientated programming?

I have been reading many resources about data oriented programming, and one thing I understand about it is that it's about keeping chunks of memory together to improve performance. Other than that, I ...
Accumulator's user avatar
3 votes
1 answer
1k views

Data oriented design in physics engine

I am new to data oriented design and I am currently developing a physics engine as a hobby project. I am really interested in data orinted design but I am not sure how to apply data oriented design to ...
kevinyu's user avatar
  • 231
0 votes
2 answers
1k views

Is object-oriented underestimated for game development? [closed]

I'd like to understand whether the object-oriented paradigm applied to game programming is bad, or whether it's just an urban legend. A friend of mine is developing a game with HTML5 and Javascript ...
user3075478's user avatar
0 votes
2 answers
327 views

How does this data oriented design retain level data, while still offering cache-wise benefits?

I'm almost sold on the concept of a data oriented engine; however, one thing still eludes me. If we pack the data from a large level into huge arrays, and go over them, any visibility system that we ...
Kornel Kisielewicz's user avatar
2 votes
5 answers
7k views

Entity System creating Components

Over every entity system I see implemented in C++, or even in Java/C# (e.g. the Artemis framework). I see components not allocated via a new operator (or something similar, e.g. ...
miguel.martin's user avatar
1 vote
1 answer
1k views

How to resolve duplicate data in Entity Systems?

Whilst working on examples and upgrades for my C++ Entity System, something randomly caught the attention of my mind, by surprise: duplicate data. What I'm referring to is how an entity system that ...
miguel.martin's user avatar
8 votes
2 answers
6k views

Example of Data Oriented Design

I can't seem to find a nice explanation of the Data Oriented Design for a generic zombie game (it's just an example, pretty common example). Could you make an example of the Data Oriented Design on ...
Shoe's user avatar
  • 907
7 votes
3 answers
4k views

How can be data oriented programming applied for GUI system?

I've just learned basics of Data oriented programming design, but I'm not very familiar with that yet. I've also read Pitfalls of Object Oriented Programming GCAP 09. It seems that data oriented ...
kravemir's user avatar
  • 1,657