Page 1 of 1

The BattleDrive Project

Posted: Thu Jun 04, 2009 10:20 am
by An00biS
Project homepage :

______________________________________ Original Post _____________________________________________
Hello community.

I'd like to present you a project which I've been working on for quite some time. It's a game framework, originally made for tank-games (arcade or even RTS). But I think it can be used for many different things.

Working title: BattleDale (but I guess it could be changed because the engine has many 'peaceful' usages too. Any ideas?)
Status: unmarked alpha
License: LPCL

  • Grobs! A "grob" means "graphical object" and it's a rotable pseudo-3D-sprite, technically a set of sprites.
  • PhysCamera. A camera for viewing contents of box2d world. Zoomable, scalable, scrollable, with different colorings for shape types. It supports using mouse joints with shapes it displays. The demo allows creating multiple phys cams.
  • GfxCamera. Scrollable and scalable graphical viewport. Supports tiling. The demo allows creating multiple cams.
  • Mod support: The software is split to 'framework', which provides functionality, and 'mod', which actually does something. In the demo, the mod adds a lot experimental framework features, so don't get confused.
  • Box2D support: The grobs can be moved programmaticaly, but you can also link them to box2d shapes. The choice is up to the programmer. The demo uses box2d as backend.
However, I'm not planning to develop this project any further. I've found myself something more interesting to work on, and it requires so much attention that I won't be having time for this anymore. I'm not abbandoning it here, but it's a priority B thing for me now. So, through LPCL, I'm giving it to you, my dear LÖVE folks, in a hope someone will take care of it.
A picture says more than million words. Phys cameras, gfx cameras and grobs in action!
Screenshot_balls.jpg (93.35 KiB) Viewed 3983 times
Aiming is broken and they don't shoot (and maybe never will).
Screenshot_guns.jpg (99.67 KiB) Viewed 3984 times
If anyone is interested to work on it though, contact me anytime. I'll be around to anyone who's brave (crazy) enough to do it. While it may seem quite functional for quite a few seconds, it really is just an alpha, hardcoded, flawed, messy, undocumented. But if you just ask, I'll help you understand it.

There you can find the program and also an utility for parsing grobs from images exported out of 3d modelling programs. It's a c++ program (first to be released as LCPL ^^ ), but it should work.

And now, i want some feedback!
Preferably: WÖW! :ultraglee:

Edit: Changed the thread title and added wiki link.

Re: Working title: Battledale

Posted: Thu Jun 04, 2009 12:45 pm
by appleide
Single Ant Colony Simulation. (Only one colony at a time or it won't be peaceful anymore...)

This is pretty huge...

I'm not entirely sure of its capabilities....

I think it has..:
Can easily add different 'unit types'?
Place objects auto?
Manage their behaviours? (Turrets turning... having figured out how to activate this)
Tracking them? (Minimaps)

I have a question:
Do you think it would possible to add networking support (multiplayer) for a game using this framework?

Re: Working title: Battledale

Posted: Thu Jun 04, 2009 4:41 pm
by An00biS
appleide wrote:This is pretty huge...
Right, and it doesn't even have any game logic.
Actually, there are three things packed in the file:
- The framework itself: battledale*.lua files
- The BD-GUI library: bdgui*.lua files. I'm developing it for this project, so I release it together
- The TestMod: mod_test*.lua files. A demo game made using the framework. Since the framework is incomplete, many features are implemented in the mod instead the framework. These are in files mod_test_bdx.lua (framework extensions) and mod_test_bdguix.lua.
appleide wrote:I'm not entirely sure of its capabilities....
I guess this asks for more demos. I'll see what I can make.
appleide wrote: I think it has..:
Can easily add different 'unit types'?
Place objects auto?
Manage their behaviours? (Turrets turning... having figured out how to activate this)
Tracking them? (Minimaps)
The framework only provides classes for the programmer to work with. There is very little built-in behaviour. For example: The grobs are independent of anything else. They're almost like sprites: you draw them using Grob:draw( x,y ) and "rotate" (change the displayed sprite) using Grob:setAngleRadians(angle) or Grob:setAngleDegrees(angle). A grob does have internal position attributes (manipulated through Grob:setMapPos and Grob:getMapPos), but you don't have to use it. Now that I'm thinking of it, I may put grobs into a separate library, so they're more "acessible".
As for your points:
  • ad] Unit types, unit behaviour: The framework does not define an unit. The programmer of the game defines a unit. The framework only provides grobs which can serve as an representation of a unit. In the demo, a unit is an object with one or more grobs representing it and a box2d shape which defines it's position and angle.
  • ad] Place objects auto: not sure what you mean.
  • ad] Turrets: I'm planning to mantain reusable "game utilities" as part of the framework. But these are just optional stuff which the coder can use to his advantage. There is nothing you couldn't do yourself.
  • ad] Minimap: Nothing like that in the framework. There is the physics camera, but it's only useful for games using box2d.
appleide wrote:Do you think it would possible to add networking support (multiplayer) for a game using this framework?
Just as easy as working with the network itself. Depends fully on what kind of game do you have in mind.

Re: Working title: Battledale

Posted: Thu Jul 23, 2009 8:00 pm
by An00biS
Hello again.

For some time, I thought I had lost all interest in this project and I would just leave it right here. But it turned out it was just a moment of weakness and this is still my pet-project. So, I'm working on it again and I bring you updates.
  1. I realized nobody wants a giant framework. Especially if it has a heap of features which don't really require each other. So, I decided to break the codebase into a bunch of small, single-purpose libs. They'll not rely on each other, so anyone can use only those he actually needs.
  2. I've renamed the project to BattleDrive and I've set up a wikipage for it, check it out
  3. I'd like to present you probably the most signifficant lib of the whole project: the BD_Grob library. Grob means "GRaphical OBject" and it's a pseudo-3D graphic entity made from a sequence of 2D sprites displaying some object from various angles. It's a common concept in 2D games, but it ain't too easy to code it, believe me. But with this lib, you only need to learn 3D modelling to create your graphics - all else is automated. If you want to see it in action, here's a Demo
    Of course this also deserved a wikipage
I hope this time I've made an impression ;)

Re: The BattleDrive Project

Posted: Sat Jul 25, 2009 7:40 am
by paclito
I'm working for some months (I'm not a programmer) in a project like yours, with 3d sprites, A* pathfinding etc etc, my goal is to make a pseudo clone of the wii tanks game... but, we have some points... grobs, maps etc. I'll send to the forum in the next hour, i think you will be pleased to see how 3d models rotate without steps :)
I've read some parts of your code and ........wowwwwwww, i like it

Saludos from spain!!!

Re: The BattleDrive Project

Posted: Wed Jul 29, 2009 4:39 pm
by sauer2
There seems to be a bug within the canon of the tank.
It sometimes flips directly downwards.
Still, good job, keep it up!

Re: The BattleDrive Project

Posted: Fri Oct 30, 2009 11:22 pm
by An00biS
Hello again.

Heh, it seems this thread goes in a (project abbandoned, project ressurected) loop, as currently I'm fully occupied with something else. However, I'm determined never to leave this effort for good.

However, while I still worked permanently on this, I've made quite a progress, but I never published the updates. So, here they are now:
BD_Grob Beta2
(41.22 KiB) Downloaded 125 times
A new version of my most advanced lib. Now I regret I haven't started a changelog yet :| But most work was about getting multi-level-hierarchies to work properly. GrObs can be stacked on one another and act as a single unit. But in beta1, only 2-level consists worked as expected.
GrobMaker version 1.2
This one has a changelog ^^. New version of the tool which stands between Blender and BD_Grob. The most important change is the inclusion of boost::filesystem library, which introduces the ability to search the source location and determine inputs automatically. While previously, you'd have to specify every single dir manually, now you can just switch to the directory with content and issue:

Code: Select all

grobmaker --w [target image width]
Tank Demo version 1.1
New version. Mouse aiming works OK now. But there's still no shooting :megagrin:
New Demo! Heavy Battle Hover Demo
I used this app to develop and test BD_Grob beta2. Notice that, unlike in tank demo, the vehicle also has a shadow. Mouse aiming works ok for all the guns, but no shooting again :megagrin:
BD_Undercart Beta1
(6.45 KiB) Downloaded 116 times
A small new piece of the BD framework. This lib abstracts the logic of a simple, key-controlled vehicle. HeavyHoverDemo uses it and TankDemo contains pretty much the same code. I didn't call it "vehicle" because that's too high-level term. It doesn't depend on BD_Grob, but requires the vehicle graphic to conform to a certain interface. Check the top of the file for documentation.
BD_Turntable Beta1
(10.61 KiB) Downloaded 128 times
Another new thing. It abstracts the aiming logic of a cannon, both mouse-controlled and keys-controlled. But, it can be used for just anything that turns around - that's why I didn't call it a "Turret". As with undercart, it doesn't depend on any other lib. There's a documentation on the top of the file (like it is in all BD_* libs anyway).

That's it for today :)