This file contains 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
//creation | |
var player_bullets : Pool<Sprite>; | |
player_bullets = new Pool<Sprite>(20, | |
function(index,total){ | |
var _sprite = new Sprite({ pos: new Vector(-999,-999), visible:false }); | |
var _projectile = _sprite.add( new Projectile({ | |
bullet_type:'player' | |
}) ); |
This file contains 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
package game; | |
import luxe.Vector; | |
import luxe.Sprite; | |
import luxe.Color; | |
import luxe.Component; | |
import phoenix.Texture; | |
class PlayerTeam extends Component { |
This file contains 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
package; | |
import luxe.Text; | |
import luxe.Color; | |
import luxe.Vector; | |
import luxe.Log.*; | |
import luxe.options.TextOptions; | |
class FPS extends Text { |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<link rel="icon" href="favicon.png"/> | |
<meta charset="utf-8"> | |
<style> | |
#app { |
This file contains 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
import luxe.Input; | |
class Main extends luxe.Game { | |
override function config(config:luxe.AppConfig) { | |
config.web.prevent_default_keys.push(Key.space); | |
return config; |
This file contains 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
Chrome Version 46.0.2490.80 (64-bit) | |
Frame 965 errors: | |
VM143:9918 ---------------------- | |
VM143:9924 INVALID_OPERATION <= drawArrays(TRIANGLES, 0, 65760) | |
[GroupMarkerNotSet(crbug.com/242999)!:D0EE0516CE7F0000]GL ERROR :GL_INVALID_OPERATION : glDrawArrays: attempt to access out of range vertices in attribute 1 |
This file contains 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
import snow.api.Debug.*; | |
import snow.types.Types; | |
import snow.modules.opengl.GL; | |
import snow.systems.audio.AudioSource; | |
import snow.systems.audio.AudioInstance; | |
import Oooh; | |
typedef UserConfig = {} |
This file contains 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
$ rm -rf bin/ | |
$ flow run | |
flow / found custom config at /Users/sven/.flow.config.json | |
flow / 1.0.0-alpha.2 (node.js v0.12.7) | |
flow / target is mac ( arch 64 ) | |
flow / haxe version 3.2.1 | |
flow / build - snow.basic 1.0.0 for mac | |
flow / build - running haxe ... |
This file contains 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
package; | |
#if cpp | |
import cpp.vm.Thread; | |
import cpp.vm.Deque; | |
#elseif neko | |
import neko.vm.Thread; | |
import neko.vm.Deque; | |
#end | |
This file contains 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
#pragma once | |
#include <stdint.h> | |
//fnv1a 32 and 64 bit hash functions | |
// key is the data to hash, len is the size of the data (or how much of it to hash against) | |
// code license: public domain or equivalent | |
// post: https://notes.underscorediscovery.com/constexpr-fnv1a/ | |
inline const uint32_t hash_32_fnv1a(const void* key, const uint32_t len) { |