Newsflash

I uploaded
API Documentation

It was generated automaticaly
with doxygen and it's still
better than nothing,
but I'll improve it!
 

Login Form






Forgotten your password?

Polls

About MyWorld
  

Who's Online

We have 7 guests online

Buttons

SourceForge.net Logo
powered_by.png, 1 kB

Wellcome to MyWorld engine

MyWorld  is an open virtual reality and game engine. It is written and usable in C/C++. It has own abstract layers for Graphics and Physics. Actually we use Irrlicht for 3D-Rendering and GUI, and ODE for Physics. It is absolutely free even for commercial products.

How to get start with MyWorld read in: Getting started with MyWorld


Home
The absolute newbies guide to MyWorld PDF Print E-mail
Written by Administrator   
Thursday, 24 November 2005

The absolute newbies guide to MyWorld


In this tutorial I am going to explain the very basic things you have to know using an API/library and special MyWorld's requirements. It is very simple to use an API, but it is a topic, wich you won't find neither in the most books about programming nor studiing at university. You normally have to find out it yourself by browsing internet and reading special literature and howto's, I guess. And once you got it, you will discover a new world for you ;-)

For this tutorial I assume you already know, what MyWorld is - Virtual Reality and Game Engine.  And I presuppose you use Windows, because the most linux user don't need a tutorial for simple stuff like that, do they? However we start now!

I will explain following topics:



Before you begin (downloads)

  • For all examples here you need VC++6. You could try to do it with later versions of Visual Studio if you want.
  • Download one of the latest MyWorld's all-in-one packages e.g. MyWorld-x.x.x-all.zip (x.x.x for a version e.g. 0.6.28)
  • Now unpack/unzip this package. MyWorld's root directory of all-in-one-package should contain 3rd subdirectory - if not, download it (3rd.zip) from MyWorld's/SF host. 3rd contains all 3-rd party libraries (for win32: lib's and dll's) and includes used by MyWorld (Irrlicht, ODE, etc..) and of MyWorld self.
  • Normally you have to create such 3rd directory yourself, but in order to make  it easier for you I just give you my 3rd.You have always to check if you use the actuall version of 3rd libraries - here is a text file with the version of it.  And may be you should know that MyWorld's libs and dlls are in bin directory, for includes use src (except main.cpp and main_gui.h). If you know what to do with libraries and includes, you can skip the rest of this tutorial.

Setting up the environment

Before you can build anything, you have to set up environment. At first we will set up pathes for lib's and includes (header files) for Irrlicht, ODE and MyWorld. After setting up the environment you should be possible to build all projects in this package including WorldExplorer, MyWorld-EXE and MyWorld-DLL and also to set up your own MyWorld based project.

The common way to set up the environment is using your IDE for libs and includes and environment variable PATH for dll's. Now I will explain you how to set  up lib's and include's in Visual Studio 6:
  • Copy (unzipped) 3rd directory to a place like C:\ the shorter the path the better for you.
  • Start Visual Studio 6
  • Now you have to set up the pathes to include, lib and bin directories of Irrlicht, ODE and MyWorld, wich are in 3rd directory. (sorry I cannot provide some pictures for it cause my studio is in german language - if somebody could send english screenshots to me, I would place them here). I try to describe it with words, because it is really simply:
    • In Visual Studio 6 go to menu: Extras > Options. In Options dialog choose tab Directories, and select in right combobox Includes (that's choosen on default). Add new items: e.g. C:\3rd\Irrlicht\include, C:\3rd\ode\include and C:\3rd\myw\include
    • Change in the same combobox (on the right) to Libraries and add two further items: e.g. C:\3rd\Irrlicht\lib, C:\3rd\ode\lib and C:\3rd\myw\lib
    • Change in combobox to Binaries(or Executables?) and add the paths of used binaries: e.g. C:\3rd\Irrlicht\bin, C:\3rd\ode\bin and C:\3rd\myw\bin
    • Submit OK-Button
In Visual Studio .NET you go to Tools > Options. Then select the Projects entry and then VC++ directories - the rest must be pretty the same.

Now we are going to set up the system variable PATH:

mycomputer's properties You could do it going to MyComputer with right click, then Properties

Select the Advanced tab

And press the [Environment Variables] button.




In "Environment Variables" dialog select in "User variables"-box the variable path.


Press [Edit] button and insert the pathes separated by semicolon...



  ... e.g.: ; C:\3rd\Irrlicht\bin; C:\3rd\ode\bin; C:\3rd\myw\bin



The changes will be readed(?) by Visual Studio on next start of it, so you would be save closing or restarting all Visual Studio instances right now ;-)


How to start and compile/build the Tutorial-Examples


Here you must see several sub directories, change to Tutorial-01-HelloWorld. Start HelloWorld.dsw (VC++6 workspace file). If you didn't changed the structure of MyWorld all-in-one-package (except changes described in "setting up the environment"), then it must be possible to compile/build this HelloWorld application: menu: build > build all. If the building was succesful, start the application <Ctrl+F5>. Press <P> to start the physical simulation.

Read the explainations in main.cpp to learn more about MyWorld, try to change some parameters - play with it. You might want now to build Tutorial-02-Billiards now - and I think you must be able to do that at your own, because it is pretty the same thing.

The same way you could compile/build all projects in this package including WorldExplorer, MyWorld-EXE and MyWorld-DLL. More about this directories read in TABLE-OF-CONTENTS.TXT


How to set up your own project using MyWorld

There we are - you just start VC++6 create new project selecting the Win32-Console-Application (or similar). Create your sorce file e.g. and fill it with code.
(!) Use following preprocessor directives:

#include <kernel/CKernel.h>
#pragma comment(lib, "MyWorld.lib")

How to use classes/functions of MyWorld is described in tutorial-examples (HelloWorld and Billiards), also check WorldExplorer and API-Documentation (in doc directory). To find/fix the bugs is very good MyWorld-EXE - also it helps you to understand MyWorld-Engine better.

I hope this tutorial helped you to start with MyWorld. If you have some trobles with it, just ask in help forum - I would like to help you. I also would very appreciate hints and suggestions how to improve this tutorial and MyWorld-Engine.

Last Updated ( Thursday, 24 November 2005 )
 
Next >
(C) 2010 MyWorld - open virtual reality and game engine
Joomla! is Free Software released under the GNU/GPL License.