Angelic Ice

  • Content count

  • Joined

  • Last visited

Community Reputation

928 Good

1 Follower

About Angelic Ice

  • Rank

Personal Information

  • Interests
  1. Algorithm Spatial Sorting in 3d

    Ah, assumed something into that direction, thanks! Yes and it is too slow on weak devices (e.g. smartphones), especially since I need a rather scaling implementation, as the object-count is not predictable (200 objects was just the bare minimum).
  2. Algorithm Spatial Sorting in 3d

    Oh, this slightly confuses me: Because I did some research about BVHs and people refer to them as trees, but you talk about array-based systems. Are BVHs internally functioning via arrays? Probably an implementation-detail differing between libraries? On another note, are there any publicly popular C++ BVHs? I found some, but they either lack documentation or are quite young and untested.
  3. Algorithm Spatial Sorting in 3d

    Deleting a tree data-structure just to rebuild it, with e.g. 200 objects every cycle, shall be more efficient than updating one or two moving objects? Wow! Really have to try that. Sounds like a massive amount of overhead per cycle. Wouldn't deleting an object that just moved and inserting them be a solution too? Though, I could see this become less efficient if every objects out of 200 would be moving at once, but that would never be the case on my end. Thanks, I will totally read about BVHs!
  4. Algorithm Spatial Sorting in 3d

    Thanks for pointing out, I fixed it! Fixed this as well! The gameplay is surely nowhere like Minecraft but the collision-world could be. Not all cubes have the same size, because terrain has a different cube-size compared to the player. I want collision-detection and gravity-detection, which is pretty much just collision-detection on the height-axis.
  5. Hello! I was looking for a data-structure that is meant to handle sorting of 3d-objects, where every object, within trees or child trees, will potentially move/change their position, hence no static objects. I am mainly curious if there is anything similar to an octree with a cheap update-complexity, because updating one element takes quite some iterations, e.g. recursively entering parent octrees, checking whether they fit in them or not... I considered to roll out a 3d spatial hashing instead, as octrees' precision seems quite unimportant for my project as well. It would seem to be easier to update compared than an octree. Why do I worry about performance? I really just would like to use the semantically most fitting structure. I often hear, quad- and octrees shine with static objects, because they allow a high precision via their branching of smaller trees within each tree. On the other hand, I totally do not need this, there is no complex collider either, just cubes. I might be totally wrong on my performance-observations, though! Summing it up, what would you recommend/use for a 3d-world with simple cube-colliders where every object is dynamic? Thanks for your time! Edit: Fixed terribly screwed sentences that were not even complete, sorry!
  6. Hello! I wanted to create a few interface-classes in a rather new project. Other programming languages, as C#/Java commonly agree on writing file names in a way similar to: IMyClass Personally, I use underscore within C++, just because I tend to go for long variable-names and it improves readability. Hence writing file-names with underscore seems just the native decision. Now, the I-prefix is pascal-case, which astonishes me in general, because iMyClass is more readable, but anyway: I would rather not want to use it and of course, nobody could force me to do so anyway. Nonetheless, I would like to know how you tackle interfaces in C++ in terms of naming? Currently, I'm considering: i_my_class.cpp (which looks a bit weird, never seen this before) imy_class.cpp (less readable) interface_my_class.cpp or my_class_interface.cpp I even thought about omitting the interface/prefix altogether in C++. Curious on how you deal with this! Thanks for your time!
  7. C# C# Core - Application Data

    Thanks for confirming it. Because I like C# as a language but want to release on a non-windows-operating-system. Core is gaining more and more steam. Beside that, if somebody knows a common practice for "editable settings during run-time" on core, I would be all ears : )
  8. Hello everyone! Just a quick question: I would like to save some application data, similar to here: But this seems to be either WinForm or .NET exclusive? At least I cannot use these methods, as properties does not exist. Furthermore, I feel like the way of serialising data in that manner is a bad sub-optimal for my liking, as I like to group multiple data-entries in a context (e.g. screen-width and screen-height in a folder/file/table/.. called window). Some pseudo-code to give an idea: Properties.Settings.Window.Width = 500; Properties.Settings.ErrorMessages.Loading.MissingFile = "File could not be found."; Is there a common practice to do this? JSON? Values should be editable during runtime! Even though an SQL-database is implemented, I do not want to scatter around key-value-tables. Thanks for your time!
  9. Grid level logic and real-time-physic?

    True, I should probably just check upon every pixel-motion, on which grids the current entity is and then check against others that are currently on that grid, too. Thanks a lot!
  10. Grid level logic and real-time-physic?

    Thanks : ) I decided to go with a complete 2d-physics-system with a "grid-interface" to access grid-slots. Thanks a lot! I decided to go with a real 2d game-field and leverage a grid-interface to guarantee accessing and placing the right grid-slots. There is only one question, I thought about assigning every moving (and static) entity's bounding box to all grid-slots on which they stand in order to simplify collision detection. I'm running a quad-tree for my GUI, not sure if that is a suitable solution for a grid-imitating field though, as I do not seek to have a maximum bucket capacity - one grid is one quad with no further quads. My grid-slots are isometric, if that matters. Are there already know data structures to handle such? I mean if there is no other solution, I would just implement my own isometric quad-tree that does not add further quad-trees : )
  11. Grid level logic and real-time-physic?

    Thanks a lot for the delighting input! One important operations with the grid-system would be clicking on one grid-slot and being able to find neighbours in a reliable and quick manner of course. That means, every grid-field, as a grass-tile or stone one, is capable of knowing their neighbours. I think, in a real 2d-field, I would have to keep grid-coordinates as well and then simply convert them to possible grid-neighbour-tiles? Edit: Forgot to add, that one grid should be able to identify currently "attached" objects, as in, what object stands on me? But I think that is easy to add anyway.
  12. Hello everyone! In my last thread, I was all about serialising a grid-map and its running animation-processes. Now, the thread made think: Is the grid-format really the right way to go? The overall game is based on clicking-on-grids (every grid-slot contains a field, e.g. stone-field, to walk on etc.). Clicking a grid-slot may alter neighbours of the grid, too. That is why I decided to have an list/vector/.. to represent my grid. The issue is, that characters continuously move on the grid. If one clicks on a grid with a character on it, the interaction will be different. Additionally, if a character starts to move from grid 1 to 2, the consequences shall only apply once the character is actually in near of cause (stepping on a nail on grid 2). What consequences? Imagine, the character starts walking, as every grid is larger than the character, it will take a while until the character crosses the border to grid 2. Multiple cases can occur: The earth-field in grid-slot 2 might fall down into the void. The consequence would be: The character falls down once they cross the border to grid-slot 2. Another consequence could be an obstacle that hurts the character upon collision. It would look weird, if the obstacle is very small and the character gets damaged just after crossing the border. E.g. a nail. The damage to the character should be applied, once the character actually steps on it. Nonetheless, every obstacle might disappear just a few centimetres before colliding. Vanished fields might reappear, nails dis/appear. Now, what options do I have? I would like to be able to build the level in a grid-logic. Selecting a field-type (e.g. stone) and inserting them into a grid-slot, then placing an object (character, enemy, ...) onto them. At the moment I handle this by having a z-axis, representing the height, e.g. ground being 1, things on a grid being 2. Simply: I want to keep the grid-feeling (especially for editing/creating levels in a grid), but interactions (collision etc.) shall be bound to hit-boxes, to provide a kind of real-time-feeling. I saw grid-games, that simply decide the logic/consequences just before transitioning to the next grid-slot, but that is too early for my needs. Doing a full 3d world feels overkill, as the presented logic is still provided in grids. Hopefully my explanation of my issue was understandable enough, I'm not really sure myself, haha. Anyway, thanks for your time : )
  13. Grid-based game: Serialising position

    Ah, so you suggest to serialise A as well, if X is continuously transformed towards the final state of Y. So, X could resemble a tuple of coordinates and A the player-input (e.g. a click on the grid), which translates into a move-order. I should attach this instruction-set to the owner of X and upon saving, serialise both? So coordinates slowly transform... Start is x = 10 then x = 11, x = 12, ... goal could be 20. And the instruction-set would be continued, being some script. Probably should read into how other games tackle this, as I want to keep high customisability. Serialising a spin-animation, followed by a teleport/blink to a grid-field during action, might be difficult. Thanks for all the inputs : )
  14. Grid-based game: Serialising position

    Hm, yes. I would totally fine by not saving the actual movement. As you said, either A1 or A8. There are still some problems for me though. When the movement happens, the coordinates are being transformed already, saving during an action would resolve in saving those coordinates. That might lead to errors: Maybe the character moves over field 3 and 4. But field 4 is a hole hence the character falls into the hole. If the game would be saved during the walking and then opened again, the character might stand on top of field 4, bypassing its fall-script. In either case, it sounds as if games contain two kinds of values. One set, that can be serialised and another one that is live and can be transformed?
  15. Grid-based game: Serialising position

    Maybe this is a part of my problem. I cannot really think of a smart way to serialise actions (player-inputs and resulting game reactions), as my game is mainly done round-based. An input, as a mouse-click to a grid-slot, will run a walk-script, triggering an animation-script and so on, the player has to wait until this has been finished. If the game suddenly needs to be saved, serialising this momentum becomes quite a problem for me. I barely ever saw a game saving currently processed actions (as jumping, attacking, ..), as to what I experienced, saving is a limited to only certain spots in a level (e.g. save-points) and usually serialises map-data and flags only. I totally understand the reasoning behind this, players usually opt-in -out of a game's session and probably do not want to save mid-action. An example for a mid-action: When the player moves from grid-slot 1 to 3, and the user suddenly shuts the phone hence the game tries to save automatically mid-motion/action. How would a move-to-new-slot-task be serialised? One idea would be having a action-task-scheduler (not meant in a multithread-context), that owns currently executing instructions, as player_moves_to_new_grid_slot, owning values as: running_script and the script's required arguments as goal_slot. entity_attacks, owning values as: running_script and again the script's required arugments target. If I would not serialise these task, the transformed player-coordinates would just be loaded in-between grid 1 and 3 but not complete the action. I mean, I could also have live-coordinates and old-coordinates and simply ignore live-values, therefore dismiss incomplete tasks.