• 82 Posts
  • 5.93K Comments
Joined 3 years ago
cake
Cake day: June 12th, 2023

help-circle

  • The reason for checking keys is it is the only way i know how to do it. This input handling script is what im finding the most trouble with, a lot of the lines are added because I read a 6yr old reddit comment that said to use it and im not sure if I should remove it because then bugs start appearing.

    The reason for unhandled input was the first input handling code example I saw and honestly I forgot about input(). I’ll look into the creating input actions but at a glance it doesn’t seem like it could work for my game. This game is pretty much left click right click on a 2d space and depending on what tool is selected.

    I really do want to move some of the code into other functions but im not sure how to make a function that handles the input over multiple different states.

    For example dragging a box. needs to check for the left click then check for the dragging state and draw on drag then check for a release. I have a lot of tools that will need to implement this so I’d really like to get this logic out of the main function and into a nice reusable block.

    code example
    	elif selected_type == "command":
    		if selected_item == "structure_dict_growing":
    			if is_dragging and event is InputEventMouseMotion:
    				var grid_pos = tilemap.local_to_map(camera.get_global_mouse_position())
    				var local_pos = tilemap.map_to_local(grid_pos)
    				drag_end = local_pos + Vector2(32, 32)
    				cam_drag_end = get_viewport().get_mouse_position()
    				gui.queue_redraw()
    				get_viewport().set_input_as_handled()
    				return
    			elif event is InputEventMouseButton and not event.pressed:
    				if event.button_index == MOUSE_BUTTON_LEFT:
    					is_dragging = false
    					gui.queue_redraw()
    					get_viewport().set_input_as_handled()
    					MessageBus.rpc_id(1, "request_zone_growing", selected_item ,drag_start, drag_end, multiplayer.get_unique_id())
    					drag_start = null
    					drag_end = null
    					return
    			elif event is InputEventMouseButton and event.pressed:
    				if event.button_index == MOUSE_BUTTON_LEFT:
    					is_dragging = true
    					#to snap to grid
    					var grid_pos = tilemap.local_to_map(camera.get_global_mouse_position())
    					var local_pos = tilemap.map_to_local(grid_pos)
    					drag_start = local_pos - Vector2(32, 32)
    					cam_drag_start = get_viewport().get_mouse_position()
    					gui.queue_redraw()
    					get_viewport().set_input_as_handled()
    					return
    










  • This is about Tibetan history over the past 100 years, the only reason they bring up Jews and Epstein is to play into the “Jewish cabal” trope and the conspiracy that secret Jewish elites control American foreign policy.

    Its line for line neo Nazi rhetoric. Epstein and Zionism here clearly refers to Jews and not Christians who support Jews returning to isreal.







  • In the RTS game beyond all reason there is a long ongoing debate thread where people would argue for removing the ability to co-op(one of bars unique mechanics)

    In BAR you generally play team games up to 8v8 and can instantly send resources to other players. You can also transfer units. This is pretty cool it allows you to work together to get higher tech things faster. 2 people sharing 1 lab is more efficient than 2 people making a lab each. So obviously the higher ranked games devolved into the most fucking degenerate co-op tactics. Cheese or be cheesed. Lanes decided by which good player gets more boosts. You’d end up in games where your role is to be a battery and make energy for the first few mins. You would end up losing your lane at 3mins because the other team boosted your lane then once you die they go boost the other side. You’d have the top players in the team forcing the bottom players to be a boost for them because them getting ahead is far more valuable. It was fun in the beginning but got very bad.

    So top players were arguing that there needed to be a fix and tried to discuss what it should be and more casual players would constantly argue that it wasnt a problem, it was a skill issue, it was fun etc, someone just needs to counter it.

    The solution people wanted was a resource tax but it required engine work. But its been done now, we got the engine work and its a toggle on setting so those who want it can and those who dont can leave it off. The “coop is a problem” thread is still going but i dont know what the new arguments are about.