Scrolling Game Development Kit Forum

SGDK Version 2 => Help, Errors, FAQ => Topic started by: Red_Phase on 2012-09-03, 12:17:55 PM

Title: Source code editor
Post by: Red_Phase on 2012-09-03, 12:17:55 PM
If I add a dll like say sdldotnet.dll, or tao.sdl.dll can I call functions from it in the source editor?
Title: Re: Source code editor
Post by: v6v on 2012-09-03, 05:02:35 PM
Yes. Create a new custom code object called sdldotnet.dll or tao.sdl.dll (Or whatever your DLL is) and load the dll into the source file the by clicking Embedded Data up top and clicking Load From File

You should be able to call methods from it directly with another code object EX: a new file called something like SDLSGDK2.cs after loading it in the source code editor.

Good luck.
Title: Re: Source code editor
Post by: bluemonkmn on 2012-09-04, 05:06:08 AM
You don't need to go through the Embed Data step. You just need to have the DLL file in your source code file list by creating the custom code object using the DLL's file name. I could be forgetting something, but that's my recollection of how I had intended/designed it.
Title: Re: Source code editor
Post by: v6v on 2012-09-04, 09:11:03 AM
I forgot something as well.

The thing I forgot is that you need to have a copy of the DLL file in the same directory as the SGDK2.exe. The original dll.
Title: Re: Source code editor
Post by: Red_Phase on 2012-09-05, 02:40:53 PM
Thank you very much.

I want to implement license free audio and online support.

I  was reading this...

http://msdn.microsoft.com/en-us/library/e59b22c5

Can you use unmanaged C/C++ dll's  from within SGDK2 with interop services without bugs/crashes? I mean if thats possible then using C++ only libs like RakNet(online),kaillera and CeGUI(nice user interfaces) are possible.

I mean think about it. A 2d balanced online Streetfighter 3/Alpha mod or a (fan)sequel to final fantasy IV and Crono trigger...with legit online support!
Title: Re: Source code editor
Post by: bluemonkmn on 2012-09-05, 04:38:37 PM
You could always wrap the unmanaged C++ code in a managed DLL and reference that. But I think what you're talking about is what SGDK2 projects already do when they reference FModEx.
Title: Re: Source code editor
Post by: v6v on 2012-09-05, 08:41:56 PM
Lidgren.Network runs exceptionally well with SGDK2 in terms of online support/networking, and it recieves constant updates.
AFAIK, it only needed 12 lines of code to get a server and client up and connect the two.

http://code.google.com/p/lidgren-network/wiki/Quickstart

I guess if you've had experience with Raknet, go for it.

I was wondering about free audio support that allows playback of OGG files. If and when you do discover how to do this, feel free to share.

Tigsource tells me that there's a $500 dollar license with FmodEX- for commercial games. (But who knows about the future of my games?  ;))
Title: Source code editor
Post by: IvanoFFot on 2016-02-28, 12:45:21 PM
Does anyone know where I can get the .java files for the demos on the Demos Page? All I have been able to acquire are the .class files but would like to take a look at the source code.

Thanks in advance.

___
 
XRumer 12.0.16 + SocPlugin (http://www.botmasterlabs.net/xrumer/): the BEST soft for Facebook / VK / Forums / Blogs promotion!
Title: Re: Source code editor
Post by: bluemonkmn on 2016-02-28, 01:01:28 PM
What Demos page are you referring to?
Title: Re: Source code editor
Post by: media on 2016-03-20, 05:31:53 PM
Heh, the marvels of modern day science.

The bots get more realistic every year, wouldn't you say?