diff --git a/Design/banner.jpg b/Design/banner.jpg index 49804e6..bd7e10b 100644 Binary files a/Design/banner.jpg and b/Design/banner.jpg differ diff --git a/Design/juego-samples.png b/Design/juego-samples.png new file mode 100644 index 0000000..9be3341 Binary files /dev/null and b/Design/juego-samples.png differ diff --git a/Design/juego-store.jpg b/Design/juego-store.jpg index 8fdacf6..da4701a 100644 Binary files a/Design/juego-store.jpg and b/Design/juego-store.jpg differ diff --git a/Juego.Samples_Screenshot.png b/Juego.Samples_Screenshot.png new file mode 100644 index 0000000..2885ed5 Binary files /dev/null and b/Juego.Samples_Screenshot.png differ diff --git a/README.md b/README.md index 0848405..4716c77 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,17 @@ Open-source, Meadow-powered, multigame handheld console with DPads, speakers and a colored display. +#### Are you brand new to Meadow? + +If you've never deployed a Meadow app before, you'll want to check out the [Getting Started Guide](https://developer.wildernesslabs.co/Meadow/Getting_Started/) which will get your development environment up and running and validate that you can build and deploy. + ## Contents * [Purchasing or Building](#purchasing-or-building) * [Getting Started](#getting-started) * [Hardware Specifications](#hardware-specifications) -* [Building Locally](#building-locally) +* [Additional Samples](#additional-samples) * [Juego Hack Kit Version](#juego-hack-kit-version) +* [Support](#support) ## Purchasing or Building @@ -24,7 +29,7 @@ Open-source, Meadow-powered, multigame handheld console with DPads, speakers and - You can get a Juego board from the Wilderness Labs store very soon. + You can get a Juego board from the Wilderness Labs store. You can also build a simpler Juego using a monocolor display and push buttons. @@ -34,7 +39,19 @@ Open-source, Meadow-powered, multigame handheld console with DPads, speakers and ## Getting Started -To make using the hardware even simpler, we've created a Nuget package that instantiates and encapsulates the onboard hardware into a `Juego` class. +### Playing Juego + +Do you have a brand new Juego and you just wanna play some games? Check out the [Juego.Samples repo](https://github.com/WildernessLabs/Juego.Samples) with some games you can play out of the box: + +[![Screenshot of the Juego.Samples repo readme showing several games that can be played.](Design/juego-samples.png)](https://github.com/WildernessLabs/Juego.Samples) + +#### Are you brand new to Meadow? + +If you've never deployed a Meadow app before, you'll want to check out the [Getting Started Guide](https://developer.wildernesslabs.co/Meadow/Getting_Started/) which will get your development environment up and running and validate that you can build and deploy. + +### Using the Juego Hardware in your own App + +To make using the hardware even simpler, we've created a [NuGet package](https://www.nuget.org/packages/Meadow.Juego) that instantiates and encapsulates the onboard hardware into a `Juego` class. 1. Add the ProjectLab Nuget package your project: - `dotnet add package Meadow.Juego`, or @@ -131,19 +148,14 @@ public class MeadowApp : App You can find the schematics and other design files in the [Hardware folder](Source/Hardware). -## Building locally - -When using the develop branch, you'll need to clone additional Meadow repos: +## Additional Samples -- [Meadow.Core](https://github.com/WildernessLabs/Meadow.Core) -- [Meadow.Units](https://github.com/WildernessLabs/Meadow.Units) -- [Meadow.Contracts](https://github.com/WildernessLabs/Meadow.Contracts) -- [Meadow.Foundation](https://github.com/WildernessLabs/Meadow.Foundation) -- [Meadow.Logging](https://github.com/WildernessLabs/Meadow.Logging) - -Be sure to clone all these repos including `Juego` at the same folder level and set all repos to the `develop` branch. - -Also, make sure you are running the latest version of Meadow OS on your Juego v2 board. +1. **[Setup your Meadow Build Environment](http://developer.wildernesslabs.co/Meadow/Getting_Started/Deploying_Meadow/)** - If you haven't deployed a Meadow app before, you'll need to setup your IDE extension(s), deploy Meadow.OS, etc. +2. **[Run the Demo App](Source/Juego_Demo/)** - Deploy the Juego demonstration app to see the built in peripherals at work. +3. **[Check out the Juego.Samples repo](https://github.com/WildernessLabs/Juego.Samples)** - We recommend cloning the [Juego.Samples](https://github.com/WildernessLabs/Juego.Samples) repo. There you'll find a bunch of awesome samples that you can run right out-of-the box! + + juego, iot, project, samples + ## Juego Hack Kit Version @@ -180,3 +192,8 @@ Includes five games: +## Support + +Having trouble building/running these projects? +* File an [issue](https://github.com/WildernessLabs/Meadow.Desktop.Samples/issues) with a repro case to investigate, and/or +* Join our [public Slack](http://slackinvite.wildernesslabs.co/), where we have an awesome community helping, sharing and building amazing things using Meadow. \ No newline at end of file diff --git a/Source/Juego/Juego.csproj b/Source/Juego/Juego.csproj index badca15..f7b4097 100644 --- a/Source/Juego/Juego.csproj +++ b/Source/Juego/Juego.csproj @@ -24,10 +24,10 @@ - - - - - + + + + + diff --git a/Source/Juego_Demo/MeadowApp.cs b/Source/Juego_Demo/MeadowApp.cs index 65b5bd6..9a923fa 100644 --- a/Source/Juego_Demo/MeadowApp.cs +++ b/Source/Juego_Demo/MeadowApp.cs @@ -96,7 +96,11 @@ public async override Task Run() Resolver.Log.Info("Run..."); displayController?.Update(); - juego.MotionSensor?.StartUpdating(TimeSpan.FromMilliseconds(250)); + + if (juego.MotionSensor is { }) + { + juego.MotionSensor.StartUpdating(TimeSpan.FromMilliseconds(250)); + } await audioLeft.PlaySystemSound(SystemSoundEffect.PowerUp); await audioRight.PlayGameSound(GameSoundEffect.LevelComplete); diff --git a/Source/Juego_Prototype/Games/FrogIt/FrogItGame.cs b/Source/Juego_Prototype/Games/FrogIt/FrogItGame.cs index 11b26c1..67847cc 100644 --- a/Source/Juego_Prototype/Games/FrogIt/FrogItGame.cs +++ b/Source/Juego_Prototype/Games/FrogIt/FrogItGame.cs @@ -66,7 +66,7 @@ public FrogItGame(int cellSize = 8, int width = 128) public void Reset() { - gameStart = DateTime.Now; + gameStart = DateTime.UtcNow; ResetFrog(); Lives = 3; @@ -84,14 +84,14 @@ void ResetFrog() double lastTime; int count = 0; - Stopwatch sw = new Stopwatch(); + readonly Stopwatch sw = new Stopwatch(); public void Update() { - if(count == 0) + if (count == 0) { sw.Start(); } - else if(count == 100) + else if (count == 100) { sw.Stop(); Resolver.Log.Info($"100 frames took {sw.Elapsed}"); @@ -101,7 +101,7 @@ public void Update() count++; lastTime = GameTime; - GameTime = (DateTime.Now - gameStart).TotalSeconds; + GameTime = (DateTime.UtcNow - gameStart).TotalSeconds; switch (lastInput) { diff --git a/Source/Juego_Prototype/Games/Lander/LanderGame.cs b/Source/Juego_Prototype/Games/Lander/LanderGame.cs index bb1acfe..3e3426f 100644 --- a/Source/Juego_Prototype/Games/Lander/LanderGame.cs +++ b/Source/Juego_Prototype/Games/Lander/LanderGame.cs @@ -46,7 +46,7 @@ public LanderGame(int cellSize = 8, int width = 128) public void Reset() { - gameStart = DateTime.Now; + gameStart = DateTime.UtcNow; Lives = 3; @@ -70,9 +70,9 @@ void GenerateGame() public void Update() { lastTime = GameTime; - GameTime = (DateTime.Now - gameStart).TotalSeconds; + GameTime = (DateTime.UtcNow - gameStart).TotalSeconds; - switch(lastInput) + switch (lastInput) { case UserInput.Up: diff --git a/Source/Juego_Prototype/Games/Snake/SnakeGame.cs b/Source/Juego_Prototype/Games/Snake/SnakeGame.cs index 4aa3631..8bb6560 100644 --- a/Source/Juego_Prototype/Games/Snake/SnakeGame.cs +++ b/Source/Juego_Prototype/Games/Snake/SnakeGame.cs @@ -46,7 +46,7 @@ public partial class SnakeGame : IGame public bool PlaySound { get; private set; } - Random rand = new Random((int)DateTime.Now.Ticks); + readonly Random rand = new Random((int)DateTime.UtcNow.Ticks); enum CellType : byte { diff --git a/Source/Juego_Prototype/Juego_Prototype.csproj b/Source/Juego_Prototype/Juego_Prototype.csproj index 7d06503..bb962e4 100644 --- a/Source/Juego_Prototype/Juego_Prototype.csproj +++ b/Source/Juego_Prototype/Juego_Prototype.csproj @@ -16,12 +16,12 @@ - - - - - - + + + + + +