Git Product home page Git Product logo

godot_series's People

Contributors

upsonp avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

godot_series's Issues

Noise Map function

  1. update chunk_function signatures to take a chunk index as a parameter. (Required for noise functions)
  2. create a noise_map_chunk function
    1. Have to initialize the Randomize singleton somewhere , probably in the root node? IsoMap will be a scene added to a game, where the game will be responsible for initializing the random singleton so doing it in the root seems like a good place to simulate that.
    2. figure stuff out
    3. ...
    4. Profit

git_valid_cell z-index + 1

Looking at the get_valid_cell(Vector2, z_index) function in the IsoPlayer script I have var valid_cell: Vector3i = map.get_valid_cell(new_cell, z_index + 1). Was wondering why this needs to be z_index + 1 and looked at the function in IsoMap. It looks like my default is "get_layers_count()" which is fine, but then I have for layer in range(max_layer-1, -1, -1):

If my function signature subtraced 1 from the default get_layers_count(), which is what I want to do anyway, then I wouldn't have to add one to the call in the IsoPlayer Script.

Make:

func get_valid_cell(cell_index: Vector2i, max_layer: int = get_layers_count()) -> Vector3i:
	for layer in range(max_layer-1, -1, -1):
		var cell_test: Vector2i = cell_index + (layer_offset * layer)
		if get_cell_source_id(layer, cell_test) != -1:
			return Vector3i(cell_index.x, cell_index.y, layer)
		
	return Vector3i(cell_index.x, cell_index.y, -1)

To

func get_valid_cell(cell_index: Vector2i, max_layer: int = get_layers_count()-1) -> Vector3i:
	for layer in range(max_layer, -1, -1):
		var cell_test: Vector2i = cell_index + (layer_offset * layer)
		if get_cell_source_id(layer, cell_test) != -1:
			return Vector3i(cell_index.x, cell_index.y, layer)
		
	return Vector3i(cell_index.x, cell_index.y, -1)

then fix the IsoPlayer script to just use var valid_cell: Vector3i = map.get_valid_cell(new_cell, z_index)

Get_valid_cell() Rename

I think get valid cell would be more descriptive if it was named get_cell_below_layer(). The method returns a cell regardless of if the cell is valid or not, but it's primary function is to find a cell below a given layer (or max layer if a layer is specified) then to translate the cell being looked for based on the layer offset.

Player-Map dependency injection

Currently when the player is initialized it's using get_parent() to find the IsoMap, but I think it would be better that Player had an init() function that took an IsoMap object. That way the player doesn't have to be a child node of the IsoMap.

Test for valid cell

Add a get_valid_cell() method to the IsoMap to check if a cell we want to move to is a valid move. Return Vector3i with the cell coordinates and z value representing either if the move is invalid -1 or the height of the move.

_on_move_complete() rename

I think IsoMap._on_move_complete() should be renamed to "update_chunk_request()" as that's more descriptive of what the function is doing. The player emits a "move_completed" signal, which the map is listening for and the map then makes a chunk update if it's required.

Layer Modulate

Demonstrate layer highlighting using Layer Modulate to show the layer the character is currently standing on.

Chunks

Allow making and drawing chunks around the main chunk.

Jumping

Allow the character to move from one layer to another by using the 'ui_jump' macro.

The functionality should allow the character to walk up to a wall and upon pressing the space bar in the direction of the wall the character will change layers and move to the tile in the direction of the jump.

A character should not be able to jump off a chunk or into an invalid cell. The character should only be able to jump one layer in either direction

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.