Monday, July 30, 2012
As I mentioned in my previous post, the Sprite is where all the action takes place, and by that, I mean the drawing. In CC2d, they've made it so that each object that has to draw itself can chose from a set of shading programs pre-loaded in the ShaderCache. The choice is made depending on what the Sprite has to draw.
Usually, a Sprite will be loaded with a texture image, which means that you will need a shader that can sample those textures. If you have no idea what I'm talking about, you can refer to my previous blog post about texturing and compression. On the other hand, you could have a Sprite that only contains a primitive shape, like a triangle, and no texture. For this, you obviously wouldn't need a program that can sample textures, thus that program would be simpler.
In this post, I will show you how to build a basic ShaderCache, as well as a TextureCache (insures an image, or texture, is loaded only once and can be re-used for different Sprites). Our ShaderCache will only contain one program for now; one that can draw textured objects (because I've already covered that in the previous post I mentioned, and that I've already written the shading program to do just that).
Also, from now on I'll have a Git of the project on GitHub.
Thursday, July 26, 2012
The first thing I wanted to do when I started this project is build some kind of skeleton of what Cocos2d is. That means getting to know the big picture and then making something functional, extremely simplified, but that works the same way.
After the break, I'll present a diagram showing a general view of Zissou2d based on how CC2d works and I'll give more details as I put it into code.
Tuesday, July 24, 2012
In this post I'm going to talk about how Cocos2d works in general, and I'm also going to try to translate that into our project. I'm going to look at these concepts and see how we can integrate them by using GLKit.
One thing that helped me while going through the documentation of Cocos2d is that I had already used an animation software when I was younger (I was one of those kids making stick figure deaths). If you've ever used Abobe (Previously Macromedia) Flash to animate or try to make a game, these concepts will be very familiar to you.
Monday, July 23, 2012
It's been a couple of months since I've posted anything on this blog, but I've finally started doing something new! It was extremely important for me to understand the basics of OpenGL, but now I want to take it further and integrate this knowledge in an object-oriented environment.
This also means that I'm sadly going to stop doing my Basic Cube series for now, but it certainly doesn't mean I'm done with OpenGL! I'm going to keep a log right here, as I progress with this new thing, which is my own 2d game API called Zissou2d!...