Author Topic: Game Builder Plugin  (Read 15076 times)

alberto.rubinato

  • Guest
Game Builder Plugin
« on: June 27, 2006, 08:32:59 pm »
Hi,
my name is Alberto and I'm very new here. I'm also Italian, so excuse me for my bad english.

First of all a short introduction. I'm a game developer for hobby. I've searched for long time for tools and library that can help me in the realization of my projects. I've tryed SDL, Allegro, OpenGL + other libs, DirectX, and finally I found a great tool named Game Maker. It is very good for simple games, but it uses an interpreted language ( GML ) that for his nature slow down game speed. Is a fact that programs made with a compiler are excuted quickly than interpreted. I know also that the technique used in implementation is important. I started search again, and found Irrlicht and Ogre3D. Theese library are very impressive and have support for GUI functionality. So comes an idea:

I can develop a plugin ( a sort of editor ) fully integrated with theese library using the existent GUI parts for developing of Game Builder. This tool simply generate code for me from existent templates ( sort of library or SDK ) and launch c++ compiler in order to make excutibles. This in short.

I think: I can go in this way. But GUI functionality are in some way very limited in Irrlicht or Ogre3D, and programming a good editor is not so simple ( code complention, syntax highlight, etc., are difficult to implement ).

So I'm here for some questions:

Code::Blocks have plugin functionality, so my idea is to develope Game Builder as Code::Blocks plugin. I think to develope also a new project type with project wizard in order to setup some general game parameter or simply the library to use ( SDL, Irrlicht, Ogre3D, your_own_game_libray, etc.).

1) My plugin may use new file types (bitmaps, data files, sounds files, configuration files, source_game files, etc. ). WxSmith uses and manages wx resources files, so I think that I could do the same with my file formats. I'm correct?

2) I've a doubt on reopen my game project ( generated with Game Builder ). Imagine that I start Code::Blocks and reopen a previous saved Game Builder project. Is Game Builder plugin loaded and initialised on Code::Blocks startup or I must call/start it manually from plugin menĂ¹ in order to manage my own file formats? With wxSmith, it seems that the way used to manage particular file formats is completly transparent to the user, so the user could think that wxSmith is a Code::Blocks native area/functionality, not a plugin. I think in the way that my own file formats are "equal" to *.cpp or *.h files and managed automatically. I'm correct too?

3) wxSmith plugin generates c++ code and sources or header projects files pratically in realtime. I'll very happy to do the same, but another way could be to do this in batch mode when compilation time occours. I save all my "sources" in a special game object structure with save to file and c++ code generation functionality. What do you think about this solution?

I appreciate all advices, critics and other ideas that you can give me. I know that my question are probably stranges or simply easy, but I really think that Code::Blocks can be the correct base for my project and yes, I have much to learn of plugin/project functionality.

Many thank in advance.

Alberto Rubinato

P.S. If you think to IrrEdit ( new Irrlicht scene editor developed with wx by Niko - Irrlicht team leader ), I know of it. I think to a different tool that is game/graphics/etc. library indipendent and that I can public to the open source comunity as you have done with Code::Blocks so other can change or improve it without any restriction or simply to help them and me to make games quickly.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Game Builder Plugin
« Reply #1 on: June 27, 2006, 09:20:39 pm »
Don't get me wrong, but I think this is quite unrealistic.

From its description, Game Builder is a drag and drop tool that requires little or no programming skills at all and allows you to build games in a RAD kind of manner.
Ogre and Irrlicht are extremely sophisticated, extremely powerful, and massively complicated 3D graphic engines that take many weeks of study before you even get an idea what components to use. Also, these are 3D graphic engines, not build-a-complete-game frameworks. There is much more to a game than a few cool graphical effects.

So, basically what you are planning (if I understand correctly) is something that has the power of Ogre and Irrlicht, and the ease of a drag and drop utility, a tool that lets you create a game with a few clicks. Sorry, but I think that is absolutely unrealisic.

ad 1):
Yes, that's no problem. Code::Blocks already does that.

ad 2):
This depends on your programming skill. It is certainly possible, you'd have to write an importer.

ad 3):
This is certainly possible, albeit less transparent. You would have to run a meta-compiler at build time in this case. QT works that way, but this is one reason why many people don't like QT.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

alberto.rubinato

  • Guest
Re: Game Builder Plugin
« Reply #2 on: June 27, 2006, 11:16:19 pm »
Thanks thomas for your reply.

I know Irrlicht and Ogre3D functionality and components. I've made some projects with them and developed classes, functions, etcs. More things in game programming are done in the same way. If I want to program a tetris game, I'm ported to follow the same strategy with Irrlicht, Ogre3D, OpenGL, etc. What changes are methods used by the libraries. All use a Camera, a SceneManager, Node for objects, lights, meshes, material, etc. I know that this is only for the graphics part, but in the same way all of theese engines have integration with SDL, OpenAL, Newton, and so on in order to complete game programming requests.

So I think to develop a GDK that is abstract and can do things like add a camera, move a node, or do stuff in a general way and derive classes for each library that I would to use. In this GDK I'll define some base class such as Game, Player, Object, Sprite, and so on. Theese classes are used pratically in all games. I'll implement a standard game loop with some standard events ( OnCreate, OnKeyXYZ, OnDraw, Etc. ) and actions ( MoveTo, AddCamera, QuitGame, DoSomeStuff, etc. ).

All theese things are coded in c++ and ready to use. Simply the user call and organize them logically in RAD way and eventually hinerits or overrides the standard for his scope. In Game Maker I can't make change to the event loop or other things, but I can make every type of game quikly because simply I derive my particular object from one defined in some way "standard", apply a defined sprite, do some action in particular event, etc., and because the tool has a sofisticated GUI that help to organize projects game resources like texture, sounds, material, sprites.

I know that the difficult part is to implement the GDK, but for now there are some of them ready to use on the Internet that I can use or change ( integrated with Ogre3D or Irrlicht ), or simply, for this time, I can do things with a limited set of library supported by Code::Blocks ( Ogre3D + OpenAL + Newton for ex. ), and later go ahead. For the GUI and tool functionality, I've watched to wxWidget documentation. I think that I can clone Game Maker RAD functionality without any limitation.

I think that other tools ( commercial or not ) do things in the same way. Some of them use Phython ( Blender Game ) or Visual Basic, other are simply GDK without RAD functionality, other convert from own language code to executables ( Dark Basic, Game Studio A6, etc. ). I would like to do it with c++ and leaves user to code in c++ if he wants. If all is RAD and the user can't do things manually, probabilly he can't do good products. Usability for no programming users is not my first objective. First of all I'm searching speed up in prototyping process and automated game skeletal creation functionality. This last is already present in Code::Blocks.

So Game Builder must help user to do stuff, not substitute him. You can also thinks to Code::Blocks. It has template wizard for projects creation, but I can do the same things manually or modify the template result. Simply GUI speed up the creation process. With template wizard plugins you can define your standard settings for a situation and build it immediatly at the end with some predefined results ( predefined c++ code ) or add things and run it later. Game Builder will do the same. It creates a "blank" game that do nothing and helps to add/create classes or group resorces in logical way.

Please, return to me if you have other impressions. I'm very interested in.

Thanks

Alberto

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Game Builder Plugin
« Reply #3 on: June 27, 2006, 11:29:43 pm »
Well, if you get this to work, then no doubt it will be a great addition to Code::Blocks. :)

I just wanted to warn you because writing a game engine is a *lot* more complicated than it appears at first sight (supposed you're writing more than tetris), and I was not sure if you were aware of that.
In my experience, it is not just about placing a camera and display a few meshes. Often, the things that you don't see are the ones difficult to do. Everybody can write a demo in OpenGL, but very few manage to write a working game.

But if you are experienced in that domain, please go on, a plugin like that would be quite revolutionary, and we sure would be happy to have it :)
« Last Edit: June 27, 2006, 11:31:30 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: Game Builder Plugin
« Reply #4 on: June 28, 2006, 12:21:13 am »
I understand you want (please correct me if I'm wrong):

* Write program allowing to automatically create game (so it require resource manager and some editors working on that resources)
* C::B will be used as compiler for created source code and will manage project

Ok, that's possible (I've written 3D editor as plugin created for my MA Thesis and it works nice :D). You have full access to almost every part of C::B when writing plugin so it's really no problem. I see that problem will be amount of work required here.

I think, that generating full game source code may be bad idea. IIRC this code would do some standard game things like main loop, input handling, event processing etc. Why not create one library handling all those things instead? If this library will be customizable enough it will work exactly as generated source code. And it will be easier to write and test. I don't think that performance will be bad. Customization of f.ex. event handlers may be done using some scripting language (f.ex. Unreal uses UnrealScript and it works fine). Or some other representation could be used. Even user-defined source could be used here but only functions which are specific for creted game.

Writing code generators for wxSmith was easy because one item generated usually one or two lines of code. It was easy to find bugs in this code. When generating whole files it may be really hard to do. But if you would like to use code-generation Idea, library or test program would be also good at the beginning. when it will be stable, source may be used to create code generators.

One more word about scripting. I know I've read somewhere about adventages of strong division between source code (which should be almost the same in any game using same game engine) and resources (which exactly say how game should behave) but I don't remember exactly where. It should be in one of "Game Programming Gems" or some atricle about writing scripting engine in FlipCode. Author suggested to always remember about that border and not to put anything on the other side.

Good luck :)