Initial commit, no data is really correct.

This commit is contained in:
Robbie Antenesse 2016-04-04 17:10:40 -06:00
parent 9173e75356
commit 9b6bc0f07d
21 changed files with 1947 additions and 0 deletions

1827
Oversimplified.js Normal file

File diff suppressed because it is too large Load Diff

BIN
images/ship_d_ani.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

BIN
images/ship_dl_ani.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

BIN
images/ship_dr_ani.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

BIN
images/ship_l_ani.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

BIN
images/ship_r_ani.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

BIN
images/ship_u_ani.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

BIN
images/ship_ul_ani.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

BIN
images/ship_ur_ani.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

BIN
images/sources/ocean.pyxel Normal file

Binary file not shown.

BIN
images/sources/ship.blend Normal file

Binary file not shown.

BIN
images/sources/ship.blend1 Normal file

Binary file not shown.

BIN
images/sources/wave.pyxel Normal file

Binary file not shown.

14
index.html Normal file
View File

@ -0,0 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Game</title>
<script src="Oversimplified.js"></script>
</head>
<body>
<canvas style="border:solid 1px black;" id="game">
Your browser is really old, dude - no canvas support! Update this thing!
</canvas>
<div id="audio"></div>
</body>
</html>

9
loadControls.js Normal file
View File

@ -0,0 +1,9 @@
var ct_up = OS.C.Add("WASD Up", OS.Keycode.w);
var ct_left = OS.C.Add("WASD Left", OS.Keycode.a);
var ct_down = OS.C.Add("WASD Down", OS.Keycode.s);
var ct_right = OS.C.Add("WASD Right", OS.Keycode.d);
var ct_shift = OS.C.Add("Shift", OS.Keycode.shift);
var ct_space = OS.C.Add("Space", OS.Keycode.space);
function loadControls () {}

8
loadGameManager.js Normal file
View File

@ -0,0 +1,8 @@
var Game = {};
G = Game;
G.pixelSize = 4;
G.player = {};
G.map = {};
function loadGameManager () {}

4
loadPrefabs.js Normal file
View File

@ -0,0 +1,4 @@
function loadPrefabs() {
OS.AddScript("prefabs/shipPrefab.js");
OS.AddScript("prefabs/islandPrefab.js");
}

9
loadRooms.js Normal file
View File

@ -0,0 +1,9 @@
var rm_TitleScreen = OS.R.Add("Default", OS.camera.width, OS.camera.height, "");
var rm_Ocean = OS.R.Add("Ocean", 64 * 1000 * G.pixelSize, 64 * 1000 * G.pixelSize, "");
function loadRooms() {
OS.AddScript("rooms/titleScreen.js");
OS.AddScript("rooms/oceanRoom.js");
OS.SetRoom(rm_TitleScreen);
}

33
rooms/oceanRoom.js Normal file
View File

@ -0,0 +1,33 @@
function oceanRoom () {
// When room is loaded, explicitly set room to rm_Ocean, just in case "Default" doesn't work/is loaded too slowly
OS.SetRoom(rm_Ocean);
}
rm_Ocean.DoFirst = function () {
//Hide cursor when playing (only use if masking the cursor with another object)
//OS.canvas.style.cursor = "none";
// Create objects on room start. This is best practice unless you need persistent objects.
Game.player = this.AddObject(OS.P["UFO"]);
Game.ball = this.AddObject(OS.P["Ball"]);
Game.cowboys = Math.floor(RandomRange(5, 50));
for (var i = 0; i < Game.cowboys; i++) {
this.AddObject(OS.P["Cowboy"]);
}
}
rm_Ocean.Do = function () {
if (Game.cowboys <= 0) {
OS.SetRoom(rm_Ocean);
}
}
rm_Ocean.DrawAbove = function () {
// Draw the number of cowboys remaining
if (Game.ball !== null) {
OS.context.font = "18px Impact";
OS.context.fillText(Game.cowboys, 15, 30);
}
}
rm_Ocean.DoLast = function () {
// Clear Objects on room exit. This is best practice unless you need persistent objects.
rm_Ocean.objects = {};
}

33
rooms/titleScreen.js Normal file
View File

@ -0,0 +1,33 @@
function titleScreen () {
// When room is loaded, explicitly set room to rm_TitleScreen, just in case "Default" doesn't work/is loaded too slowly
OS.SetRoom(rm_TitleScreen);
}
rm_TitleScreen.DoFirst = function () {
//Hide cursor when playing (only use if masking the cursor with another object)
//OS.canvas.style.cursor = "none";
// Create objects on room start. This is best practice unless you need persistent objects.
Game.player = this.AddObject(OS.P["UFO"]);
Game.ball = this.AddObject(OS.P["Ball"]);
Game.cowboys = Math.floor(RandomRange(5, 50));
for (var i = 0; i < Game.cowboys; i++) {
this.AddObject(OS.P["Cowboy"]);
}
}
rm_TitleScreen.Do = function () {
if (Game.cowboys <= 0) {
OS.SetRoom(rm_TitleScreen);
}
}
rm_TitleScreen.DrawAbove = function () {
// Draw the number of cowboys remaining
if (Game.ball !== null) {
OS.context.font = "18px Impact";
OS.context.fillText(Game.cowboys, 15, 30);
}
}
rm_TitleScreen.DoLast = function () {
// Clear Objects on room exit. This is best practice unless you need persistent objects.
rm_TitleScreen.objects = {};
}

10
start.js Normal file
View File

@ -0,0 +1,10 @@
OS.S.defaultStep = 1 / 120;
OS.S.SetCamera((window.innerWidth < 500) ? window.innerWidth - 10 : 500, (window.innerHeight < 800) ? window.innerHeight - 10 : 800);
function start()
{
OS.AddScript("loadControls.js");
OS.AddScript("loadGamemanager.js");
OS.AddScript("loadPrefabs.js");
OS.AddScript("loadRooms.js");
}