Skip to content

Instantly share code, notes, and snippets.

Avatar

nicmr

View GitHub Profile
@nicmr
nicmr / GridBasedGodot.md
Last active Jul 30, 2019
Improvement to some code the youtube channel GDQuest shared on creating grid based movement in godot.
View GridBasedGodot.md

Old version for comparison:

func _fixed_process(delta):
	var is_moving = Input.is_action_pressed("move_up") or Input.is_action_pressed("move_right") or Input.is_action_pressed("move_down") or Input.is_action_pressed("move_left")
	
	direction = Vector2()
	if is_moving:
		speed = MAX_SPEED
		
		if Input.is_action_pressed("move_up"):
@nicmr
nicmr / server.py
Last active Jun 26, 2018
tornado httpsserver
View server.py
import os
import tornado.httpserver
import tornado.ioloop
import tornado.web
root = os.path.dirname(__file__)
port = 9999
application = tornado.web.Application([
(r"/(.*)", tornado.web.StaticFileHandler, {"path": root, "default_filename": "index.html"})
You can’t perform that action at this time.