Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
Experimental build containing new renderer and APIs for testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
jessefreeman committed Dec 18, 2020
1 parent 9517cee commit 10c0543
Show file tree
Hide file tree
Showing 1,438 changed files with 8,266 additions and 17,889 deletions.
Empty file modified .github/CODE_OF_CONDUCT.md
100644 → 100755
Empty file.
Empty file modified .github/CONTRIBUTING.md
100644 → 100755
Empty file.
Empty file modified .github/FUNDING.yml
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/bug_report.md
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/feature_request.md
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/question.md
100644 → 100755
Empty file.
Empty file modified .github/changelog.json
100644 → 100755
Empty file.
Empty file modified .github/changelog.yml.bak
100644 → 100755
Empty file.
Empty file modified .github/labeler.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/community.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/pixel-vision-8-feature-builder.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/pixel-vision-8-release-builder.yml
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .gulp/gulpfile.js
100644 → 100755
Empty file.
Empty file modified .gulp/package.json
100644 → 100755
Empty file.
Empty file modified .gulp/tasks/build.js
100644 → 100755
Empty file.
Empty file modified .gulp/tasks/content.js
100644 → 100755
Empty file.
Empty file modified .gulp/tasks/documentation.js
100644 → 100755
Empty file.
Empty file modified .gulp/tasks/platforms/linux-x64.js
100644 → 100755
Empty file.
Empty file modified .gulp/tasks/platforms/osx-x64.js
100644 → 100755
Empty file.
Empty file modified .gulp/tasks/platforms/win-x64.js
100644 → 100755
Empty file.
Empty file modified .gulp/tasks/release.js
100644 → 100755
Empty file.
Empty file modified .gulp/tasks/runner.js
100644 → 100755
Empty file.
Empty file modified .gulp/tasks/tutorials.js
100644 → 100755
Empty file.
Empty file modified .gulp/templates/Info.plist
100644 → 100755
Empty file.
Empty file modified .gulp/templates/bios-template.json
100644 → 100755
Empty file.
Empty file modified .gulp/templates/runner-files.json
100644 → 100755
Empty file.
Empty file modified Content/Effects/crt-lottes-mg.ogl.mgfxo
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/BootTool/boot-text.lua
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/BootTool/code.lua
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/BootTool/colors.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Content/PixelVisionOS/Tools/BootTool/data.json
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/BootTool/info.json
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/BootTool/large.font.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Content/PixelVisionOS/Tools/BootTool/music.json
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/BootTool/sb-sprites.lua
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/BootTool/small.font.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Content/PixelVisionOS/Tools/BootTool/sounds.json
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/BootTool/sprites.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Content/PixelVisionOS/Tools/BootTool/tilemap.json
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/BootTool/tilemap.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Content/PixelVisionOS/Tools/ErrorTool/code.lua
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/ErrorTool/colors.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Content/PixelVisionOS/Tools/ErrorTool/data.json
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/ErrorTool/info.json
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/ErrorTool/large.font.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Content/PixelVisionOS/Tools/ErrorTool/sb-sprites.lua
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/ErrorTool/sounds.json
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/ErrorTool/sprites.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Content/PixelVisionOS/Tools/ErrorTool/tilemap.json
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/LoadTool/code.lua
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/LoadTool/colors.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Content/PixelVisionOS/Tools/LoadTool/data.json
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/LoadTool/info.json
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/LoadTool/large.font.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Content/PixelVisionOS/Tools/LoadTool/sb-sprites.lua
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/LoadTool/sounds.json
100644 → 100755
Empty file.
Empty file modified Content/PixelVisionOS/Tools/LoadTool/sprites.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Content/PixelVisionOS/Tools/LoadTool/tilemap.json
100644 → 100755
Empty file.
Empty file modified Content/bios.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/AddScript/code.lua
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/AddScript/colors.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Disks/APIExamples/AddScript/data.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/AddScript/info.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/AddScript/large.font.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions Disks/APIExamples/BackgroundColor/code.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
Pixel Vision 8 - BackgrondColor Example
Copyright (C) 2017, Pixel Vision 8 (http://pixelvision8.com)
Created by Jesse Freeman (@jessefreeman)
Learn more about making Pixel Vision 8 games at
https://www.pixelvision8.com/getting-started
**/

using PixelVision8.Engine.Chips;

namespace PixelVision8.Examples
{
class BackgroundColorExample : GameChip
{
public override void Init()
{
// Get the current background color
var defaultColor = BackgroundColor();

// Draw the default background color ID to the display
DrawText("Default Color " + defaultColor, 1, 1, DrawMode.Tile, "large", 15);

// Here we are manually changing the background color
var newColor = BackgroundColor(2);

// Draw the new color ID to the display
DrawText("New Color " + newColor, 1, 3, DrawMode.Tile, "large", 15);
}

public override void Draw()
{
//Redraw the display
RedrawDisplay();
}
}
}
Empty file modified Disks/APIExamples/BackgroundColor/code.lua
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/BackgroundColor/colors.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Disks/APIExamples/BackgroundColor/data.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/BackgroundColor/info.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/BackgroundColor/large.font.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions Disks/APIExamples/Button/code.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/**
Pixel Vision 8 - Button Example
Copyright (C) 2017, Pixel Vision 8 (http://pixelvision8.com)
Created by Jesse Freeman (@jessefreeman)
Learn more about making Pixel Vision 8 games at
https://www.pixelvision8.com/getting-started
**/

using PixelVision8.Engine.Chips;
using System.Collections.Generic;

namespace PixelVision8.Examples
{
class ButtonExample : GameChip
{
// This array will store any buttons pressed during the current frame
private List<string> pressedButtons = new List<string>();

// A list of all the buttons to check on each frame
private Buttons[] buttons =
{
Buttons.Up,
Buttons.Down,
Buttons.Left,
Buttons.Right,
Buttons.A,
Buttons.B,
Buttons.Select,
Buttons.Start
};

public override void Update(int timeDelta)
{

// Clear the pressedButtons array on each frame
pressedButtons.Clear();

// Loop through all the buttons
for (int i = 0; i < buttons.Length; i++)
{

// Test if player 1's current button is down and save it to the pressedButtons array
if (Button(buttons[i], InputState.Down, 0))
{
pressedButtons.Add(buttons[i].ToString());
}

}
}

public override void Draw()
{

// Clear the display
Clear();

// Convert the pressedButtons into a string and draw to the display
var message = string.Join(", ", pressedButtons.ToArray()).ToUpper();
DrawText("Buttons Down:", 8, 8, DrawMode.Sprite, "large", 15);
DrawText(message.Substring(0, message.Length), 8, 16, DrawMode.Sprite, "medium", 14, -4);

}
}
}
Empty file modified Disks/APIExamples/Button/code.lua
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/Button/colors.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Disks/APIExamples/Button/data.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/Button/info.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/Button/large.font.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Disks/APIExamples/Button/medium.font.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions Disks/APIExamples/CalculateDistance/code.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/**
Pixel Vision 8 - CalculateDistance Example
Copyright(C) 2017, Pixel Vision 8 (http://pixelvision8.com)
Created by Jesse Freeman(@jessefreeman)
This project was designed to display some basic instructions when you create
a new game.Simply delete the following code and implement your own Init(),
Update() and Draw() logic.
Learn more about making Pixel Vision 8 games at
https://www.pixelvision8.com/getting-started
**/

using Microsoft.Xna.Framework;
using PixelVision8.Engine;
using PixelVision8.Engine.Chips;

namespace PixelVision8.Examples
{
class CalculateDistanceExample : GameChip
{
private Point pointA = new Point(8, 8);
private Point pointB = new Point(248, 232);
private Canvas canvas;
private int distance;

public override void Init()
{

// Create a new canvas and pass this GameChip into the constructor
canvas = new Canvas(256, 240, this);

// Set the canvas stroke to a white 1x1 pixel brush
canvas.SetStroke(new[] { 15 }, 1, 1);

}

public override void Update(int timeDelta)
{

// Update position B with the MousePosition
pointB = MousePosition();

// Calculate the distance between pointA and pointB
distance = CalculateDistance(pointA.X, pointA.Y, pointB.X, pointB.X);

}

public override void Draw()
{

// Redraw the display
RedrawDisplay();

// Clear the canvas with the background color
canvas.Clear(0);

// Draw 2 circles around each point
canvas.DrawCircle(pointA.X - 4, pointA.Y - 4, pointA.X + 4, pointA.Y + 4);
canvas.DrawCircle(pointB.X - 4, pointB.Y - 4, pointB.X + 4, pointB.Y + 4);

// Draw a line between the two points
canvas.DrawLine(pointA.X, pointA.Y, pointB.X, pointB.Y);

// Draw the distance value above pointB
canvas.DrawText(distance.ToString(), pointB.X, pointB.Y - 12, "small", 15, -4);

// Draw the canvas to the display
canvas.DrawPixels();

}
}
}
Empty file modified Disks/APIExamples/CalculateDistance/code.lua
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/CalculateDistance/colors.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Disks/APIExamples/CalculateDistance/data.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/CalculateDistance/info.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/CalculateDistance/small.font.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions Disks/APIExamples/CalculateIndex/code.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
Pixel Vision 8 - CalculateIndex Example
Copyright(C) 2017, Pixel Vision 8 (http://pixelvision8.com)
Created by Jesse Freeman(@jessefreeman)
This project was designed to display some basic instructions when you create
a new game.Simply delete the following code and implement your own Init(),
Update() and Draw() logic.
Learn more about making Pixel Vision 8 games at
https://www.pixelvision8.com/getting-started
**/

using PixelVision8.Engine.Chips;

namespace PixelVision8.Examples
{
class CalculateIndexExample : GameChip
{

// A 1D array of example values
private string[] exampleGrid =
{
"A", "B", "C",
"D", "E", "F",
"G", "H", "I",
};

public override void Init()
{
// Calculate the center index based on a grid with 3 columns
var index = CalculateIndex(1, 1, 3);

// Draw the index and value to the display
DrawText("Position 1,1 is Index " + index + " is " + exampleGrid[index], 1, 1, DrawMode.Tile, "large",
15);

}

public override void Draw()
{
// Redraw the display
RedrawDisplay();
}

}
}
Empty file modified Disks/APIExamples/CalculateIndex/code.lua
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/CalculateIndex/colors.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Disks/APIExamples/CalculateIndex/data.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/CalculateIndex/info.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/CalculateIndex/large.font.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions Disks/APIExamples/CalculatePosition/code.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
Pixel Vision 8 - CalculatePosition Example
Copyright(C) 2017, Pixel Vision 8 (http://pixelvision8.com)
Created by Jesse Freeman(@jessefreeman)
This project was designed to display some basic instructions when you create
a new game.Simply delete the following code and implement your own Init(),
Update() and Draw() logic.
Learn more about making Pixel Vision 8 games at
https://www.pixelvision8.com/getting-started
**/

using PixelVision8.Engine.Chips;

namespace PixelVision8.Examples
{
class CalculatePositionExample : GameChip
{
// A 1D array of example values
private string[] exampleGrid =
{
"A", "B", "C",
"D", "E", "F",
"G", "H", "I",
};

public override void Init()
{
var index = 4;

// Calculate the center index based on a grid with 3 columns
var position = CalculatePosition(index, 3);

// Draw the index and value to the display
DrawText("Position " + position.X + "," + position.Y + " at Index " + index + " is " + exampleGrid[index], 1, 1, DrawMode.Tile, "large", 15);

}

public override void Draw()
{
// Redraw the display
RedrawDisplay();
}

}
}
Empty file modified Disks/APIExamples/CalculatePosition/code.lua
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/CalculatePosition/colors.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Disks/APIExamples/CalculatePosition/data.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/CalculatePosition/info.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/CalculatePosition/large.font.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Disks/APIExamples/CalculatePosition/medium.font.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Disks/APIExamples/CalculatePosition/music.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/CalculatePosition/small.font.png
100644 → 100755
Empty file modified Disks/APIExamples/CalculatePosition/sounds.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/CalculatePosition/sprites.png
100644 → 100755
Empty file modified Disks/APIExamples/CalculatePosition/tilemap.json
100644 → 100755
Empty file.
60 changes: 60 additions & 0 deletions Disks/APIExamples/CharacterToPixelData/code.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/**
Pixel Vision 8 - CharacterToPixelData Example
Copyright(C) 2017, Pixel Vision 8 (http://pixelvision8.com)
Created by Jesse Freeman(@jessefreeman)
This project was designed to display some basic instructions when you create
a new game.Simply delete the following code and implement your own Init(),
Update() and Draw() logic.
Learn more about making Pixel Vision 8 games at
https://www.pixelvision8.com/getting-started
**/

using PixelVision8.Engine.Chips;

namespace PixelVision8.Examples
{
class CharacterToPixelDataExample : GameChip
{

private int[] pixelData;

public override void Init()
{

// Get the raw pixel data for the A character
pixelData = CharacterToPixelData('A', "large");

// Loop through all of the pixels
for (int i = 0; i < pixelData.Length; i++)
{

// Test to see if the pixel is set to the color ID 0
if (pixelData[i] == 0)
{

// Change the color ID to 14
pixelData[i] = 14;

}

}

}

public override void Draw()
{

// Redraw display
RedrawDisplay();

// Use the normal DrawText() API to display the A
DrawText("A", 8, 8, DrawMode.Sprite, "large", 15);

// Draw the pixel data to the display next to the A
DrawPixels(pixelData, 16, 8, 8, 8);

}
}
}
Empty file modified Disks/APIExamples/CharacterToPixelData/code.lua
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/CharacterToPixelData/colors.png
100644 → 100755
Empty file modified Disks/APIExamples/CharacterToPixelData/data.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/CharacterToPixelData/info.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/CharacterToPixelData/large.font.png
100644 → 100755
55 changes: 55 additions & 0 deletions Disks/APIExamples/Clamp/code.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/**
Pixel Vision 8 - Clamp Example
Copyright(C) 2017, Pixel Vision 8 (http://pixelvision8.com)
Created by Jesse Freeman(@jessefreeman)
This project was designed to display some basic instructions when you create
a new game.Simply delete the following code and implement your own Init(),
Update() and Draw() logic.
Learn more about making Pixel Vision 8 games at
https://www.pixelvision8.com/getting-started
**/

using PixelVision8.Engine.Chips;

namespace PixelVision8.Examples
{
class ClampExample : GameChip
{

private int counter;
private int time;
private int delay = 300;

public override void Update(int timeDelta)
{
// Add the time delay to the time
time = time + timeDelta;

// Check if time is greater than the delay
if (time > delay)
{

// Increase the counter by 1
counter = Clamp(counter + 1, 0, 10);

// Reset the time
time = 0;

}
}

public override void Draw()
{

// Redraw the display
RedrawDisplay();

// Draw the counter to the display
DrawText("Counter " + counter, 8, 8, DrawMode.Sprite, "large", 15);

}

}
}
Empty file modified Disks/APIExamples/Clamp/code.lua
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/Clamp/colors.png
100644 → 100755
Empty file modified Disks/APIExamples/Clamp/data.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/Clamp/info.json
100644 → 100755
Empty file.
Empty file modified Disks/APIExamples/Clamp/large.font.png
100644 → 100755

0 comments on commit 10c0543

Please sign in to comment.