This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local floor = math.floor | |
local point = { | |
Center = 0, | |
North = 1, | |
NorthWest = 2, | |
West = 3, | |
SouthWest = 4, | |
South = 5, | |
SouthEast = 6, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local train = {} | |
train.__index = train | |
local lg, lm = love.graphics, love.math | |
local MAXY = 1000 | |
-- We use the previous value so that it doesn't get too crazy looking | |
-- Will need better generation which min and max so it doesn't go up or down forever | |
local function generateValue(previous) return (lm.random(20)-10)*2+previous*0.25 end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local lg = love.graphics | |
local floor = math.floor | |
local insert = table.insert | |
local image = lg.newImage("Line.png") --I used a 64x64 image to test | |
image:setWrap("repeat","repeat") | |
local iw, ih = image:getDimensions() | |
--Options | |
local frames = 20 -- Frames per line section |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local appleCake = require("AppleCake")(true) -- False will disable AppleCake for your project | |
appleCake.setBuffer(true) -- Buffer data, and only send it to be saved when appleCake.flush is called | |
appleCake.beginSession() | |
appleCake.mark("Begin") -- Add markers for timeless events | |
local r = 0 | |
function love.update(dt) | |
local profileUpdate = appleCake.profileFunc({radian=r}) -- Auto-generates a name for the function, "[email protected]#7", and records the arguments | |
r = r + 0.5 * dt | |
profileUpdate:stop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"cat":"mark","name":"Begin","ph":"i","pid":0,"tid":1074326280,"s":"p","ts":38635820939.5},{"cat":"function","dur":2.3000030517578,"name":"[email protected]#6","ph":"X","pid":0,"tid":1074326280,"ts":38635828316.2,"args":{"radian":0}},{"cat":"function","dur":108.59999847412,"name":"Draw","ph":"X","pid":0,"tid":1074326280,"ts":38635857022,"args":{"canvases":0,"images":0,"drawcalls":1,"drawcallsbatched":0,"fonts":0,"canvasswitches":0,"shaderswitches":7,"texturememory":0}},{"cat":"function","dur":2.0999908447266,"name":"[email protected]#6","ph":"X","pid":0,"tid":1074326280,"ts":38635941464.7,"args":{"radian":0.0036259999978938}},{"cat":"function","dur":26.5,"name":"Draw","ph":"X","pid":0,"tid":1074326280,"ts":38635944332.1,"args":{"canvases":0,"images":0,"drawcalls":1,"drawcallsbatched":0,"fonts":0,"canvasswitches":0,"shaderswitches":0,"texturememory":0}},{"cat":"function","dur":2.2999954223633,"name":"[email protected]#6","ph":"X","pid":0,"tid":1074326280,"ts":38635952094.9,"args":{"radian":0.060212149997824}},{"cat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* Bootstrap v4.3.1 (https://getbootstrap.com/) | |
* Copyright 2011-2019 The Bootstrap Authors | |
* Copyright 2011-2019 Twitter, Inc. | |
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
*/:root{--blue: #007bff;--indigo: #6610f2;--purple: #6f42c1;--pink: #e83e8c;--red: #dc3545;--orange: #fd7e14;--yellow: #ffc107;--green: #28a745;--teal: #20c997;--cyan: #17a2b8;--white: #fff;--gray: #adb4c0;--gray-dark: #747f94;--primary: #28b76b;--secondary: #5d6778;--success: #5cb377;--info: #5b99ea;--warning: #EEBF41;--danger: #d26d69;--light: #fff;--dark: #747f94;--breakpoint-xs: 0;--breakpoint-sm: 576px;--breakpoint-md: 768px;--breakpoint-lg: 992px;--breakpoint-xl: 1200px;--font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}*,*::before, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local appleCake = require("AppleCake")() -- Will be disabled if the main thread set AppleCake to false | |
-- Note we don't set buffering so everything is pushed to the save thread as soon as it can be | |
local function foo() -- "[email protected]#3" | |
local profile = appleCake.profileFunc() | |
local n = 0 | |
for i=0, 100000 do | |
n = n + i | |
end | |
profile:stop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
appleCake.beginSession() -- Default "profile.json" in the save direcotry | |
appleCake.beginSession("profile.json") | |
appleCake.beginSession("/profiles/profile.json") | |
appleCake.beginSession(nil, "Best Project") | |
appleCake.beginSession("profile.json", "Game4000") | |
if love.filesystem.isFused() then | |
local dir = love.filesystem.getSourceBaseDirectory() | |
love.filesystem.mount(dir, "gameSource") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
appleCake.endSession() | |
function love.quit() | |
appleCake.endSession() | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local _profile = appleCake.profile("love.update") | |
local function bar() | |
local _profileBar = appleCake.profile("bar", {}) -- Initalizing args to an empty table as it's nil by default | |
--... | |
local _profileBarSet = appleCake.profile("bar set") -- Example of nested profiling | |
_profileBar.args.value = 12 | |
_profileBarSet:stop() -- This could stop after _profileBar:stop() if you wanted | |
--... | |
_profileBar:stop() |
OlderNewer