CB Comic #1

I decided to start a new tradition, a comic about CoolBasic, and its community and staff. I intend to keep the publishing pace of the comic relatively slow, but I do have some fun ideas reserved already. I’ll enrich the comic with more characters in future coming strips, but for now let me introduce “The Zero“, who is the Lead Developer of the entire thing, and “The Evil Admin“, a stereotype of someone watching over our forums in a daily basis.

CB Comic #1

Cool VES Game Engine

Now this is exciting! The graphics engine of Cool VES (that is used by CoolBasic Classic) is currently the most complete sub-project of this entire development process. It’s already featuring all functionality that current CoolBasic does, and even more. This blog entry focuses on to introduce the new graphics engine (with a little surprise at the bottom), and will shed some light to the matter. The new graphics engine is considerably faster, and is now fully GPU accelerated. It uses OpenGL for rendering, and it’s also cross-platform *cough*. We take advantage of modern graphics hardware, thus enabling us to use some advanced effects, which means that CoolBasic Classic users will be able to create stunningly good-looking graphics if they’ve got the skill. Now excuse us about the quality of the preview images you’ll find all over this entry: they’re our internal work and made for testing, and don’t generally look that good. They simply haven’t been meant for demoing/promotional purposes. That’s why there’s lots of test data visible on screen as well. However, they do actually cover a major part of features from the new engine. We’ll create some ‘properly-finished’ sample images at a later time. But now, on with the preview…

Let’s take a look at these 3 images (click for a larger version):
Graphics demos

First Image (on the left)
This one has a lot of going on on the screen. It was one of our first test programs. FPS without 2D drawing is very high. It’s difficult to exmplain everyting as you can’t see it on the move, but here’s a somewhat complete list what you can see in this demo:

  • We have basic object loading from an image file in place. We’ll also support loading from memory and from pack files in the future
  • We can move, rotate, and scale objects realtime without any performance hit. Come new era of particles!
  • Objects support alpha channel extracted from the image texture (encoded in PNG images)
  • We can change the mask color to enable transparent backgrounds
  • We can colorize objects by changing their base color (the red cube)
  • Objects can have a custom-located anchor point around which and according to which they rotate and scale
  • Objects can be alpha-blended (i.e. ‘ghosted’) by a given percentage
  • Objects can have custom drawing order (user-defined Z-depth)
  • We have multiple blend modes, including (but not limited to) additive (lightening) and multiplicative (darkening)
  • We can load fonts and render text to screen
  • Basic 2D drawing works too: lines, dots, rectangles, triangles, and ellipses. Filled or not
  • We can now rotate and zoom the camera in addition to objects! This means we can affect how the entire game world ends up being presented on screen

This is not visible, but we also have a solution to draw static UI elements and backgrounds at absolute screen coordinates as well as showing images in the old-fashion way, i.e drawing them only once. We’re still discussing about normal images, but it just might be that we end up consolidating everything to objects as they can be rendered in much more diverse way than just plain images can.

Second Image (in the middle)
This one demonstrates available filtering modes which basically affects the quality of drawing rotated and scaled (or otherwise transformed) game objects. We can instruct Cool VES to render graphics in a pixel-perfect fashion, which might work well for UI, but in general game objects look better when a filtering is applied: either a bilinear or trilinear methods can be used. We may add additional modes in the future.

Third Image (on the right)
I saved the most delicious one last. First of all, we have multiple viewports, which is cool because it enables more than one camera inside the game world! This will give the users new possibilities to create, say, multiplayer games. I mentioned at the beginning of this blog entry that we take advantage of modern hardware. What you see in 3 of the viewports are actually shaders. They can be used to post-process the rendered game world, or to enhance single objects through our new material system. The possibilities are quite limitless, and I expect to see very beautiful water effects, motion blurs, and color tone-affectors in the future.

The top-left viewport uses a shader that renders its contents in grayscale. Although this is a very simple shader, it’s quite commonly used effect in gaming. This grayscale effect is achieved via a relatively simple shader code:

void test()
{
vec4 texel;
vec3 colors;
float average;
texel = texture2D(p_Texture,gl_TexCoord[0].st);
colors = texel.rgb;
average = (colors.r + colors.b + colors.g) / 3.0;
gl_FragColor.r = average;
gl_FragColor.g = average;
gl_FragColor.b = average;
gl_FragColor.a = texel.a;
}

That’s the contents of the shader file – Cool VES loads shaders from normal text files.

The bottom-left viewport uses a blurring shader, another widely used effect in gaming. It could be used to achieve nice effect to emphasize something on the screen (while the background gets all blur).

The top-right viewport enhances whatever is under the mouse with increased intensity, making everything underneath to ‘bloom’ out. Can be used, for example, to highlight explosions and such.

The final viewport (bottom-right) visualizes a scene graph. Cool VES optimizes rendering through this system. It’s now also possible to assign child objects to parent objects, creating hirearchical models! We can literally construct game characters by attaching the limbs, which are separate objects, to each other, and then, for example, animating them according to custom made sequences (yeah, object animation is no longer limited to image strips). Since object hierarchy enables us to ‘glue’ objects to each other, it’s extremely easy to make objects automatically move and rotate with their parent. Imagine a health bar attached on top of a game character.

Physics

Let’s take a look at these 3 images (click for a larger version):
Graphics demos

Ok, this is really really cool stuff. We’ll replace the old collision system entirely with a 2D physics engine! All collisions between game objects are now affected by full rigid body dynamics. Basically every game object can be applied with a collision shape, mass and a few more attributes. Once set, Cool VES will automatically update them with full physics response! The collision shape can be of any convex or concave polygon, or a simple primitive. We can also access the collision data to determine what happened to any object. Objects will bounce off/collide with each other or static obstacles.

The first demo (on the left) has some static immovable objects horizontally aligned in the center, and lots of bouncing dynamic objects: they get impulse outwards whenever they collide with anything. There’s also a keyboard guided triangular ship flying (at the moment of screen capture, located on the right side). Although very simple, toying with the ship, all objects involved, was quite fun.

The middle image demonstrates liquid physics where a keyboard controlled circle object swims in a sticky goo.

The image on the right combines everything. It’s a pinball test with zoomable and rotateable camera. Collision data has been added and it follows the contour of the image. You can also add new collision walls to the screne by mouse – on the fly!

Networking

Cool VES will finally feature in-built networking using TCP/IP and UDP. More info about that later, but it’s very likely that we’ll build some sort of high level command library to handle some advanced mechanics, such as interpolation and extrapolation (to overcome latency issues), automatically.

Assembly Summer 2010

Can’t believe it’s been a year already as I vividly remember writing the ASM 2009 raport. This year’s Assembly demo party was, similarly to last year, 4 days in length, but this time I actually slept better so overall it was even cooler :). Every year it feels like gaming is taking more major part in the party. Besides lots of people there are playing and enjoying the lightning fast party network, there are also seminars and career opportunities related to game industry. Every Finnish university that offers courses for game development are strongly visible at the party booths. I myself attended an interesting seminar of XNA and Windows Phone 7 game development.

We had a group ordering for the CoolBasic community, which once again, gave us a geat opportunity to get known with each other also in real life in addition to good old forum posting. Having pizza, playing games, and discussing together was just splendid again. Below is a group picture taken outside the Arena; we had to look against the sun, and that’s the reson to grins and wet eyes.

Assembly Summer 2010 - CB Community Group Picture

Last year I presented details about CoolBasic V3, and this year I had presentation about CoolBasic Classic and Cool Developer (the code editor). This presentation had lots of info that was revealed for the first time in public! This time we actually went to some place more quiet than the Arena, so hopefully people would hear what I had to say more clearly. The mass of people followed me to the dark and shady parking hall for some demoing from my laptop. Needless to say, having the presentation in such a place felt a bit akward, so maybe I just book a room with a video projector next time :). Two major topics were without a doubt the game engine and the editor, and as it’s now basically public, I will post official overviews of them shortly in this blog.

I planned to write some code and do some HC development for CoolBasic Classic at the party, but due to constant competitions and other events on the big screen (forcing everyone to stop whatever they’re doing and close their monitors), I got interrupted all the time. Oh well, it’s a demo party after all – gaming and coding can be done in small doses, but in the end of the day, I achieved close to nothing of productive work. Good party!

Bagard, In memoriam

I learned just recently that one of our beloved forum moderators, Bagard, is no longer with us. Bagard was nowhere to be found since last January; he didn’t answer to any emails nor private messages, and he disappeared from IRC. I feared for the worst, and we finally got a forum post confirmation (which judged by the tone of it, I believe strongly, isn’t a troll) about his condition from an anonymous friend of Bagard. Even though this may come “late”, I’m deeply sorry. Bagard attended the first CoolBasic summer cabin meeting back in 2009, and all of us who were there, I’m sure, will remember him as a great person.

R.I.P

Copyright © All Rights Reserved · Green Hope Theme by Sivan & schiy · Proudly powered by WordPress