View Full Version : CocoaGranite info...
flipflop
2004.07.16, 08:00 PM
Mostly a question for Kelvin and his CocoaGranite framework he is working on. I have seen several references to CocoaGranite but have not seen many details about it yet. Can you give us an overview of the features yet? You mentioned in another thread that it will not be as robust as CocoaBlitz. How will it differ? What are your goals for the project? It's very generous that you are donating it to the Inkubator project. Will you be willing to offer a version for the uDevGame 2004 competition?
Thanks for the information!
- John
skyhawk
2004.07.16, 10:06 PM
I believe the main differences are:
C++ backend with Obj-C front end as opposed to entirely Obj-C
I believe there will be no CBMovie (I could be wrong)
CocoaGranite will be an all in one type thing. It will come with tools to process your assets. You will still program in XCode your game, but it will have tools for managing assets.
as far as I saw, it is 10-20x faster than CB.
And I believe his reason for this is so that he can program an RPG.
I'm sure kelvin can supplement and correct anything from my post
kelvin
2004.07.17, 05:34 AM
CocoaGranite is an ObjC Framework (Granite) and a toolchain (Chisel). The main difference between Granite and CB is that Granite has a more robust geometry engine and faster data upload. Granite will simplify Cocoa OpenGL greatly, but won't do everything for you like CB did. While Granite is aimed toward 2D, you could also theoretically build a very fast 3D engine on top of the base OpenGL classes provided, unlike CB. I've actually decided to not do the C++ backend and rather do a lot of strict C optimizations. (e.g. my NSOpenGLContex -ensureCurrentContext method is about 10x as fast as -makeCurrentContext because of a CG optimization)
Granite wraps OpenGL and provides a Scenegraph. In Granite you have more direct access to the vertex data and more control over the OpenGL context. Granite will also be altivec aware for vertex transforms and clipping.
Chisel allows you to build texture, polygon, animation, and layout data which can be loaded into Granite. Both will be open source. Much of the performance is gained by using much fewer textures, as such Chisel will provide a texture combiner so you can place many small graphics in a single texture. With your single texture you can build several frames of animation or many different tiles of the same map.
One thing Granite will not do for you is texture stitching like CB. So, you'll have to either require RectTexExt, or make your textures Po2. I'm still not sure how much Quicktime support I'll put in.
Some features
Easy loading of textures from NSImages
Easy access to VAO and vertex data.
An easy to use NSOpenGLView subclass
Easy to use sprite geometry. It'll do the placement and clipping for you.
Texture builder/combiner
Polygon builder and editor
Animation builder
Scene builder
Timeline control
Easy loading of scene data.
Will handle fullscreen tilemaps quite easily
The main purpose of building CocoaGranite is to encourage 2D game development. Inkubator can use it if they want to. CocoaGranite is aimed at new developers unfamiliar with OpenGL; I fully expect they will study the Granite and Chisel code and out grow it.
CocoaGranite will be ideal for most 2D games including but not limited to:
Scrolling Platformers
Large Map RPGs
Scrolling Shooters
PuzzleGames
Currently I have very,very early builds of Granite. Chisel is barely even started. Granite performance on simple scenes is about 10-20x as fast as CB, like SkyHawk said, but there is still a lot of missing functionality. My latest demo had about 2~512 32x32x32 sprites being drawn at about 500fps on my 800MHz G3 + Radeon 7000 in a 640x480 windowed context with VBL off.
I'm currently taking summer classes, so I don't have a lot of time to work on CocoaGranite. Though when uDG rolls around I will post what I have so that people can still benefit from it even if it's not complete.
If you're interested in seeing what I have thus far, feel free to chat me up sometime and I can send you a build.
arekkusu
2004.07.17, 06:10 AM
Very cool.
I'm interested in hearing how you optimized dynamic vertex submission. VAR + VAO? What vertex layout? What works best on Radeon 7000? *wink*
flipflop
2004.07.21, 11:09 PM
It looks like you have everything covered except for collision detection. Is that something you are planning on adding later? CocoaMallet :) ? I will send you an email / chat message to see where you stand.
O/T: Sorry for not replying sooner but finding a job has been my top priority for the past few weeks. :rolleyes:
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.