I have a sleeping project in my mind that consist in developing a c++ framework that would allow programmer to easily implement board games as video games with less effort. I made some research and there does not seem to be such tool available right now.
Considering that tablet device becomes more and more popular for board games as video games and considering the upcoming OUYA open video game console that runs on Android, I was investigating the possibility to port my game fallen kingdoms, and other ideas of mine, as a video game. But considering that video games takes time to develop, I wanted to make something that was going to make video game development easy enough to make sure it's worth it.
The framework will not be a tool for common people and it will not be a application like vassal where the user control the rules. It will be an engine to create a real video game which could be similar to the games found on Xbox (catan and carcassone) or android/ipad device. The library would be licensed as open source software that could be used for open or commercial development. I think it's the best way to do it if I want to get supporters later.
The way it will work is that the programmer will define the components of the game, will program the rules and a part of the AI. The framework will manage all the graphic display, animations, user input, Data Management, etc. The particularity of a board game framework is that the number of objects in the game are fixed since no new components are created or deleted during the game. So I intend to use an object oriented database where objects contains other objects and moves around them. It would also be possible to generate components inside the game, for example cards, allowing to generate cards like with a Nandeck script. That could be a way to save graphic design time.
My objective would be to be able to develop a video game in less than 6 month, with if possible including the graphic design. I first thought that it could double the length of development since I need to make the print outs and the code, but if some objects can be generated with some code, it might take much less time to use script to generate components rather than doing the components by hand in inkscape.
I also though that the framework could also be used for prototyping. When you have a working game that does not change much during the late development but that requires a lot of play test, implementing the rules to create a video game prototype could actually make play testing easier since the components can easily be changed and there is no setup required to play the game. That will allow the designer to playtest his game intensively in a shorter amount of time.
So not only it will improve the final product, but since some of the game's code will already be done during the prototyping phase, it would require less time to develop the final product. If the framework really makes the development of board game as video games easier, it could be a good replacement for PnP products since it offer players electronic distribution without any assembly required.
I just want to know what you were thinking about this project and if you had any other ideas. It's still a sleeping project running in my head and I night be waiting for the OUYA to get out before doing anything.
Sounds like a serious piece of software. What level of programming skill would be needed to implement a game? Is it simply meant to be a tool for programmers so they have shortcuts?
A part of me is scared that the project could be too big for me. So I won't talk too much about it until I have something to show to people.
Well the concept of a framework is to wrap and simplify the life of the programmer. The idea is that it's the framework that call the programmer's code instead of the programmer that call the library. So in theory, it should be easier to use.
The pro is that probably programmers will not even have to touch a single graphic display function since everything will be managed by the framework. I intend to use Allegro as a game library.
On the other hand, framework are done in object oriented programming because it basically consist in inheriting the class of the framework to implement your code. For example, you could have a class "card" that handle cards, then if you want to design "item cards" for your game, your item_card class will inherit from the card class.
I am currently studying Object Oriented Database structure to see how the framework could work. It seems that OODB are hierarchical and create a structure like XML files where objects contains objects that contains object.
I use code::blocks (MinGW32 compiler), it's free and multi-platform friendly. Considering I have no product in hand, I cannot show an example of the code. I have written a small draft today that I could transcribe here. I wanted to make a test with a real game to see what problems could occur. I'll make a summary of the transcription.
--------------------------------------------------------------------------
Game: That's Life (it's a real game by ravensburger)
First these classes will need to be defined:
Number tile
Clover tile
Die
Colored Pawns
Guard pawns
The framework will supply 3 root object available in all game:
Box: unused components
Player ( repeated as many time as there is players)
Table: Components placed on the table and displayed
Then you start by creating object by using the custom class defined above. That includes allocating them in memory, but also creating the objects with a script. For example it will create a generated picture of the tile in memory. So you do not need a picture of every tile.
Objects are allocated dynamically and added either to the box, or to the right destination according to the setup.
Pawns are added on the first tile
Unused pawns are added to the box
Tiles are placed in a track/vector (sorted) which is placed on the table.
Guards are placed on the clover tile.
So in the end, you get a structure like:
box
-- contains extra pawns
players
table
-- contains die
-- contains vector
---- contains tile
------ contains pawn
One of the problem I need to identify is component ownership. For example, what are the pawns owned by a player. Either player hold a copy of the reference on the paws he owns. So when it is his turn, I can pass through his list of pawns and allow only these pawns to be moved.
OR I search all the pawns on the board that has the color of the player. But that will depend of the capabilities of object oriented database system which I am not familiar with. They say it support querying, but I don't know the details.
So I guess the main loop will then be:
- roll the die
- find the pawns that can be moved
- ask the framework to ask the player which pawn he wants to move.
- Change the destination of the selected pawn
- check for victory condition
- pass to the next player.
Once the destination of a pawn is set, the framework would have a separate thread that will cycle and make all necessary animation to move the pawn into destination. So you do not need to call any procedure to update the graphics on the screen.
So this is roughly how it could work
---------------------------------------------------------------------------
I want the framework to manage a large amount of stuff. For example, it could be possible that game menus, and common interfaces like selecting a number of players, saving the game, checking the pieces in the box are all supplied by the framework. So unless a programmer wants to redefine them, he does not need to bother about it.
I will probably use the same interface for game menu as for component management. For example, a game menu could be a series of cards, where there the menu text is on each card. So I will simply reuse the same interface for menu.
I also exploring the possibility to have for example a game running on OUYA and a tablet at the same time where the information on the TV is not the same than on the tablet. For example, I could only draw the board on the TV and draw the player's hand of cards on the tablet allowing to play around a TV with hidden information. But that mostly depends on the technological capacity of the OUYA. It's not that hard to do, in theory it's just displaying and hiding layers.
But at that point it's more a dream than anything else. So for now I'll focus on exploring OODB, and when I start coding, I make some example with common public domain game so that people could see some code sample and so that it get easier for me to see what is required by game maker.
I hope that the framework could attract more than hard core programmer. I am a very organized person that can teach things very well. If I can make it more accessible, I would be very happy.
Many people have hopes that they do more board games on the WII-U with the coming of the tablet controller, but since it's not a royalty free console, I would not consider developing for it. Still if I could do something similar for OUYA and tablets, I would be very happy.
I hope that it clarified a few things. The project seems bigger than I am, but unless I start somewhere, I'll never know. Who knows if I could get support from others or if somebody else could take over the project.