在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:DevChrome/Pixel-Engine开源软件地址:https://github.com/DevChrome/Pixel-Engine开源编程语言:C# 88.0%开源软件介绍:Pixel-EngineA simple game engine for C# using OpenGL (earlier DirectX). Inspired by the olcPixelGameEngine. This game engine was ported from C++ to C# in the hopes that it will help people develop their ideas faster and not waste their time in creating the same graphics code and game loop again and again. This engine uses OpenGL and the .NET Framework, so it's quite fast due to OpenGL being hardware accelerated. Getting Started
using PixelEngine;
namespace Examples
{
public class RandomPixels : Game
{
static void Main(string[] args)
{
// Create an instance
RandomPixels rp = new RandomPixels();
// Construct the 100x100 game window with 5x5 pixels
rp.Construct(100, 100, 5, 5);
// Start and show a window
rp.Start();
}
// Called once per frame
public override void OnUpdate(float elapsed)
{
// Loop through all the pixels
for (int i = 0; i < ScreenWidth; i++)
for (int j = 0; j < ScreenHeight; j++)
Draw(i, j, Pixel.Random()); // Draw a random pixel
}
}
} PrerequisitesThere are no additional dependencies outside the Windows Api, which is present in all windows installations, and some basic .Net Framework libraries which are present with all C# installations. ExamplesThere are many examples present in the Examples folder, including Javidx9's and my own. DeploymentBuild your projects with this as a reference and run the generated .exe file. Built With
AcknowledgmentsCheck out the olcPixelGameEngine for C++ and its creator, Javidx9, his website OneLoneCoder, and the OLC-3 License in the original project. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论