After bashing my head against it and blender2crystal, I cant for the live of me get anything to _move_. I've tried making it an npc. I've tried adding pclinearmove. Nothing works. I'd get on IRC and ask the devs, but my internet wont let me stay online longer than about 5 minutes, and I doubt they'll answer within an hour after I ask.
If I can get a theoretical creature moving about, I can move forward. Otherwise, a friend of mine insists I should start from scratch and make it in C++.
So why should I?
Well, it'd be fast. Blazingly fast. It _is_ C, after all.
But it'd take a loong time to write. It'd be months before I get back to where I am now. Which is "Crossplatform, easily loading object/uv/texture data, move the player around, basic physics, and lighting."
I'm sure lighting comes basically for "free" with pure opengl, as well as movement.
However, loading object/uv/texture data is another story I'm sure. I'd like to use a library that supports Collada. I hear screams of anguish about xml. Know what? Fuck you. How else would you store all the data possibly present in a scene? Binary data? Like Blender? Ever try to access any of that data _not_ through blender? It's a pain in the ass. You end up with another library to read that garbage, instead of just parsing it with whatever xml parsing libraries you already have. How else is one supposed to store scene data than in a hierarchical manner. You derive from class Human. Humans derive from class Animal. Animals derive from class Organism. Etc. Life is hierarchical. Get over it. And besides, it loads it once, when the game starts. Speed is not, I repeat, *_NOT_* an issue here. Crysis takes nearly a minute to load its maps, and they're _huge_. This little crappy game isnt going to be nearly that big.
As for Crossplatform-ness, that is only really possible if we use standard C++, though not particularly hard, per se, it comes "for free" with Crystal Space.
Basic physics are a little hard to get running in Crystal Space from what I've tried. I tried and failed to get feesiks running. However, my friend has been working on a little ODE demo type program, rezzing boxes and such so that they collide with each other. It's really snazzy.
But what would I need in the future?
Terrain/heightmaps, bone animations, sound, off the top of my head.
Sound can be handled with openal and as such isnt a problem. (And isnt really related to 3d aside from the 3d-audio aspect)
Bone-based animations. Apparently the library Crystal Space uses, Cal3d, has an exporter for Blender, my tool of choice. (http://oomadness.tuxfamily.org/en/blender2cal3d/index.html) "Cal3D also provides an automatic level-of-detail control" --Cal3d FAQ I like the sound of that. Though I'm not quite sure how it'll tie into opengl, but I'm pretty sure it wont be that "hard". So then instead of having opengl import the collada file, we can just have cal3d import its file and go from there. Though, we wont be doing this until the rest of the stuff is done.
Terrain/heightmaps couldnt be that hard. I mean, all it is is a mesh that's deformed depending on a greyscale image. It isnt effected by gravity, though it does collide. I'm sure ODE has nice tutorials and sample code for this kinda thing, so no worries here.
(A few hours later)
So my buddy says g3d is all that. And that we're going to definitely be using it. He's anti-cal3d because "it makes too many files!!" or somesuch. Oh well, we'll worry about bone animations when we get that far I guess, and in the meantime, we'll just use md2 or something.
(A couple hours still later)
So I played with it a demo a little and it looks pretty good already :P
Lens Flares and all.
Anyway, I'll finish this off and give an update in a couple days.
Wednesday, March 19, 2008
Monday, March 17, 2008
Crystal Space And You!
So my latest foray into programming has led me to a toolkit called "Crystal Space 3D". Well I'll come right and say it. I don't know much C++. And with that out of the way I can then begin my hour long rant about how hard to use it is.
Well, it has a Python binding via swig, and it's quite nice. I like it. So I started work with one of the samples, tweaking it to what I wanted. I added different key bindings, as well as a first-person camera control. Sort of. It worked, except for if you moved your mouse in a circular motion, it would roll the camera some degrees. Annoying. So after a couple (few) hours of trying different things to get it to work, I finally gave up.
And that's when I discovered Blender2Crystal. I thought it was just some crappy exporter plugin that just dumped the contents of my blender meshes to some xml format. I was WRONG. Turns out it's one heck of an IDE for Crystal Space games. AND it's what the Apricot team is using.
So basically you just build to your hearts content (and remember that you should keep stuff as low-poly as possible) and hit "Run" and in a couple seconds (it has to cache lighting and such) you're off and running. Literally.
Now I can get on with actually making my game instead of bashing my head against quaternions and matrix transformations.
Anyway, about the game. I had an idea for a game, roughly inspired by various gardening/animal raising/farming games. Basically:
You are a druid in a some-time-post-stone-age era. You've been charged with caring for a patch of land. You gain points by growing plants in your land, getting animals to enter your land and reproduce, inviting other animals (plants invite deer invite bears, etc.). With those points you're able to buy levels or spend them outright. If you buy levels, those points are "locked in". When you level up, you gain things like better land, better spells, better tools, etc. With those higher levels you also unlock other things for "purchase" with your points.
When you spend points outright, you can purchase things like animals, seeds, plants, and various hardscapes (Cairnstones, statues, lanterns, etc)
It is an open ended game and as such will never end, your land forever expanding, gaining more and more creatures, plants and other things.
Due to its open nature, "mods" or as we like to refer to it in the open source world: "content" are extremely easy to make. Or at least it will be. Each object (animals, plants, etc) will be in their own file, and will be linked into the main .blend, or loaded programmatically. From there, you can assign a value to it, and it'll appear in game.
Also, as a secondary feature, I plan on having it work as a screensaver, loading up your map, optionally saving your "progress". In short, you end up with a pretty screen saver with deer and bunnies wandering around a pretty forest.
Perhaps when it's "done" I'll add downloading of new content from a website or something. Who knows.
Anyway, this project will be dubbed "Sylva" from the latin "Sylvan" (see http://en.wikipedia.org/wiki/Sylvan )
It will be GPLv3, and maintained locally in a git repository, pushed periodically to a bzr repository on Launchpad.
If you're interested, I can find something to occupy your time. I'm in need of Python programmers, Texture-ists, Model-ers, and generally any possible skill you may have. I'd love to have you aboard.
Well, it has a Python binding via swig, and it's quite nice. I like it. So I started work with one of the samples, tweaking it to what I wanted. I added different key bindings, as well as a first-person camera control. Sort of. It worked, except for if you moved your mouse in a circular motion, it would roll the camera some degrees. Annoying. So after a couple (few) hours of trying different things to get it to work, I finally gave up.
And that's when I discovered Blender2Crystal. I thought it was just some crappy exporter plugin that just dumped the contents of my blender meshes to some xml format. I was WRONG. Turns out it's one heck of an IDE for Crystal Space games. AND it's what the Apricot team is using.
So basically you just build to your hearts content (and remember that you should keep stuff as low-poly as possible) and hit "Run" and in a couple seconds (it has to cache lighting and such) you're off and running. Literally.
Now I can get on with actually making my game instead of bashing my head against quaternions and matrix transformations.
Anyway, about the game. I had an idea for a game, roughly inspired by various gardening/animal raising/farming games. Basically:
You are a druid in a some-time-post-stone-age era. You've been charged with caring for a patch of land. You gain points by growing plants in your land, getting animals to enter your land and reproduce, inviting other animals (plants invite deer invite bears, etc.). With those points you're able to buy levels or spend them outright. If you buy levels, those points are "locked in". When you level up, you gain things like better land, better spells, better tools, etc. With those higher levels you also unlock other things for "purchase" with your points.
When you spend points outright, you can purchase things like animals, seeds, plants, and various hardscapes (Cairnstones, statues, lanterns, etc)
It is an open ended game and as such will never end, your land forever expanding, gaining more and more creatures, plants and other things.
Due to its open nature, "mods" or as we like to refer to it in the open source world: "content" are extremely easy to make. Or at least it will be. Each object (animals, plants, etc) will be in their own file, and will be linked into the main .blend, or loaded programmatically. From there, you can assign a value to it, and it'll appear in game.
Also, as a secondary feature, I plan on having it work as a screensaver, loading up your map, optionally saving your "progress". In short, you end up with a pretty screen saver with deer and bunnies wandering around a pretty forest.
Perhaps when it's "done" I'll add downloading of new content from a website or something. Who knows.
Anyway, this project will be dubbed "Sylva" from the latin "Sylvan" (see http://en.wikipedia.org/wiki/Sylvan )
It will be GPLv3, and maintained locally in a git repository, pushed periodically to a bzr repository on Launchpad.
If you're interested, I can find something to occupy your time. I'm in need of Python programmers, Texture-ists, Model-ers, and generally any possible skill you may have. I'd love to have you aboard.
Labels:
3d,
blender,
crystal space,
farm,
game,
simulation
Subscribe to:
Posts (Atom)