Author Topic: c++ oop code and oop dlls within Oxygen, success!  (Read 3627 times)

0 Members and 1 Guest are viewing this topic.

kryton9

  • Guest
c++ oop code and oop dlls within Oxygen, success!
« on: September 25, 2011, 12:03:34 PM »
I am happy to report that I made a dynamic link library (dll) via c++, mingw and codeblocks while using the SFML oop cross platform library. This means that I can work on my game engine in c++ and then easily make it available to oxygen via a dll in the future when I finish it. This was just a simple test to see if it was possible and it surprised me how easy it was as you will see the couple lines of code in the oxygen file.

[attachment deleted by admin]

Aurel

  • Guest
Re: c++ oop code and oop dlls within Oxygen, success!
« Reply #1 on: September 25, 2011, 12:42:25 PM »
Hey Kent...
Thats work great... ;)

Charles Pegge

  • Guest
Re: c++ oop code and oop dlls within Oxygen, success!
« Reply #2 on: September 25, 2011, 01:25:49 PM »

Thanks Kent. This breaks the ice and will aid code development as you create new library calls.

O2 OOP calls to a C++ OOP library may require special attention. Please let me know if you need any help on this.

Charles

kryton9

  • Guest
Re: c++ oop code and oop dlls within Oxygen, success!
« Reply #3 on: September 25, 2011, 01:37:55 PM »
Thanks for the quick reply guys and I am glad it worked for you guys as well... always a good sign.

I will experiment with different libraries. Irrlicht does all that SFML does in addition it allows importing many mesh formats and has basic collision and has been linked up with other physics engines and only requires one dll plus any physics dll. I might have a go at that next for a test.

Peter

  • Guest
Re: c++ oop code and oop dlls within Oxygen, success!
« Reply #4 on: September 25, 2011, 01:52:18 PM »
I had no problems to see your demo.

kryton9

  • Guest
Now Irrlicht Test
« Reply #5 on: September 26, 2011, 08:13:05 PM »
I decided to try a test with Irrlicht and glad to report it works.

The benefits of Irrlicht. It is the only library I have found where everything but sound and advanced physics is wrapped into one dll.
Irrlicht is cross platform.

I will see how far I can get in creating a game engine with it. I am not going to write a wrapper for Irrlicht and make a one to one translation. Irrlicht isn't a game engine anyways. It is a platform independent graphics library, with image and model loading, and with simple collision support. These are not easy and they have a done a good job with Irrlicht getting it all to work in one simple dll.

[attachment deleted by admin]

Peter

  • Guest
Re: c++ oop code and oop dlls within Oxygen, success!
« Reply #6 on: September 27, 2011, 02:34:11 AM »
well done, kent !

here is your darling SĂ­dney.
press the left mouse button and move your mouse.

Code: [Select]
indexBase 0
include "window.h"

SetWindow "ImageMouse",800,800,w_2
SetFont 10,24,700,"courier"
sys_mode=4    'smooth
SetColorKey 255,128,255

sys bild
bild= LoadBmp "bmp/sidney.bmp",1

cls (65535)
While WinExit=0
iF MouseButton=1
   cls (65535)
   SetBmp bild,0,0,xMouse*2,yMouse*2,0
End iF
DoEvents
SwapBuffers
WaitFrames 60
Wend
WinEnd





kryton9

  • Guest
Re: c++ oop code and oop dlls within Oxygen, success!
« Reply #7 on: September 27, 2011, 01:12:19 PM »
window.h is not included with the file. I downloaded one by searching the forums, but I am getting a function parameter mismatch. So you must have a newer version of that include file Peter.

Charles Pegge

  • Guest
Re: c++ oop code and oop dlls within Oxygen, success!
« Reply #8 on: September 27, 2011, 02:00:48 PM »
Kent,

This one is taken from "Happy Particles".

I have modified it for compatibility with the current Oxygen as well as prior versions.

Charles