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
public class Galaxy extends BaseRoom {
private Stage stage;
private SquidLayers display;
private SpriteBatch spriteBatch;
public Galaxy(int galaxySize, SpriteBatch spriteBatch) {
this.galaxySize = galaxySize;
this.spriteBatch = spriteBatch;
for(int px = 0; px < planet.getSolarSystemViewSprite().size(); px++) {
for(int py = 0; py < planet.getSolarSystemViewSprite().get(0).size(); py++) {
if(planet.getSolarSystemViewCircleMask().get(px).get(py) != 0 && planet.getSolarSystemViewCircleMask().get(px).get(py) != 1)
buffer[px+i-planet.getSolarSystemViewSprite().size()][py+j-planet.getSolarSystemViewSprite().size()/2] = new CelestialBody(' ', null, planet.getSolarSystemViewSprite().get(px).get(py), planet.getDescription());
}
}
&&&&&&&&&&######
&&eeeeeeeeeeeeeeee&&&&&&######%%
&&oooo********ooooooeeeeee&&&&########%%
oo****!!!!!!!!******ooooooeeee&&&&########%%
eeoo**!!!!::::::::!!!!******ooooeeee&&&&########%%%%
ee**!!::::::....::::::!!!!!!**ooooeeee&&&&&&########%%%%
ee**!!::..............::::!!!!****ooooeeee&&&&########%%%%%%
ee**!!::..................::::!!!!**ooooeeee&&&&##########%%%%%%
oo!!::....................::::!!!!****ooeeee&&&&&&########%%%%%%
oo**::......................::::!!!!****ooeeee&&&&&&##########%%%%%%
package com.carterza;
import java.util.stream.IntStream;
public class PlanetTest2 {
static char[] textShades;
public static void main(String[] args) {
double[] light = normalize(new double[]{30,30,-50});
// Working
private static double dot (double[] v1, double[] v2) {
double d = v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
if(d < 0) return -d;
return 0;
}
// Non-working
private static double dot(double[] v1, double[] v2) {
double d = v1[0]*v2[0] + v1[1] * v2[1] + v1[2] + v2[2];
verts =
[
{ p: new Vector3(0, +dv, +du), e: [], f: [] },
{ p: new Vector3(0, +dv, -du), e: [], f: [] },
{ p: new Vector3(0, -dv, +du), e: [], f: [] },
{ p: new Vector3(0, -dv, -du), e: [], f: [] },
{ p: new Vector3(+du, 0, +dv), e: [], f: [] },
{ p: new Vector3(-du, 0, +dv), e: [], f: [] },
{ p: new Vector3(+du, 0, -dv), e: [], f: [] },
{ p: new Vector3(-du, 0, -dv), e: [], f: [] },
package com.carterza.geom;
/**
* Created by zachcarter on 12/14/16.
*/
public class Icosahedron {
IcosahedronNode[] nodes;
IcosahedronEdge[] edges;
IcosahedronFace[] faces;
package com.carterza.geom.util;
import com.badlogic.gdx.graphics.Mesh;
import com.badlogic.gdx.graphics.VertexAttribute;
import com.badlogic.gdx.graphics.VertexAttributes;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.utils.BufferUtils;
import com.carterza.geom.Node;
import com.carterza.geom.PanGraph;
import com.carterza.geom.Point;
package com.carterza.example;
import android.app.Activity;
import android.content.Intent;
import com.carterza.AndroidLauncher;
import com.spotify.sdk.android.authentication.AuthenticationClient;
import com.spotify.sdk.android.authentication.AuthenticationRequest;
import com.spotify.sdk.android.authentication.AuthenticationResponse;
package com.carterza.example;
import android.app.Activity;
import android.content.Intent;
import com.carterza.AndroidLauncher;
import com.spotify.sdk.android.authentication.AuthenticationClient;
import com.spotify.sdk.android.authentication.AuthenticationRequest;
import com.spotify.sdk.android.authentication.AuthenticationResponse;