Skip to content

Instantly share code, notes, and snippets.

View dmsurti's full-sized avatar
💭
I may be slow to respond.

Deepak Surti dmsurti

💭
I may be slow to respond.
View GitHub Profile
@dmsurti
dmsurti / lw-repl.log
Created August 21, 2015 14:20
Trace CLOS method
CL-USER 1 > (load "~/tmp/trace-method.lisp")
; Loading text file /Users/deepaksurti/tmp/trace-method.lisp
#P"/Users/deepaksurti/tmp/trace-method.lisp"
CL-USER 2 > (test-foo)
1
CL-USER 3 > (trace (method foo (fixnum)))
((METHOD FOO (FIXNUM)))
@dmsurti
dmsurti / bartender.py
Created September 21, 2016 12:41
Bartender initial solution (Gerard)
# yes = True
# y = True
# no = False
# n = False
questions = {
"strong": "Do ye like yer drinks strong?",
"salty": "Do ye like it with a salty tang?",
"bitter": "Are ye a lubber who likes it bitter?",
"sweet": "Would ye like a bit of sweetness with yer poison?",
@dmsurti
dmsurti / pirate_bartender.py
Created September 23, 2016 04:16
Pirate bartender solution review (for Ryan)
import random
questions = {
"strong": "Do ye like yer drinks strong?",
"salty": "Do ye like it with a salty tang?",
"bitter": "Are ye a lubber who likes it bitter?",
"sweet": "Would ye like a bit of sweetness with yer poison?",
"fruity": "Are ye one for a fruity finish?",
}
@dmsurti
dmsurti / bartender.py
Created September 26, 2016 06:29
Bartender (Submission by Hans)
import random
questions = {
"strong": "Do ye like yer drinks strong?",
"salty": "Do ye like it with a salty tang?",
"bitter": "Are ye a lubber who likes it bitter?",
"sweet": "Would ye like a bit of sweetness with yer poison?",
"fruity": "Are ye one for a fruity finish?",
}
@dmsurti
dmsurti / distr_weights_operator.py
Created December 26, 2016 15:44
A blender operator to distribute weights
import bpy
# Distributes the weighting on the vertices so that at most 'maxInfluence'
# bones affect the vertex.
def distributeWeight(obj, maxInfluence):
print("--- %s ----" % (obj.name))
# Access the mesh data.
mesh = obj.data
import bpy
# Distributes the weighting on the vertices so that at most 'maxInfluence'
# bones affect the vertex.
def distributeWeight(obj, maxInfluence):
print("--- %s ----" % (obj.name))
# Access the mesh data.
mesh = obj.data
@dmsurti
dmsurti / test_pjs.py
Created July 19, 2017 13:35
Using python-jsonschema-objects to generate a class for blockMeshDict
import json
import python_jsonschema_objects as pjs
schema = {
"title": "Example Schema",
"type" : "object",
"properties": {
"blocks": {
"id": "/properties/blocks",
"properties": {
#def is a keyword
# fizzbuzz_gen is the function name
# generates the fizzbuzz strings from 1 to n
def fizzbuzz_gen(n):
fizzbuzz_strings = []
for num in range(1, n + 1):
print("Fizz buzz counting up to {}".format(num))
if num % 3 == 0 and num % 5 == 0:
fizzbuzz_string.append("fizzbuzz")
@dmsurti
dmsurti / System Design.md
Created August 3, 2019 05:24 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@dmsurti
dmsurti / custom_game_engines_small_study.md
Created April 24, 2020 16:16 — forked from raysan5/custom_game_engines_small_study.md
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) becaus