New answers tagged

2

You could use a hashtable with a key which consists of both the x-coordinate and y-coordinate. Finding the tile at a specific coordinate is then a constant-time operation. When you want to cache the "outline", you could store it in another hashtable. Whenever a node is added, follow this algorithm: the new node is removed from the "outline" hashtable for ...


1

Assuming you'd like your game's levels to be edited by either a non-technical game designer or QA team, I would actually recommend none of what you suggested for the actual level editing portion. Because the parameters of these levels are relatively simple, I recommend you make the editor a part of the compiled application, not part of the Unity editor. In ...


0

State Management is what you're looking at. It's an entire idea of how to manage the current state of your game, and is often seen like a large state machine. It all falls under the Model View Controller design pattern. However implementing it is where things get interesting. You've already mention XML, so why not JSON? It's got native support in Unity, and ...


1

(Sorry for poor formatting - I'm on my phone) There are a lot of valid options. If I were tasked with this, I would probably do one of two things: Save the level data in Google Sheets and use one of the google sheets assets available on the asset store to pull it into the game either at design time or run time. Or: Save the level data in ...


0

There is no conventional approach in designing a game really. You do whatever works for you. You can have full physics in your game, or you can fake it all. Back to your question though, since the levels of a game like this are all random and also proceduraly generated, then just use one scene with a camera only. Switch from main menu to game type ...


2

When i is 0 you copy the row 0 into the row 1, then i is 1 and you copy the row 1 into the row 2, etc. The problem is that when you copy the row 1, it has already been overriden. You probably also have a problem when i = HEIGHT because i+1 is out of bounds. The solution would be to iterate from the bottom row to the top row (from HEIGHT-1 to 1): for (i = ...


0

You can use RLE. But you can use SVO (Sparse Voxel Octree), id Tech 6 uses SVO. A SVO is a 3D computer graphics rendering technique using a raycasting or sometimes a ray tracing approach into an octree data representation. The technique varies somewhat, but generally relies on generating and processing the hull of points (sparse voxels) which are visible ...



Top 50 recent answers are included