GithubHelp home page GithubHelp logo

heaj-services-solutions / bare.game Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sysrpl/bare.game

0.0 0.0 0.0 113.76 MB

An open source modern minimal game cross platform gaming library

Shell 0.24% PHP 0.11% Pascal 99.43% HTML 0.22%

bare.game's Introduction

Bare Game

Bare Game is a open source modern minimal game cross platform gaming library. It was conceived to take the SDL 2.0 game library and pair it with the Free Pascal Compiler, combining Free Pascal's write once compile anywhere philosophy with with SDL 2.0 ability to empower games on every platform. Bare Game wraps SDL 2.0 functions and defines in an extremely easy to reuse class library. It takes care of all the boilerplate plumbing required to get a game started and running on a variety of platforms, empowering you, the game creator, to focus on what you want to do, designing your game.

Links

Install

Install SDL 2 on your system. Ubuntu users type sudo apt get install libsdl2-2.0-0. Windows users download SDL 2, extract the zip file, and place SDL2.dll in your C:\Windows\System32 folder.

Install Free Pascal fixes 3.0 and Lazarus, either using getlazarus.org or make it yourself.

To get Bare Game, if you have git installed you may type:

git clone https://github.com/sysrpl/Bare.Game.git

Otherwise download a zip file from github and extract it.

Open Lazaurs, from the main menu select "Packages | Open Package File" and browse to "Bare.Game/source/barerun.lpk". In the packge window press compile.

From the Lazarus main menu select "Packages | Open Package File" and browse to "Bare.Game/tools/design/baredsgn.lpk". In the packge window press "Use | Install". Lazarus will rebuild itself.

If you recieve and error in splash.pas with a value of fsBlack, change it to clBlack, save the file, and repeat the step above.

When Lazarus restarts, select "File | New ... | Project | Game Project" from the main menu. You should see this skeletal program listing.

program Game1;

{$mode delphi}

uses
  Bare.Game;

{ TWindow1 }

type
  TWindow1 = class(TWindow)
  protected
    procedure Logic(Stopwatch: TStopwatch); override;
    procedure Render(Stopwatch: TStopwatch); override;
  end;

procedure TWindow1.Logic(Stopwatch: TStopwatch);
begin
  { Place your game logic code here }
end;

procedure TWindow1.Render(Stopwatch: TStopwatch);
begin
  { Place your game rendering code here }
end;

begin
  Application.Run(TWindow1);
end.

Press F9 to run the example. You should see a black window with the title "TWindow1". Next open the project "Bare.Game/examples/draw/draw.lpi" and press F9. You should see a window with an animated neon cursor and some instructional text. If both of those test pass, you've got a working install of Bare Game.

More information

Bare Game has several features which endeavor to simplify tasks for game makers including:

  • Creating and managing one or more game windows
  • Reading mouse keyboard gamepad and touch input states
  • Accessing a hardware accelerated graphics pipeline and using shader programs
  • Loading and saving image resources using a variety of formats
  • Playing back and mixing audio
  • Creating animations and storyboards
  • Drawing in two dimensions with vector graphics and sprites
  • Network communications

Bare Game also and has built in multithreaded support for separate game logic, render code, and user interface code.

If you want to take part in Bare Game discussions join us on the community forums.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.