Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Siorki/js13kgames
/ functions
Functions
135 in github.com/Siorki/js13kgames
⨍
Functions
135
◇
Types & classes
10
↓ 52 callers
Method
changeState
* Change the current state to the new one * Reinitialize menus (selected item, keypresses) * @param newState new value of the state (0 .. 2)
2024 - 2048 over 13/js/game.js:74
↓ 44 callers
Method
outlineText
* Draw text on the overlay canvas, with an outline (stroke and fill) * Context rendering parameters must be defined beforehand : strokeStyle, fillSt
2024 - 2048 over 13/js/renderer.js:90
↓ 23 callers
Method
totalClear
* Clears all inputs, keyboard and mouse buttons
2024 - 2048 over 13/js/controls.js:19
↓ 22 callers
Method
initialize
* Menu reset, upond entering the screen
2024 - 2048 over 13/js/menuDriver.js:44
↓ 21 callers
Method
setEnabled
* Enable or disable a line in the menu (finer control than the old "minLine") * @param line index of the line which stat will be set * @param valu
2024 - 2048 over 13/js/menuDriver.js:56
↓ 17 callers
Method
onMouseMove
* Handler for mouse/touch move events
2024 - 2048 over 13/js/controls.js:149
↓ 17 callers
Method
resizeWindow
* Handler for global window resize event, also called once at init time * Defines the zoom factor for the canvas contents and (re)aligns everything
2024 - 2048 over 13/js/renderer.js:42
↓ 15 callers
Method
renderLoop
* Performs all the rendering (view) with no alteration of the model * + controls related to the view only
2024 - 2048 over 13/js/game.js:158
↓ 14 callers
Method
keyControl
* Delegated handler for keyboard events * Records key presses and releases, for both standard keys (arrows, enter, escape) * and configurable cont
2024 - 2048 over 13/js/controls.js:50
↓ 14 callers
Method
onMouseDown
* Handler for mouse down events
2024 - 2048 over 13/js/controls.js:100
↓ 14 callers
Method
onMouseUp
* Handler for mouse up events
2024 - 2048 over 13/js/controls.js:91
↓ 14 callers
Method
processEvents
* Acts according to user input : * - keys up and down move the selected option * - key Enter validates the selected option * - mouse click / tou
2024 - 2048 over 13/js/menuDriver.js:76
↓ 12 callers
Method
animateItems
* Performs one step of animation : * - tiles fall down * - identical tiles are merged * - 8 4 1 on the same line turn into 13
2024 - 2048 over 13/js/engine.js:303
↓ 10 callers
Method
acknowledgeMouseClick
* Consume a mouse click, so that the icon will not * be activated again the next frame, until the user clicks again * (used for double-click requi
2024 - 2048 over 13/js/controls.js:140
↓ 10 callers
Method
onTouchEnd
* Handler for touch end / touch leave events
2024 - 2048 over 13/js/controls.js:119
↓ 10 callers
Method
onTouchStart
* Handler for touch start / touch enter events * Call onMouseMove (pointer motion handler) first to record position as the event chain begins with o
2024 - 2048 over 13/js/controls.js:110
↓ 8 callers
Method
drawMain
* Entry point, draw the whole playfield, and the menu if requested * @param showMenu true to render menu * @param menu menu to show, instance of
2024 - 2048 over 13/js/renderer.js:103
↓ 8 callers
Method
mainLoop
* Main loop, actions only, no rendering * Performs all the model edition + controls effect
2024 - 2048 over 13/js/game.js:95
↓ 7 callers
Method
drawShadedText
* Draw text on the text canvas, with shadow * @param text The text to write * @param x X-coordinate of the text, left/center/right depending on th
2024 - 2048 over 13/js/renderer.js:72
↓ 7 callers
Method
launch
* Launch the game : set the state to main menu and start the timers (main loop and rendering loop)
2024 - 2048 over 13/js/game.js:61
↓ 7 callers
Method
setRenderer
* Define the renderer in charge (one does both overlay canvas and scenery canvas) * * @param renderer new renderer
2024 - 2048 over 13/js/game.js:172
↓ 6 callers
Method
onKeyDown
* Handler for key down events
2024 - 2048 over 13/js/controls.js:40
↓ 6 callers
Method
onKeyUp
* Handler for key up events
2024 - 2048 over 13/js/controls.js:33
↓ 6 callers
Method
processControls
* Take into account user actions (mouse move / click) * Called once each step.
2024 - 2048 over 13/js/engine.js:437
↓ 6 callers
Method
toggleMusic
* Toggle Background music on and off. * Music playback is stopped immediately when turned off
2024 - 2048 over 13/js/game.js:180
↓ 5 callers
Method
layoutChanged
* Called when the window is resized and the window layout changes * Transmits it to the controls * @param windowLayout new layout (grid size, cont
2024 - 2048 over 13/js/game.js:224
↓ 5 callers
Method
onLayoutChange
* Second-level handler for window resize / layout change. Called by Game. * Keeps track of the new layout with the click areas * @param windowLayo
2024 - 2048 over 13/js/controls.js:195
↓ 5 callers
Method
onTouchMove
* Handler for touch move events
2024 - 2048 over 13/js/controls.js:128
↓ 5 callers
Method
startNewGame
* Create a new game * Empties the grid (save for a 1 tile) and resets the scores
2024 - 2048 over 13/js/engine.js:55
↓ 3 callers
Method
drawMainMenu
* Entry point - Draw the main menu options * @param menu the active menu
2024 - 2048 over 13/js/renderer.js:401
↓ 3 callers
Method
drawPlayfield
* Draw the top view of the current floor on the scenery canvas * If in a stairway or elevator, draw both floors, below and above, with relative zoom
2024 - 2048 over 13/js/renderer.js:222
↓ 3 callers
Function
roomNextDoor
* Returns the index of the room behind a door. * No consistency check is performed * @param roomIndex (integer) : index of the current room * @para
2015 - alive'n'loaded/nodeServer.js:83
↓ 3 callers
Method
saveGame
* Saves the game in progress
2024 - 2048 over 13/js/engine.js:482
↓ 2 callers
Method
addSaveGameListener
* Add a listener to be notified of game save / autosave
2024 - 2048 over 13/js/engine.js:475
↓ 2 callers
Method
addTileToQueue
* Randomly add a tile to the waiting line * @return true if added, false if the line is already full ( = game over)
2024 - 2048 over 13/js/engine.js:105
↓ 2 callers
Method
beginFall
* Identify and mark tiles that will be falling * Output written directly in this.tiles as attributes targetX and targetY
2024 - 2048 over 13/js/engine.js:123
↓ 2 callers
Function
charactersAvailable
()
2015 - alive'n'loaded/nodeServer.js:12
↓ 2 callers
Function
createGame
()
2015 - alive'n'loaded/nodeServer.js:6
↓ 2 callers
Method
drawOneTile
* draw one tile at the given coordinates * @param x tile X coordinate [1 - 5] * @param y tile Y coordinate [1 - 5] * @param value tile value, in
2024 - 2048 over 13/js/renderer.js:123
↓ 2 callers
Function
getnotefreq
(n)
2024 - 2048 over 13/js/player-small.js:62
↓ 2 callers
Function
getnotefreq
(n)
2014 - weasels/player-small.js:61
↓ 2 callers
Method
loadGame
* Loads the game progress from a previously saved game * @param gameProgress saved data, retrieved from local storage
2024 - 2048 over 13/js/engine.js:86
↓ 2 callers
Method
notifySave
* Save the current game and settings to local storage * * Called when a manual or auto save of the game in progress is requested * Uses a notif
2024 - 2048 over 13/js/game.js:202
↓ 2 callers
Method
recordCombo
* Internal method to record a combo (8 4 1 turning to 13) * Combo is added to the list this.combos * * @param id0 id of the left or upper tile
2024 - 2048 over 13/js/engine.js:225
↓ 2 callers
Method
setGameOver
* Set the text for first menu entry * @param gameOver true for "GAME OVER", false for "RESUME"
2024 - 2048 over 13/js/renderer.js:384
↓ 2 callers
Method
setSaved
* Set the text for fourth menu entry * @param saved true for "SAVED", false for "SAVE GAME"
2024 - 2048 over 13/js/renderer.js:392
↓ 2 callers
Method
triggerMerge
* Internal method to initiate merges when two identical tiles are one above the other, * removing the upper tile from this.tiles * Also causes the
2024 - 2048 over 13/js/engine.js:169
↓ 2 callers
Function
voice_lead2
(i, voice_nr)
2013 - staccato/chiptune.js:44
↓ 2 callers
Method
writeToStorage
* Save current settings and game to local storage
2024 - 2048 over 13/js/game.js:215
↓ 1 callers
Function
audioContents
()
2013 - staccato/chiptune.js:131
↓ 1 callers
Method
checkFor13
* Internal method to mutate blocks of 8,4,1 to 13 * * @return true if merge initiated, false if nothing moves
2024 - 2048 over 13/js/engine.js:244
↓ 1 callers
Function
createNote
(instr, n, rowLen)
2024 - 2048 over 13/js/player-small.js:67
↓ 1 callers
Function
createNote
(instr, n)
2014 - weasels/player-small.js:66
↓ 1 callers
Method
drawCombo
* Draw a combo (three tiles merging to 13) * @param combo structure containing values and coordinates of the three tiles
2024 - 2048 over 13/js/renderer.js:161
↓ 1 callers
Function
newCycle
* New cycle for all started games. For each player : * - validate activity change for each * - gain action points (3 to 5 depending on activity)
2015 - alive'n'loaded/nodeServer.js:38
↓ 1 callers
Function
osc_sin
(value)
2024 - 2048 over 13/js/player-small.js:44
↓ 1 callers
Function
osc_sin
(value)
2014 - weasels/player-small.js:43
↓ 1 callers
Function
registerControllerEvents
(controller)
2018 - line of fire/js/main.js:53
↓ 1 callers
Function
voice_arp2
(i)
2013 - staccato/chiptune.js:67
↓ 1 callers
Function
voice_bass2
(i)
2013 - staccato/chiptune.js:87
↓ 1 callers
Function
voice_drum
(i)
2013 - staccato/chiptune.js:115
↓ 1 callers
Function
voice_snare
(i)
2013 - staccato/chiptune.js:102
Function
AIPlayer
* @constructor
2018 - line of fire/js/aiplayer.js:4
Function
CPlayer
()
2024 - 2048 over 13/js/player-small.js:37
Function
CPlayer
()
2014 - weasels/player-small.js:36
Function
Controls
* @constructor
2019 - infiltration/js/controls.js:4
Function
Controls
* @constructor
2018 - line of fire/js/controls.js:4
Function
Controls
* @constructor
2013 - staccato/controls.js:4
Function
Controls
* @constructor
2015 - alive'n'loaded/controls.js:4
Function
Controls
* @constructor
2017 - escape/js/controls.js:4
Function
Controls
* @constructor
2014 - weasels/controls.js:4
Function
Controls
* @constructor
2016 - diamond run/js/controls.js:4
Function
Critter
* Ingame world : scenery, objects and critters * @constructor
2014 - weasels/critter.js:5
Function
Game
* Main application class * * The state member variable defines the current screen : * -3 : game intro * -2 : controls setup from pause menu (ing
2019 - infiltration/js/game.js:17
Function
Game
* Main application class * * The state member variable defines the current screen : * -1 : startup * 0 : main menu * 1 : game in progress *
2018 - line of fire/js/game.js:13
Function
Game
* Main application class * * The state member variable defines the current screen : * -2 : controls setup from pause menu (ingame) * -1 : contro
2013 - staccato/game.js:15
Function
Game
* Main application class * * The state member variable defines the current screen : * 0 : * 1 : join game menu * 2 : game in progress *
2015 - alive'n'loaded/game.js:13
Function
Game
* @constructor
2015 - alive'n'loaded/nodeServer.js:93
Function
Game
* Main application class * * The state member variable defines the current screen : * 0 : main menu / game over * 1 : game in progress * 2
2017 - escape/js/game.js:11
Function
Game
* Main application class * * The state member variable defines the current screen : * 0 : main menu * 1 : level intro screen * 2 : game in
2014 - weasels/game.js:13
Function
Game
* Main application class * * The state member variable defines the current screen : * 0 : main menu * 1 : tutorial * 2 : game in progress
2016 - diamond run/js/game.js:12
Function
LevelLoader
* @constructor
2014 - weasels/levelLoader.js:5
Function
LevelLoader
* @constructor
2016 - diamond run/js/levelLoader.js:5
Function
MenuDriver
* MenuDriver constructor. * All actions are assigned by default to the leave action * @constructor * @param columnCount : number of columns in t
2019 - infiltration/js/menuDriver.js:26
Function
MenuDriver
* MenuDriver constructor. * All actions are assigned by default to the leave action * @constructor * @param columnCount : number of columns in t
2013 - staccato/menuDriver.js:26
Function
MenuDriver
* MenuDriver constructor. * All actions are assigned by default to the leave action * @constructor * @param lineCount : number of lines in the m
2016 - diamond run/js/menuDriver.js:28
Function
OverlayRenderer
* OverlayRenderer constructor * @param canvas the canvas to draw on. * @constructor
2019 - infiltration/js/overlayRenderer.js:10
Function
OverlayRenderer
* OverlayRenderer constructor * @param canvas the canvas to draw on. * @constructor
2013 - staccato/overlayRenderer.js:10
Function
PersistentData
* @constructor
2019 - infiltration/js/persistentData.js:12
Function
PersistentData
* @constructor
2018 - line of fire/js/persistentData.js:12
Function
PersistentData
* @constructor
2013 - staccato/persistentData.js:12
Function
PlayField
* @constructor
2014 - weasels/playField.js:5
Function
Player
* @constructor
2015 - alive'n'loaded/nodeServer.js:304
Function
Race
* @constructor
2013 - staccato/race.js:4
Function
Renderer
* Graphics renderer, in charge of displaying all game gfx to the page canvases * Handles all ingame modes and planes. * @constructor * @param scen
2018 - line of fire/js/renderer.js:10
Function
Renderer
* @constructor
2013 - staccato/renderer.js:4
Function
Renderer
* @constructor
2015 - alive'n'loaded/renderer.js:5
Function
Renderer
* Graphics renderer, in charge of displaying all game gfx to the page canvases * Handles all ingame modes and planes. * @constructor * @param scen
2017 - escape/js/renderer.js:11
Function
Renderer
* @constructor
2014 - weasels/renderer.js:5
Function
Renderer
* @constructor
2016 - diamond run/js/renderer.js:5
next →
1–100 of 135, ranked by callers