How we will code a media player using slimdx n c# coding
Try borrowing this guy's code... you'll have to translate it from VB but appears most of what you're looking for is there.
Related
I have a question.
I'm trying to make a runner game with 2 characters not one. I've done the movement and the camera related stuff.
Now I'm trying to add the Game Manager.
The problem is that my Game Manager isn't able to accesss the PlayerMotor of both characters.
I found a tutorial on Youtube that uses a singleton but it accesses only one player character which is obvious cause it's a singleton. So can you help me out guys? Unfortunately I'm not a programmer so I can't figure it out.
How can the Game Manager access both of their PlayerMotor instances to start the game?
From: Unity - Scripting API: Object.FindObjectsOfType
You can retrieve your Playermotor scripts by using FindObjectsOfType like that:
var playersMotor = Object.FindObjectsOfType<Playermotor>(); // find Playermotor scripts in your scene and store it in playersMotor
Or:
var playersMotor = Object.FindObjectsOfType(typeof(Playermotor));
I am new to iOS development and apologies for a basic question. I am trying to convert an image to grayscaled and threshold it using openCV in iOS. So far, I have imported and setup the framework on xcode. What I am trying to do now is to implement the following features:
http://www.youtube.com/watch?feature=player_embedded&v=Ko3K_xdhJ1I
at 0:24 and 0:53
I tried to follow the tutorial which points to the above youtube video :
http://docs.opencv.org/doc/tutorials/ios/image_manipulation/image_manipulation.html
and wasn't sure where to paste the above code and in which file?
Many thanks.
Kind Regards.
These are helper methods and best written in a separate file. Quite simply,
http://answers.oreilly.com/topic/631-how-to-get-c-and-objective-c-to-play-nicely-in-xcode/
Put all that image manipulation code in say ImageManipulationHelper.mm and create a header file for the same
Create a nice little category for UIImage.
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/CustomizingExistingClasses/CustomizingExistingClasses.html
which can call these methods in turn to create any image manipulation you might want.
Easy does it. And yeah, read up a bit more on using C++ in objectiveC, if you get into trouble and also about categories. They are some of the niftier features of objectivec
I achieved the same,using the help of this awesome link
Let me know if you need any further help.
Cheers!!
Edit :
Check this out ImageFiltering
In Unity, Wen can call objective-C code from C# by import the function of objective-C as extern function.
But how call C# script code from objective-C ?
You can use
UnitySendMessage("GameObjectName1", "MethodName1", "Message to send");
in which you fill your gameobject name which will receive this message and the message name.
You can implement your own delegate/event once you receive this message from native code. The limit of UnitySendMessage is when it arrives to Unity code, it is always 1 frame after you call this in native code. And it can only take string as parameter. But most of time it is not big problem.
The method to be used for this is UnitySendMessage. Have a look at Building Plugins for iOS or this blog which is partially written in Chinese.
Have a look at: http://www.tinytimgames.com/2010/01/10/the-unityobjective-c-divide/
The bolg post shows a technique that uses KVO (Key Value Observation) and the PlayerPrefs to pass commands from unity to objective-c.
PlayerPrefs.SetString("Commands",
String.Format("AwesomeCommand|{0}|{1}", awesome1, awesome2));
Turns out you can create a callback method that will allow you to do whatever you want.
Here is an example video showing it being done for OSX, but the C++ code is cross platform.
This guy has been doing videos on plugins for all the operating systems, but the mac one is the coolest so far, since it gives you function pointers to C# code.
http://www.youtube.com/watch?v=Q2dDK0ulDYY
Universal plugin for unity for iOS that allow mixing C# with objective-C
http://goo.gl/XDrQFh
Unity C#
var callbackClass = AKiOSMagic.CreateClass("MyCallbackClass", "NSObject");
callbackClass.AddMethod("methodWithArg:anotherArg:", (args)
{
// do something...
// args.GetObject(0);
// args.GetObject(1);
});
callbackClass.RegisterClass();
Objective-C
[[NSClassFromString(#"MyCallbackClass") new] methodWithArg:#"arg1" anotherArg:#"arg2"]
I am reading a book about iPhone game development, it uses some functions start with 'gl' and ends with 'OES'.
like this:
glGetRenderbufferParameterivOES
Where can I get reference of these functions?
you can find the man pages for OpenGL ES on the Khronos website:
http://www.khronos.org/opengles/sdk/docs/man/
As far as I know the OES extension was removed as of OpenGL ES 2.0.
Hope this helps.
http://www.khronos.org/opengles/sdk/docs/man/
In your case http://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetRenderbufferParameteriv.xml
The OES suffix just marks it as being specific to OpenGL-ES (OES).
I found Yoshimasa Niwa's article about blob detection here:
http://niw.at/articles/2009/03/14/using-opencv-on-iphone/en
And something on realtime face detection here:
http://www.morethantechnical.com/2009/08/09/near-realtime-face-detection-on-the-iphone-w-opencv-port-wcodevideo/
But what I really want to do is realtime blob detection (like http://www.youtube.com/watch?v=LIgsVoCXTXM) using the iPhone 4 camera.
I can find the headers for CvBlobDetector in cvvidsurv.hpp. But trying to use that without modification is not the right thing to do.
How do I get CvBlobDetector to work? Or is there an alternate solution?
Make sure you've followed the instructions to use it properly:
http://opencv.willowgarage.com/wiki/cvBlobsLib
One of the alternative solutions i used and it works good is:
http://code.google.com/p/cvblob/