Making my own game engine

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Wdenslow
Posts: 8
Joined: Thu Jan 15, 2009 11:02 pm

Making my own game engine

Post by Wdenslow »

Hey everyone. First post. :D

Recently I have been working on my own game engine. I was wondering if I could use irrlicht's source code and incorporate it into my engine. If this is possible how would i go about doing this. I am useing Visual Studio C++. I would like to use it as the renderer.

Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Check example 14.
Wdenslow
Posts: 8
Joined: Thu Jan 15, 2009 11:02 pm

Post by Wdenslow »

But, how would I go about doing this? I see the example. Thats exactly what I want.

Edit: Maybe I should incorporate irrEdit. I'm looking for a 3d editor window and renderer.
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

I find that creating tool pipelines instead of massive scale tools is better.things like max,maya,blender all have scripting and its easier then falling down a well.
Making a 'game engine' is a large task,and instead of spending a year on a half functional editor, look into coming up with a simple data format..pumping things out of a normal 3d app with attributes,and then loading them at run time.this is normal for most game engines.

There was an awesome talk from xna gamefest 2007,it covers a lot of information on halo3 and other game engines that use this kind of process,where creating a level editor when you can already load a level,makes things much easier.

Check the microsoft.com website and search for gamefest slides.

Hope it helps you decide
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Wdenslow wrote:But, how would I go about doing this? I see the example. Thats exactly what I want.
And you have the source that shows you how to do it. If you have a specific question or problem, then we can help you. Without knowing more about your requirements, there's not much we can say other than that.

Wdenslow wrote:Edit: Maybe I should incorporate irrEdit. I'm looking for a 3d editor window and renderer.
IrrEdit is a separate closed source product, unless you want to pay its author for a source license. IrrEdit uses Irrlicht as its renderer, which should give you confidence that you can do likewise.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Wdenslow
Posts: 8
Joined: Thu Jan 15, 2009 11:02 pm

Post by Wdenslow »

I see. Thank you.

Well I want to use irrlicht in a real-time editor.

I'll let you know how i'm getting along after I understand this source code.
Wdenslow
Posts: 8
Joined: Thu Jan 15, 2009 11:02 pm

Post by Wdenslow »

Hey I'm back again to give you guys another headache.

Ok, so I went through the code for example 14. There are two parts to the code; The windows specific one, and the Irrlicht specific one. Does the windows specific coding only create a window for Irrlicht to use?
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

You can use pretty much any Window handle. Note that the example creates a (literal) "BUTTON" class Window. Presumably your editor app has a client Window with an HWND that you can tell Irrlicht to render into?

Just for laughs, here's a demonstration that you can display Irrlicht inside its own debug console window if you really wanted to.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

it's also funny to run Irrlicht inside Notepad :lol:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Wdenslow
Posts: 8
Joined: Thu Jan 15, 2009 11:02 pm

Post by Wdenslow »

When building my program I get the error message:

Code: Select all

fatal error C1083: Cannot open include file: 'irrlicht.h': No such file or directory
Where is Irrlicht.h? I cannot find it. I assume I need to have this header loaded as one of my solution files.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Irrlicht.h is in the Irrlicht SDK's include directory.

You'll need to set your compiler/IDE up so that it can find Irrlicht.h and also Irrlicht.lib, which is in lib\Win32-visualstudio\

This is (sort of) explained here except that the lib directory is now lib\Win32-visualstudio instead of lib\visualstudio.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Wdenslow
Posts: 8
Joined: Thu Jan 15, 2009 11:02 pm

Post by Wdenslow »

So I loaded all the files like the tut showed me, but when I went to build my program I had seven build errors.
Error 1 error C3862: 'irr::IReferenceCounted::drop': cannot compile an unmanaged function with /clr:pure or /clr:safe c:\users\will\downloads\c\irrlicht-1.5\irrlicht-1.5\include\IReferenceCounted.h 116

Error 2 error C3821: 'irr::IReferenceCounted::~IReferenceCounted': managed type or function cannot be used in an unmanaged function c:\users\will\downloads\c\irrlicht-1.5\irrlicht-1.5\include\IReferenceCounted.h 124
Error 3 error C3642: 'void *irr::IReferenceCounted::__delDtor(unsigned int)' : cannot call a function with __clrcall calling convention from native code c:\users\will\downloads\c\irrlicht-1.5\irrlicht-1.5\include\IReferenceCounted.h 124
Error 4 error C3645: 'irr::IReferenceCounted::drop' : __clrcall cannot be used on functions compiled to native code c:\users\will\downloads\c\irrlicht-1.5\irrlicht-1.5\include\IReferenceCounted.h 116
Error 6 error C3641: 'CustomWndProc' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe c:\Users\Will\Downloads\C\irrlicht-1.5\irrlicht-1.5\examples\14.Win32Window\main.cpp 26
Error 7 error C2664: 'FindWindowW' : cannot convert parameter 1 from 'const char [9]' to 'LPCWSTR' c:\Users\Will\Downloads\C\irrlicht-1.5\irrlicht-1.5\examples\14.Win32Window\main.cpp 61
Error 8 fatal error C1903: unable to recover from previous error(s); stopping compilation c:\Users\Will\Downloads\C\irrlicht-1.5\irrlicht-1.5\examples\14.Win32Window\main.cpp 61
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You should learn to use your compiler properly before starting the actual programming stuff. You have chosen wrong settings.
Wdenslow
Posts: 8
Joined: Thu Jan 15, 2009 11:02 pm

Post by Wdenslow »

hybrid wrote:You should learn to use your compiler properly before starting the actual programming stuff. You have chosen wrong settings.
How so?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Documentation, manuals, MSDN, google, ...
Post Reply