Skip to content

Instantly share code, notes, and snippets.

View zacharycarter's full-sized avatar
👀
Looking for work!

Tail Wag Games zacharycarter

👀
Looking for work!
View GitHub Profile
@zacharycarter
zacharycarter / main.cpp
Created December 4, 2014 16:29
GLFW entry
#include "render.h"
#include <GLFW/glfw3.h>
#include <bgfxplatform.h>
#include <bx/thread.h>
#include <iostream>
#if !defined(ENTRY_DEFAULT_WIDTH) && !defined(ENTRY_DEFAULT_HEIGHT)
(function(document) {
'use strict';
// Initialise DataChannel.js
var datachannel = new DataChannel();
// Set the userid based on what has been defined by DataChannel
// https://github.com/muaz-khan/WebRTC-Experiment/tree/master/DataChannel#use-custom-user-ids
datachannel.userid = window.userid;
// Open a connection to Pusher
@zacharycarter
zacharycarter / superpowers.txt
Last active January 23, 2016 18:17
Superpowers build error
V-97YG3QD:superpowers (master) $ sudo npm run build
> superpowers@0.19.0 build /Users/zachcarter/Projects/superpowers
> node scripts/build.js
2016-01-23T17:26:43.486Z - Build paths: /, /SupCore, /SupClient, /server, /client, /launcher, /systems/game/SupEngine, /systems/game/SupRuntime, /systems/game/plugins/common/home, /systems/game/plugins/common/settings, /systems/game/plugins/common/textEditorWidget, /systems/game/plugins/default/arcadePhysics2D, /systems/game/plugins/default/cubicModel, /systems/game/plugins/default/documentation, /systems/game/plugins/default/font, /systems/game/plugins/default/gameSettings, /systems/game/plugins/default/light, /systems/game/plugins/default/model, /systems/game/plugins/default/projectSettings, /systems/game/plugins/default/scene, /systems/game/plugins/default/shader, /systems/game/plugins/default/sound, /systems/game/plugins/default/sprite, /systems/game/plugins/default/tileMap, /systems/game/plugins/default/transformHelpers, /systems/game/plugins/default/typescript,
package com.carterza.system.camera;
import com.artemis.Aspect;
import com.artemis.ComponentMapper;
import com.artemis.systems.IteratingSystem;
import com.carterza.component.CameraFocusComponent;
import com.carterza.component.PositionComponent;
import net.mostlyoriginal.api.system.camera.CameraSystem;
public class CameraFocusSystem extends IteratingSystem {
@Subscribe
void handleEvent(WeaponFiredEvent event) {
Vector2 position = positionComponentMapper.get(playerSystem.getPlayer().getId()).getPosition();
Entity bullet = EntityFactory.createBullet(world, position.x, position.y);
bullets.add(bullet);
PhysicsComponent physicsComponent = physicsComponentMapper.get(bullet.getId());
PositionComponent positionComponent = positionComponentMapper.get(bullet.getId());
BodyDef bodyDef = new BodyDef();
bodyDef.type = BodyDef.BodyType.DynamicBody;
package com.carterza.system.logic;
import com.artemis.Aspect;
import com.artemis.BaseSystem;
import com.artemis.ComponentMapper;
import com.artemis.Entity;
import com.artemis.systems.IteratingSystem;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.physics.box2d.*;
import com.carterza.component.PhysicsComponent;
package com.carterza.component;
import com.artemis.Component;
import com.badlogic.gdx.graphics.g2d.Animation;
/**
* Created by zachcarter on 10/12/16.
*/
public class AnimationComponent extends Component {
package com.carterza.entity;
import com.artemis.Entity;
import com.carterza.action.Action;
/**
* Created by zachcarter on 11/19/16.
*/
public class FutureEntityTurn implements Comparable<FutureEntityTurn> {
private Entity entity;
package com.carterza.entity;
import com.artemis.Entity;
import com.artemis.EntityEdit;
import com.artemis.World;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.ai.btree.utils.BehaviorTreeParser;
import com.badlogic.gdx.physics.box2d.Body;
import com.badlogic.gdx.physics.box2d.BodyDef;
import com.badlogic.gdx.physics.box2d.FixtureDef;
package com.carterza.ai.path;
import com.badlogic.gdx.ai.pfa.Connection;
import com.badlogic.gdx.ai.pfa.DefaultConnection;
import com.badlogic.gdx.ai.pfa.indexed.IndexedGraph;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.ObjectIntMap;
import squidpony.squidgrid.Direction;
import squidpony.squidmath.Coord;