Google

Mogre quick start projects

Discussion regarding the Managed .Net Wrapper for Ogre, MOGRE (http://sourceforge.net/projects/mogre)

Moderators: OGRE Team, MOGRE Moderators

Mogre quick start projects

Postby mstoyke » Fri Jul 30, 2010 10:41 pm

Some people have problems using the latest Mogre version, so I decided to use one of my old projects to create a lightweight start project that can be used to quickly get something running. The Mogre 1.7.1 thread got an update with information where to find the repository.

My long term plans for this project is to add all the add-ons that users created and create simple to use modules to get them running in your project. I think that this will attract more people to Mogre and (hopefully) will reduce the problems that some users encountered so far.

Let me know what you think of this project and any suggestions which add-ons you would like to see added to this project are welcome.

My list so far for future development:
  • MyGUI (a powerful GUI system, it even has its own graphical layout editor)
  • PhysX (for physics simulation and collision detection)
  • FreeSL (for sound and music playback and 3D sound support)
  • MOIS (for user input, mouse, keyboard and gamepad)
  • Particle Universe (you will need to buy a license from FXpression to use this)
  • OgreVideo (to play videos, either fullscreen or as a texture)

If you like to help us to extend this project and/or work on some other add-ons that I have not listed yet, just send me a PM.

For this message the author mstoyke has received 3 kudos
mstoyke
Gremlin
 
Posts: 199
Kudos: 19
Joined: 25 May 2009
Location: Germany

Re: Mogre quick start projects

Postby mstoyke » Sat Jul 31, 2010 3:41 am

Development of new features will always take place in feature branches that are all merged back into the main branch.

There are currently these branches in the repository:
  • default - The main branch with all features merged in one big project.
  • Simple - The basic quick start project without any of the advanced features.
  • StateManager - The development branch for a simple application state manager.

If you only want the basic quick start framework, use the Simple branch as a basis for your project. On the other hand, using the default branch will always provide you with all the latest features of this project.

All the other feature branches can be safely ignored and should only be used by experienced developers who know what they are doing :)

The idea is to keep the code in the default branch as stable as possible, that's why I use feature branches to work on certain parts of the project first and only merge these changes into the main branch when they are properly tested.

There is no proper exception handling implemented yet, so the project will be in beta status until further notice.
mstoyke
Gremlin
 
Posts: 199
Kudos: 19
Joined: 25 May 2009
Location: Germany

Re: Mogre quick start projects

Postby mstoyke » Sat Jul 31, 2010 3:57 am

I will explain the purpose of certain features here.

State manager:
Usually applications, especially games, have different main states. I will use a game for my examples, because that's what I'm most interested in.

The first state could be called Intro, this is where the developers logo is shown.
Next is the Menu state, this is where users can select, for example, to start a new game, load a saved game or quit the game.
The most complex state is the Game state, this state is active when the users is playing the game.

There might be many more states, some developers prefer to have a distinct state for every sub-menu, like Options, Credits and so on.

My simple state manager here needs an initial state, this is the first state the application will use when it is started. To prevent some nasty problems a state change is internally stored as a request and will be executed in the next frame, just before any game logic is updated. Otherwise you could change to another state while the previous state is still being processed which can problems when resources are disposed while they might still be needed.

Every state has it's own class, derived from a base class named State. To switch to another state the RequestStateChange function will take the type of the derived state class as parameter. An instance of this class will then be created when the actual state change is executed.
mstoyke
Gremlin
 
Posts: 199
Kudos: 19
Joined: 25 May 2009
Location: Germany

Re: Mogre quick start projects

Postby zarfius » Tue Aug 03, 2010 5:25 am

I think this is a great idea.

I've managed to pull together some of those systems for my projects so I understand the pain it can be to get up and running.
Making tools for game developers
http://www.dylanwilson.net/
User avatar
zarfius
Goblin
 
Posts: 234
Kudos: 24
Joined: 09 Jul 2008
Location: Brisbane, Australia

Re: Mogre quick start projects

Postby Pyritie » Mon Aug 09, 2010 7:24 pm

Could definitely be useful - a friend (who's a lot better at C# than me) rigged my game up with ninject. It's... handy, if not a bit overkill.

But the state thing sounds interesting :0 Would it make stuff like level switching easier?
I use Mogre, BulletSharp, LuaNetInterface, irrKlang, and Miyagi! | Ponykart
Image
User avatar
Pyritie
Greenskin
 
Posts: 133
Kudos: 6
Joined: 06 Mar 2009

Re: Mogre quick start projects

Postby mstoyke » Mon Aug 09, 2010 7:59 pm

Pyritie wrote:But the state thing sounds interesting :0 Would it make stuff like level switching easier?


You could create a state for every level, so instead of a "game runnning" state there would be states like "level 1", "level 2", ... I usually prefer a more data driven design, but for a smaller game that would be overkill.

Another valid design is to use sub-states, you could just use another state manager inside the game state. the main state would be "game running" and the sub-states are "level 1", level 2", ... Maybe I will add sub-states as an example later, but there are more important tasks that I need to finish first.
mstoyke
Gremlin
 
Posts: 199
Kudos: 19
Joined: 25 May 2009
Location: Germany

Re: Mogre quick start projects

Postby Beauty » Sat Aug 14, 2010 11:59 pm

I just want to tell you, that there is an older project which has the similar name Mogre Quick Start.
Wiki wrote:MogreQuickStart is a .NET class written in Visual Basic 2008. It's goal is to provide a quick entry point to easily write Mogre applications.

http://www.ogre3d.org/tikiwiki/MogreQuickStart

I never tried this project and I don't know details, but the idea is interesting - give newcomers a workaround. (Maybe like the MogreFramework?)
The content wasn't been updated for a while, but maybe it's useful to fresh it up (update DLLs, remove broken french comments, leave english comments). It's Visual Basic, but a code converter could make C# out of it.
For feedback with the author, you can use the projects forum thread.
Help to add information to the wiki. Also tiny edits will let it grow ... :idea:
Add your country to your profile ... it's interesting to know from where of the world you are.
IRC chat ... Mogre: irc://freenode/#mogre ... Ogre: irc://freenode/#ogre3d
User avatar
Beauty
OGRE Community Helper
 
Posts: 1645
Kudos: 37
Joined: 09 May 2007
Location: Germany

Re: Mogre quick start projects

Postby mstoyke » Sun Aug 15, 2010 12:34 am

Beauty wrote:I just want to tell you, that there is an older project which has the similar name Mogre Quick Start.
Wiki wrote:MogreQuickStart is a .NET class written in Visual Basic 2008. It's goal is to provide a quick entry point to easily write Mogre applications.

http://www.ogre3d.org/tikiwiki/MogreQuickStart

I'm aware of the wiki page. In fact the scene loader that is also posted there did a great job for me in the past when I had to rapidly prototype something.

Beauty wrote:I never tried this project and I don't know details, but the idea is interesting - give newcomers a workaround. (Maybe like the MogreFramework?)
The content wasn't been updated for a while, but maybe it's useful to fresh it up (update DLLs, remove broken french comments, leave english comments). It's Visual Basic, but a code converter could make C# out of it.
For feedback with the author, you can use the projects forum thread.

It's good that there is some VB code out there for VB users to start with. I personally hate VB, but that is only my opinion and there are still many users who like it or did not learn any other languages yet. So keep the VB quick start project for them and I keep updating the C# quick start project.

My goals for my quick start project are a little bit different. I don't want to provide one big, monolithic block of code. The project will be extended in a very modular way and, in long terms, will support everything that might be useful for people out there.

Every new module will be developed in its own branch and the main branch will contain a combination of modules that I think will work together best. But people will be able to combine the feature set they prefer by just merging the branches that they need. So even if I decide to merge PhysX in the main branch, because I like it most, others will still be able to use Newton instead.
mstoyke
Gremlin
 
Posts: 199
Kudos: 19
Joined: 25 May 2009
Location: Germany

Re: Mogre quick start projects

Postby Beauty » Sun Aug 15, 2010 1:27 am

When I looked to you Quick Start files, I just saw a collection of binaries (as I remember). Because of this I wrote about the page which also includes code.
I didn't know that there is a scene file loader inside. Which format does it support? Maybe I can extract it and put it to its own page (VB and C#) - at least if there is no other wiki page for loading this file type.
Help to add information to the wiki. Also tiny edits will let it grow ... :idea:
Add your country to your profile ... it's interesting to know from where of the world you are.
IRC chat ... Mogre: irc://freenode/#mogre ... Ogre: irc://freenode/#ogre3d
User avatar
Beauty
OGRE Community Helper
 
Posts: 1645
Kudos: 37
Joined: 09 May 2007
Location: Germany

Re: Mogre quick start projects

Postby mstoyke » Sun Aug 15, 2010 1:45 am

Beauty wrote:I didn't know that there is a scene file loader inside. Which format does it support? Maybe I can extract it and put it to its own page (VB and C#) - at least if there is no other wiki page for loading this file type.

It is a loader for the dotscene format. With some small changed I could use it to import files that are created by the OgreMax exporter.

The most important thing to know about the parser is, the application culture in .NET affects number formats. Because I used a german version of Windows and the number format uses "," as a decimal point it got confused by the US number format which uses "." as decimal point.

When you try to parse "1.00" with a german culture set in the system, it will interpret it as "100". That creates some nasty effects for positions, but especially for color values. I usually first change the application culture to neutral in most of my programs, that prevents a lot of hard to find bugs later.
mstoyke
Gremlin
 
Posts: 199
Kudos: 19
Joined: 25 May 2009
Location: Germany

Re: Mogre quick start projects

Postby Beauty » Sun Aug 15, 2010 3:22 pm

On this page I only read something about OSM loader. The comment says it's related to Object Fusion. What is Object Fusion? On a web search I only found a web page editor with a similar name.
The loader code is a copy of the MOGRE OSMSceneLoader 2.
If this is a dotScene loader, I would add a note.

For Mogre there is also a loader available on wiki page MOGRE dotSceneLoader.




Related to the decimal seperator: For string parsing of the Convert class I always add the english culture as argument to avoid such problems. This should work on each culture setting of an application. Good would be to add this parameter to all public source code, where this problems could happen.

For example
Code: Select all
Single myValue = Convert.ToSingle(text, EnglishCulture());


EnglishCulture() is a static method which I created for more easy handling.
It's shorter than calling new System.Globalization.CultureInfo("en-US") as argument.

Here is my definition of EnglishCulture, which I can call from each file of my project.
Code: Select all
public static System.Globalization.CultureInfo EnglishCulture()
{
    return new System.Globalization.CultureInfo("en-US");  // "." as decimal char
}
Help to add information to the wiki. Also tiny edits will let it grow ... :idea:
Add your country to your profile ... it's interesting to know from where of the world you are.
IRC chat ... Mogre: irc://freenode/#mogre ... Ogre: irc://freenode/#ogre3d
User avatar
Beauty
OGRE Community Helper
 
Posts: 1645
Kudos: 37
Joined: 09 May 2007
Location: Germany

Re: Mogre quick start projects

Postby koirat » Sun Aug 15, 2010 3:30 pm

Instead of using CultureInfo("en-US").
You can use CultureInfo.InvariantCulture.
This is a block of text that can be added to posts you make. There is a 255 character limit.
User avatar
koirat
Gremlin
 
Posts: 180
Kudos: 0
Joined: 25 Feb 2008

Re: Mogre quick start projects

Postby mstoyke » Tue Aug 17, 2010 10:21 am

Beauty wrote:On this page I only read something about OSM loader. The comment says it's related to Object Fusion. What is Object Fusion? On a web search I only found a web page editor with a similar name.
The loader code is a copy of the MOGRE OSMSceneLoader 2.
If this is a dotScene loader, I would add a note.


Sorry I got it wrong. The code on the quick start wiki page is indeed for oFusion exported scenes, not for the dotscene format.
mstoyke
Gremlin
 
Posts: 199
Kudos: 19
Joined: 25 May 2009
Location: Germany

Re: Mogre quick start projects

Postby Valek » Mon Nov 22, 2010 8:10 pm

Are there still any plans to put support into this for MyGUI? I noticed the last addition to this was 3 months ago, and the addition of a MyGUI quickstart with Mogre would be extremely useful to me.
Valek
Gnoblar
 
Posts: 1
Kudos: 0
Joined: 22 Nov 2010

Re: Mogre quick start projects

Postby mstoyke » Tue Nov 23, 2010 11:52 am

As I mentioned before, any projects besides the Mogre core development project will get support depending on the amount of feedback I get. So if nobody ever sends feedback about quickstart, I assume that nobody is interested in the project anymore. I will extend this project eventually, MyGUI and MOIS are two issues on my related to-do list, but it won't be too soon.
mstoyke
Gremlin
 
Posts: 199
Kudos: 19
Joined: 25 May 2009
Location: Germany

Next

Return to MOGRE

Who is online

Users browsing this forum: No registered users and 2 guests