没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > fallenge |
fallenge
|
0 | 0 | 7 |
贡献者 | 讨论 | 代码提交 |
FallenGEFallenGE (Game Engine) is a complete solution for witting games in c#. The engine makes use of various free libraries, such as Tao, and combines them together into a nice neat package to make writing a game as easy as possible.
FeaturesA simple interface for creating games. Rendering engine written in OpenGL. Sprite management. Audio playback via OpenAL. File management via PhysFS. Supports all image formats supported by DevIL. Mouse/Keyboard Input support. Basic Shader support. Physics support via Physics2D (Work in Progress). A logical game creation process which lets you create various screens which your game may change between. ExampleA working ghost shell application written using the engine can be found below:
MyGame.cs
namespace FallenGE_Game1.Game
{
class MyGame : GameManager
{
public override void Startup()
{
// Create the engine.
CreateEngine();
// Create the game context.
CreateGame("Test Application", "data/", 640, 480, 32, false);
// Setup some reneder properties.
engine.RenderManager.SetMaskColor(255, 0, 255);
engine.RenderManager.SetDrawAlpha(1.0f);
engine.RenderManager.SetOffset(-0.5f, -0.5f);
// Add our screen.
AddScreen("Start", new MyScreen(engine));
}
public override void Shutdown()
{
// Destroy the engine.
DestroyEngine();
}
public override void Render()
{
// Render the current screen.
currentScreen.Render();
}
public override void Update(float delta)
{
// Update the current screen.
currentScreen.Update(delta);
// If the screen has set next screen, change to that screen.
if (currentScreen.NextScreen != "")
ChangeScreen(currentScreen.NextScreen);
}
}
}MyScreen.cs
namespace FallenGE_Game1.Game.Screens
{
class MyScreen : Screen
{
public MyScreen(Engine engine) : base(engine)
{
}
public override void Load()
{
// Load some cool media.
}
public override void Unload()
{
// Unload the media.
}
public override void TransIn()
{
// Smooth transition into the screen.
}
public override void TransOut()
{
// Smooth transition out of the screen.
}
public override void Render()
{
// Clear the screen.
engine.RenderManager.Cls();
// Render cool stuff.
// Flip the screen buffers.
engine.RenderManager.Flip();
}
public override void Update(float delta)
{
// Update the screen.
}
}
}Screenshots
Thanks toThe authors of the TaoFramework. The author of Physics2D. The authors of BlitMax, A language which influenced the design of the engine. The authors of SlimDX.