Using XNA content pipeline with SharpDX game for Windows Phone 8 - windows-phone-8

I've decided to try out SharpDX for my first Windows Phone game but I'm having troubles setting up Content Pipeline working.
I have tried creating an XNA Content Project and dummy XNA Game Library project (just to reference Content project from) but I've got SharpDX.Toolkit.Content.AssetNotFoundException when I tried to load a texture.
Second try was to use XNA 4.0 Content Compiler to get .xnb file and add it manually to my project but again I've got AssetNotFoundException.
The Content.RootDirectory is set to correct value ("Content", the name of an XNA Content Project in first try, and a name of folder containing .xnb file in second try), so that's probably not an issue.
So, the real question is, how to load a Texture2D from file in SharpDX project?

SharpDX Toolkit is not a XNA compatible API/implementation, and thus, is not able to load XNA content. It is a high level API for Direct3D11, with some XNA like interfaces/features (SpriteBatch, BasicEffect, ContentManager...etc.) but not binary compatible with XNA. If you want to work with legacy XNA projects, you will have to use a library like MonoGame

Have you tried to create Windows Phone 8 project using MonoGame project template? MonoGame make it a lot easier to create XNA game on WP8 (it uses SharpDX under the cover). You can download the latest framework from here: http://monogame.codeplex.com/releases/view/102870

Related

Why use Service.Model from Silverlight for WindowsPhone?

I understood Silverlight was drop by MS.
I create my first app permitting to read RSS in WindowsPhone and I need to add a reference to System.ServiceModel.Syndication.dll. In the doc http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh487167(v=vs.105).aspx, I need to find this lib in Microsoft SDKs/Silverlight/v4.0/Libraries/Client/.Why should I do it? Why I can't add directly a lib from the standard .net4?
Can you help me to understand.
[UPDATE]
When I add the lib from C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\
Visual Studio shows a windows "Adding reference to Windows Phone XNA assembly is safe. However adding reference to a silverlight assembly may lead to unexpexted application behavior. Do you want to continue.
So my assumption is this lib shoudn't be use but I don't find another way.
Maybe by add a ref from .Net 4 or 4.5.
Best regards,
Alexandre
The Windows Phone 7 SDK was built on top of Silverlight. For Windows Phone 8 this was changed so that there isn't a direct history with Silverlight but it was based on WinRT instead. Lots of functionality was made available to Silverlight controls to support backwards compatibility with apps written for 7.
Because WinRT is not compatible with classes written for the full version of the framework you cannot use these in your Windows Phone apps.
The warning you are getting is just a warning. It's telling you that your doing something that isn't an ideal and so you may have issues. Unfortunately there are no other versions of the SyndicationFeed object available to Windows Phone apps so you'll need to use this library if you want the functionality of SyndicationFeed without recreating it yourself. The good news is that there are no issue with using this class in your app. Just be sure to test carefully, on real devices, if you start to use other functionality from that assembly because, as the warning says: "there may be unexpected behaviour".

How to develop cocos2d-x game for android & iphone?

I want to develop an cocos2d-x game for android & iphone. I don't know from were to start my development. I know there is an template available for iphone, but after creating it on iphone how build it for android platform?
And what if i want to develop game form the eclipse itself rather then developing on iPhone and then migrating to android
I had already tried various tutorials of ray wenderlich, tutorial on cocos2d-x.org, http://paralaxer.com/cocos2d-x-project-setup/, http://www.multigesture.net/articles/how-to-setup-cocos2d-x-windows-and-android/, http://www.jesusbosch.com/2012/06/how-to-set-up-android-and-win32-cocos2d.html, http://gameit.ro/2012/01/creating-an-iphone-and-android-cocos2d-x-hybrid-project-updated/
From all of the above tutorials i am not able to get any proper solution.
Also tell me should i have to develop(code) on iPhone and then build for android?
Thank You in advance
simple :
-> Framework : cocos2d-X
-> Editor : Xcode
-> Language : C++
once you complete your Game for iphone then You can port your this game to any platform like Android or Windows. you already have all useful links . still follow this :
Setting_up_Android_Development_Environment_on_Mac_OSX :
http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Setting_up_Android_Development_Environment_on_Mac_OSX
How to port your project to win32,iPhone and Android
http://www.cocos2d-x.org/boards/6/topics/3001
Integrate Cocos2d-x (C++) into an Android application (Java)
http://jpsarda.tumblr.com/post/26000816688/integrate-cocos2d-x-c-into-an-android-application
-> You just have to convert this native code using some JNI or say NDK .
-> using Cocos2d-x u can Develop games on Windows, Mac OS and Linux .
Personally if you are deploying to multiple platforms your best bet is to use a gaming engine. Currently Unity3D, UDK, and newly released Havok's Anarchy Engine supports deployment to these platforms and more. This way you can develop once and deploy to multiple locations. Cost is free for Havok, UDK if you are a small company, and I believe Unity3D now has free licensing to iOS and Android for their non-Pro versions.
I think going this route is far more promising than using cocos2d
The method I use is to use the templates for both iOS and Android that create projects for Xcode and Eclipse respectively. When you have this, you remove the Classes and Resources folders in for example the Eclipse project and replace those folders with links to the Xcode folders Classes and Resources.
What you now have is two projects, one for iOS and one for Android, that both use the same C++ code and resources. You can now choose which of Xcode and Eclipse that you prefer to use when developing and just switch to the other to compile for that platform and do testing and releasing there.
Hope that helps. :)
Look in cocos2d-x folder under /tools/project-creator/create-project.py , you should run that and it will create project for many platforms already set-up and from there you can just code in XCode, and platforms will share same source code.

Where do I put admobs .Jar file in Flash Pro CS5.5?

I have created an app in Flash CS5.5 and would like to put admobs advertisements in it.
I am having problems figuring out where to put the .jar file that comes with admobs.
All the tutorials say put it in "build path", but there is no build path option in Flash Pro CS5.5
Flash Develop and I are not on good terms right now, and I am currently using Sublime Text 2 for coding all of the as3 and xml.
Can someone give some advice on how to get this working with the programs I am using?
JAR files are for Java applications and will not work with Actionscript.
Depending on the platform that you are targeting you will have to choose an alternative way to deploy AdMobs. For instance, if you are trying to use AdMobs on an AIR app targeting Android or iOS you can use an ANE (AIR Native Extension) such as this one.

Windows store app game

I want to create simple 2D game (touch/click to win) and I have experience with C# and XNA for WP7.
But now at W8 there isn't XNA afaik.
What technologies I have to use for this game?
I want to run it on desktop W8 and WinRT.
Thank you for your help!
If the game is simple enough graphically - you could just use Silverlight on Windows Phone and XAML on Windows 8 which would let you share a lot of the code. Another option is to use XNA on Windows Phone and MonoGame on Windows 8. MonoGame is an open source version of XNA. Otherwise - on Windows you can use DirectX with C++ or using SharpDX with C#, but these are not available on WP7. They will probably be on WP8 only. Finally - Unity3D support is coming soon, but the final version is not available yet.

Flash Builder: Mobile AS3 Project or Mobile Flex Project?

This month I started to play with Flash Builder because I don't have a mac to create native iPhone apps.
I have made a Flex Mobile Project and an AS3 Mobile project. Both do mostly exact the same and I see great differences in operation speed (AS3 version is much faster). Also the size of the AS3 version is less than the size of the Flex version when I deploy the project.
But one thing disappoints me, the size of a deployed AS3 app (Android) is still about 8MB. I think that is quite huge for a simple app, or is it normal? I did not test the iOS version because I am not an Apple Developer member (is there a trick to deploy an iOS app with fake certificates)?
Resources I have used in the apps:
Two images approx. 35kb in size
A StageWebView
I want to know:
What is the average size of a simple app when it is a native app (apk file)?
What is the difference between an AS3 app and a Flex app except the libraries that re used?
Is the AS3 app converted to C or another language?
Why is the apk so huge (IMO)?
Is there a trick to deploy an iOS app with fake certificates? (just for testing)
Thanks for the answer(s).
What is the average size of a simple app when it is native app (apk file)?
I have no idea. When you were comparing sizes; did you export a release build or a debug version? The full version of my app; using Captive Runtime is 12MB. That includes all the embedded images. I thought that roughly 8MB is the size of the embedded runtime. Of course, if you don't use Captive Runtime then the app will be smaller; but it will have a depency on the user having the runtime installed.
What is the difference between an AS3 app and a Flex app except the libraries that are used?
For all intents and purposes nothing. The Flex Framework will need to execute code to setup the framework and such. In theory this 'impact' is offset by the value that the framework brings.
- Is the AS3 app converted to C or other language?
Not for Android or Playbook. It relies on the Mobile AIR Runtime--which I assume is written as a native app somehow. For iOS there is a more in depth conversion taking place; but no on knows the exact magic sauce; but it the process is much more intensive than Android or Playbook and people believe that your code and the AIR Runtime is converted to Objective C somehow in a way that is not in violation of the Apple licensing agreement.
Why is the apk so huge (IMO)?
Huge is open to interpretation. Without seeing your full app code; it's tough to judge.
Is there a trick to deploy an iOS app with fake certificates? (just for testing)
I don't think so; although there may be possibilities on unlocked devices.
You would like to use Mobile AS3 Project if you want you apps to be smaller and your GUI mainly contains vector graphics and Mobile Flex Project if you prefer to use standart GUI Controls that comes together with Flex framework but adds overhead in size because of controls that come with it.
As of the other questions:
the size of the apps is different on mobile platforms. Typical iOS app is about 2MB - 20MB. It really depends on resources you store with your app. What might be important to you is not to overcome 20MB if not needed because 20MB+ apps require Wi-Fi connection to be downloaded.
(However you should export release build version only as mentioned by www.Flextras.com)
there is no fundamental difference between AS3 and Flex apps - they both compile to the same instructions that executes on targeted mobile platform.
as far as I know (being iOS developer myself) there is no workaround to deploy an iOS apps. You need to use Mac and become Apple Developer to deploy with valid certificate.
to make your app smaller try to pai special attention to the resources you add to the project. Although I believe the size is so big because of framework itself, you would like to use more vector graphics vs. bitmaps when compiling apps with Flash/Flex.
When you export for Android you have an option of embedding the air framework in the application, that way your users don't have to download air. you can export your application without air embed which will result in a much lighter application, however your users will need to download air runtime. http://cookbooks.adobe.com/post_How_do_I_create_an_AIR_application_for_Android_tha-19299.html