-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the vbPixelGameEngine wiki!
vbPixelGameEngine is a prototyping and game-engine framework (assembly) created in Visual Basic and .NET (currently version 8). It is cross platform, able to target Windows and Linux. On Windows, there are no additional dependencies outside of .NET. On Linux, it relies on a couple of dependencies that typically come as standard. This project is heavily inspired by olc::PixelGameEngine and will continue to strive to remain very similar in API as to allow vbPixelGameEngine to be used to follow along with @javidx9 videos except, of course, using VB instead of C++. I highly recommend his videos!
vbPixelGameEngine allows you to rapidly develop prototypes and games. It does this by creating a window and rapidly drawing to that window. It is sensitive to keyboard and mouse input. The Screen is considered to be a 2D array of Pixels. Pixels have a defined width and height in real screen-pixels. This means your application can be low or high resolution depending on the look and sophistication you are seeking. Each pixel stores a 32-bit ARGB color code. Basic drawing tools for manipulating the Screen are provided.
By design, the vbPixelGameEngine requires very little "boilerplate" effort from the user allowing you to focus on getting on with creating the fun parts of the application. The aesthetic the vbPixelGameEngine provides is suitable for both detailed applications and retro/indie looking titles. Image resources used by the engine are stored as PNG files.
It is not a replacement for something as sophisticated as FNA, SDL2, etc.
- Create a new Console project.
- Add a reference to the library.
- Create a new Class and Inherit from vbPixelGameEngine.PixelGameEngine.
- Optionally Override the OnUserCreate() function.
- Override the OnUserUpdate() function.
- Optionally Override the OnUserDestroy() function.
- Create an instance of the created Class from Sub Main().
- Call the Construct() method providing the screen and pixel sizes.
- If Construct() return True, call Start().
Imports VbPixelGameEngine
Friend Module Program
Sub Main()
Dim game As New Example
If game.Construct(256, 240, 4, 4) Then
game.Start()
End If
End Sub
End Module
Friend Class Example
Inherits PixelGameEngine
Friend Sub New()
AppName = "Example"
End Sub
Protected Overrides Function OnUserCreate() As Boolean
' Called once at the start, create stuff here.
Return True
End Function
Protected Overrides Function OnUserUpdate(elapsedTime As Single) As Boolean
' Called once per frame.
For x = 0 To ScreenWidth() - 1
For y = 0 To ScreenHeight() - 1
Draw(x, y, Pixel.Random())
Next
Next
Return True
End Function
End Class
YES!!! vbPixelGameEngine is released under the MIT license.
With that said, the right thing to do would be to contribute back to this repo any improvements and additions so that future others can benefit and would like to make this repo the place to find vbPixelGameEngine; let's strive to make this a community project. Additionally, OneLoneCoder should be given some sort of credit as this project wouldn't exist without his; and please make this attribution visible in some manner. In other words, please do your part to help spread the word about vbPixelGameEngine, OneLoneCoder's olc::PixelGameEngine and @javidx9 videos!
- Customizable Pixel size
- Customizable Screen size
- Full 32-Bit Color
- Alpha Blending Transparency
- Optimized drawing routines
- Points
- Lines
- Circles
- Filled shapes
- Sprites
- Uses PNG assets
- Supports Windows & Linux
- Requires minimal dependencies
- OpenGL 1.0
- X11 (Linux)
- libpng (Linux)
- Keyboard input
- Mouse input
coming soon