April 23, 2009

Kittens 2

I'm sorry I still haven't posted anything

I'm still working on making the threading system even more agile and work with me like it should.

I already have some type of python binding ready, still gotta make some improvements there, so I have scenes ^^

Soon. Soon you will get the first sphere/complex mesh renderings. (I will try to get million polygon mesh, or something similar for benchmarking).

Update: I have everything "ready" now I need to do some integrational shit (Adjust system and apply new stuff and edit code moar). I would've updated days ago, but my OS-reinstallation didn't go so.. smoothly.

April 8, 2009

Kittens.

This should be in a way in babysteps, but I rather not dirty it.

I decided to change early on the design to be multithreading-friendly. This means pretty radical changes in some parts so if you can forgive me for delaying next "chapter" for few weeks and I'll probably be able to provide some screenshots too.

Most likely spheres. At least one.

April 7, 2009

Milestone I & II

As I wrote, I'll start a series that tell about the progress of AGE. Each article describes the Milestones in question, sample usage code/script and perhaps some screen shots. Be aware of the fact the first ones will look lame, simple and just are meant for educational purposes only.

Milestone I
Description:
Basic Core functions (Windowing, renderer, wrapper) and Camera projection system.

The "original" AGE is written in C++ using Microsoft® Windows® API and Open Graphics Library (OpenGL). These two API's are split to their own files, so if someone whines about no DX10.1 support, he can write himself by opening the Renderer.cpp and edit the namespace (age::renderer) functions. Same for the OS-specific stuff, Windows API related code is in Window.cpp file, where unrelatedly most other functions are implemented too.

The first milestone was to implement a way to communicate between OS and API without having the user to write ANY API-specific lines and create projection system through so called Cameras.

Put simply, currently you can create simple scene with window and camera by using following code in the main file:

#include "../inc/age.h"

using namespace age;

int main()
{
Driver* d = new Driver();

d->initDriver("Engine!", 640, 480);

ageid camera = d->addCamera();

// Viewport position, viewport size, clip near and far,
// FOV, position, rotation and bg color.
d->getCamera(camera)->set(Vec2s(0,0), Vec2s(150, 150),
Vec2f(0.1, 1000.0), 45.0,
Vec3f(0,0,200), Eul(0,0,0),
Vec4f(0.1, 0.0, 0.2, 1.0));

while(!d->getDone())
{
d->mainLoop();
}

return d->end();
}


The camera "set" function is long, because user sets all camera specific values to it. I could've also set all of them one by one by setPos, setRot, etc. or setProjectionPos and setWorldPos functions that take projection specific values and world positioning specific values respectively.

Milestone II
Description: Input

So in all simplicity, the second milestone is to implement inputting system. Currently I'm on my way to implement and test Xinput gamepad support. I also made (from boredom) structures that include PlayStation, PlayStation 3, Xbox, Xbox 360 and Generic pads. I didn't remember to make one for Wii controller, since it works a bit differently and I'd have to actually use time to find out an SDK for reference.

Input a class so you have to call
input->keys[KEY_A]
to check if 'A' is pressed. I might simplify it even further by merging it into Driver. Who knows.



I didn't include any shots now, since I'm sure everyone can imagine rotating test triangle in a window.

April 3, 2009

More on engine

I noticed that I hadn't done proper planning on the file system, so it kind of blew on me. I need to do some reprogramming (thanks to my "go with the guts"-style) on the engine design in general..

I'll update when I'll get this solved. I blame logic.

I'll start new "series" here too, The Babysteps of Engine, which reports the progress in detail. First chapter next week.