martes, 29 de septiembre de 2009

MindShake schema

The composition of this engine is focused on the ease of use. We had seen others 2D engines and we decided to design MindShake with all the features we think are essential.
In this way we decided to have one main object called "Device", this element can provide access to all managers of low level elements, so we have them organized and they can be quickly accessed.
The object "Device" can give us access to:


  • Renderer (internal element, in charge of rendering)
  • Window Manager (responsible of size and position of the visual window)
  • Texture Manager (internal element to ease load and manage textures)
  • Scene Manager (manager of all objects that will be shown and his containers, layers, sprites, texts...)
  • Behavior Manager (element to control the behaviors added on our games)
  • Camera Manager (manager of all the camera objects)
  • Font Manager (manager of fonts, this fonts must be created with AngelCode Bitmat Font Generator and are loaded as textures)
  • Kinematic Manager (manager of kinematics objects)

Some of these objects will never be used by the user, like the renderer, the window manager or the texture manager that are only necessary for set some options or get information from the system. But others will be intensely used, like the Scene Manager that defines all the elements present in the world, or the Behavior Manager that handles the behaviors of the diferent details of our world.

domingo, 27 de septiembre de 2009

Embedded Tremor

Today we embedded a reduced subset of Tremor library, an optimized integer-only implementation of the OGG Vorbis decoder, thought for embedded devices.

Then, now we have our fourth optional library:
  • With OGG Vorbis embedded.
  • With Tremor embedded.
  • Without OGG Vorbis nor Tremor embedded, that permits you to link with the original libraries or your own implementation.
  • Other one without any OGG Vorbis support (small size).
This version takes only 97 KB in size.

Embedded OGG Vorbis

We are noticed that there are some people who are bothered with the fact of have to link with multiple libraries (libogg, libvorbis and libvorbisfile) only for have support for another audio format.

For this reason we made a reduced ogg vorbis library subset only for decode it. And then we included this code inside BrainWave. We said reduced because it is only 135 kb in size.

Note that the sizes of these libraries are (MinGW GCC 4.4.1):
  • libogg_static: 15 KB
  • libvorbis_static: 1313KB
  • libvorbisfile_static: 28 KB
Total: 1356 KB

Due to the fact that there can be some people that maybe want to use these 3 libs for his own purposes, or because there will be some people that maybe don’t want ogg support at all, we made three separated libraries:
  • One with OGG Vorbis embedded
  • Other one without OGG Vorbis embedded that permits you to link with the original libraries.
  • Other one without any OGG Vorbis support.
In this way, the BrainWave users can select the best choice for his app.

miércoles, 23 de septiembre de 2009

Added OGG Vorbis sound file format

Today we added support for a new file container (OGG) and for a new codec (Vorbis).

With this codec you can add great quality sounds with small size to your games or applications.

There are some people who loves this audio codec because its high compression ratio, up to 10:1, and for its great sound quality. Read the Vorbis FAQ to know more about this codec here:



martes, 22 de septiembre de 2009

Improved codec system

As promised we have improved our codec system.

Now all parsers & codecs have less lines and more clearer source code and they are simplest to understand. Furthermore, we can easily add more file formats to parse or add more audio formats to decode.

jueves, 17 de septiembre de 2009

Layer & Camera System

MindShake includes support to add layers and cameras, with no limits, you can create as many layers and objects inside layers as you want.

MindShake includes managers for layers and cameras which act as factories, so you can easily create new objects. Later, to easy access to these objects, you can store the reference or give them a name, so you can ask the managers to recover one object with its name.

By default all layers created are configured to adjust to camera renders. If the user want to have a serie of static sprites on the screen, the common way is to put them on a layer that is ignored by camera transformations.

To create a usable sprite layer you need one instance of the scene manager and then invoke the method CreateSpriteLayer.
That is done in this way:

//Obtain an instance of scene manager
pSceneManager = IDevice::GetInstance()->GetSceneManager();

//Add and modify a new layer
pLayer = pSceneManager->CreateSpriteLayer();
pLayer->EnableCameraTransformations(false);

With this example you see how to create a new sprite layer and modify it to ignore the cameras, so any sprite created into this layer will be shown relative to the upper left corner of the screen.

With the layer created you can now add one or more cameras to view diferent parts of our world.
When we add a new camera it is important to tell it the size and position of the viewport (the region where the camera content will be seen) and the dimensions of the world (the region where this camera can move).
Now you can see one example of scroll.

//Obtain an instance of camera manager
pCameraManager = IDevice::GetInstance()->GetCameraManager();
    
//Add and modify a new camera
pCamera = pCameraManager->CreateCamera2D();
pCamera->SetViewPort(0, 0, 320, 240);
pCamera->SetWorld(0, 0, 640, 480);
If our window have a 320x240 size, with this example you will see a scroll effect when move the camera around the world, because it have double size than camera viewport.

It is easy to create more cameras, you only meed to set the viewports in order to view them correctly, for example you can split the screen with three cameras, two of them at the top and one at the bottom.
//Add and modify a new camera (top left)
pCameraTopLeft = pCameraManager->CreateCamera2D();
pCameraTopLeft->SetViewPort(0, 0, 160, 120);
pCameraTopLeft->SetWorld(0, 0, 640, 480);

//Add and modify a new camera (top right)
pCameraTopRight = pCameraManager->CreateCamera2D();
pCameraTopRight->SetViewPort(160, 0, 160, 120);
pCameraTopRight->SetWorld(0, 0, 640, 480);

//Add and modify a new camera (bottom)
pCameraBottom = pCameraManager->CreateCamera2D();
pCameraBottom->SetViewPort(0, 120, 320, 120);
pCameraBottom->SetWorld(0, 0, 640, 480);
Now you can move the cameras with the SetPosition method and every viewport will automatically show the camera content.

miércoles, 16 de septiembre de 2009

Added .AU sound file format

We are noticed about some people needs support for .AU files on MACOS (or .SND files on NeXT or some *NIX systems). For this reason we added support for this file format.

Adding this format we have realized that the system of codecs could be improved, shortly we will update it.

Congratulations! Now we have another common audio file format for BrainWave and we will have an easiest audio codec system.

sábado, 12 de septiembre de 2009

Targets

Lucera Project is a small videogame company that wants to realize some basic libraries to help other ‘indie’ programmers to make games easily. Performing all difficult and cumbersome stuff to allow developers to implement their games without worrying about details like load sounds and textures, render on screen, capture inputs, and so on.

In addition, Lucera Project libraries are cross platform and can compile the same code for different platforms such as Windows or iPhoneOS.

We hope to help many people to achieve their dreams of creating video games.

Behaviors

MindShake includes a behavior engine that allows the users to easily create custom 'event driven' logic, per full game or per sprite, that can be reused in various games.

In this way the user can split logic into several behaviors, defining initialization code (BeginSprite), defining simple actions for events like mouse clicks, per frame process 'EnterFrame' for single sprite or whole game, etc. Furthermore, the user can reuse the same behavior into multiple sprites.

For example, in a platform game, the user can define a behavior to control where a sprite can walk, fall down in case of having no ground under their feet, rising stairs, etc. Then the user can attach this behavior to all the sprites that are able to walk on the platforms.

Easy 3D Sound System

BrainWave  incorporates  a simple system to position sounds in a 3D space:

First you must define the radius of the sphere, or spheroid, which wraps the listener.
pSoundListener->SetWorldRadius(radius);
pSoundListener->SetWorldRadius(xRadius, yRadius);
pSoundListener->SetWorldRadius(xRadius, yRadius, zRadius);
Out of the defined spheroid, the listener will not listen anything.

Later you must define the position of the sounds:
pSound->SetPosition(x, y, z);

Finally you can change the position of the listener (default 0, 0, 0) and the position of the sound objects that appear in the screen.

martes, 8 de septiembre de 2009

MindShake layer system

MindShake has a great layer system. The user can add and shuffle Sprite Layers, Text Layers, Tile Layers and in a future version 3D Layers (like new StarCraft II from blizzard).


The user can apply some transformations directly over the layer or over its content.

Native support for audio file formats

BainWave includes readers for some standard audio file types like WAV, CAFF or AIFF. Furthermore it includes native support for PCM, LPCM, MS ADPCM, IMA ADPCM, A-LAW and MU-LAW.

BrainWave supports mono and stereo streams of 8 and 16 bits.

lunes, 7 de septiembre de 2009

Bitmap Font Generator

Bitmap Font Generator will allow you to generate bitmap fonts from TrueType fonts. The application generates both image files and character descriptions that can be read by a game for easy rendering of fonts.

MindShake can load bitmap fonts generated with this tool.

Thanks AngelCode!

Sound eXchange

Sound eXchange (SoX) is a great tool for convert between different audio file formats. SoX is a cross-platform (Windows, Linux, MacOS X, etc.) command line utility.
We apreciate a lot this tool that permit us to test our library.

Thanks!

viernes, 4 de septiembre de 2009

What is MindShake?

MindShake is a lightweight multiplattform 2.5D game engine.
 
In it's first alpha version it will run on several operating systems including Windows 95, 98, NT, 2000, XP, Vista, Linux, some others *nix, MacOS X and iPhoneOS and it will work on several compilers including GNU GCC 3.x - 4.4 and Microsoft Visual C/C++ 6.0 - 2008.

jueves, 3 de septiembre de 2009

What is BrainWave?

BrainWave is a lightweight multiplattform sound engine for games.
 
In it's first beta version it will run on several operating systems including Windows 95, 98, NT, 2000, XP, Vista, Linux, some others *nix, MacOS X and iPhoneOS and it will work on several compilers including GNU GCC 3.x - 4.4 and Microsoft Visual C/C++ 6.0 - 2008.