Is there any way to make a First Person Shooter input in Windows 8.1? - windows

I am working on a Windows 8.1 store game.
There is no specific need for the game to be a windows store app but I use it for development since I already had code for windows store and didn't bother to migrate the input and game loop code to a traditional desktop app.
The issue I am having now is that the Pointer(which can be a mouse/touch/pen) is bound to the screen's resolution.
I didn't find any way to work around it or to set the mouse cursor so I can't create a first person shooter like aimer or pointer.
I know it is possible to do so in a traditional win32 desktop app but I wonder if this limitation is only for Windows Store apps or will I encounter the same limitation in a traditional desktop app that runs on Windows 8.1?
In other words is this limitation a Windows 8.1 thing? Or a Windows store app thing?
Is there a way to create a FPS like mouse/aimer in a windows 8.1 store app?

You can remove the app window bounds limitations and it is possibly even easier than in a Win32 app. The only thing you need to do is this:
Window.Current.CoreWindow.PointerCursor = null;
From now on handle this event to get the delta values when the mouse moves:
MouseDevice.GetForCurrentView().MouseMoved
I use it here.

Related

Can Windows store apps generate UI Events?

I am considering writing a Kinect v2.0 Gesture -> Keyboard/Mouse event translator so I can control video games. Since I will be using Microsoft's SDK, cross-platform is out-of-the-question; it seems natural to distribute this through the Windows store. However, I know Windows store apps have significant restrictions. Can a Windows store app:
Run in the background (possibly with an elevated priority to ensure that the game doesn't miss input)?
Create user input events like "key-down" and "mouse move" that will be read by other applications?
Looking at Microsoft's capability page didn't seem to give me a definite yes or no.
You'll need to write this as a desktop app. Windows Store apps run in a sandboxed context with limited access to the system. They cannot interact with other processes as you'd need, and they cannot inject input events.

Is there a way to launch an app in background in windows phone 8.1....?

I am trying to launch an app(created myself, registered for a specific uri), from another app, using
Windows.System.Launcher.LaunchUriAsync(uri, options); an I was able to do it.
I want set the options such a way that my calling app remains on top. I read that it can be done on windows desktop by setting LauncherOptions.DesiredRemainingView
, which is not supported by Windows Phone. Is there any other way to achieve the same?
No, there is no way to do that on Windows Phone. There is only one active app at a time, and it is the one in the foreground.
There are background agents for things like VoIP and music, but that won't do what you want.

Reduce blink windows phone 7 flash

What is the best approach to set a Windows Phone 7 led to torch mode? I have used http://www.locked.nl/wp7-flashlight-getting-started but using reflection and/or the VideoCaptureDevice is not allowed. (only works on dev phone)
I have used the AutoFocusCompleted event and have tried a task (taskfactory.new) and regular task. My latest attempt uses the DispatcherTimer.
So what is the best approach to keep calling Focus and/or FocusAtPoint to minimize the blinking and get the closest to a constant light.
Windows Phone 7 - Camera Flash App Not Functioning

Is there an analogue of Windows Phone 'User Idle Detection' in Windows 8?

I've used the following code on Windows Phone 7 and 8 to disable user idle detection when my App is displaying data to the user and they are unlikely to interact with the screen e.g. A recipe App where the screen needs to stay on:
http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.phoneapplicationservice.useridledetectionmode(v=vs.92).aspx
Does anyone know if there is an analogue of this available for Windows 8 applications? My tablet app has the same requirement to disable the screen turning off. I haven't managed to find anything :-(
Many thanks,
Jon
You should use the DisplayRequest class, specifically DisplayRequest.RequestActive for this purpose. You must also remember to call DisplayRequest.RequestRelease once you are done to allow the display to sleep, for example, if you are not viewing a recipe, or you are in a menu screen, etc.

CameraCaptureTask in Windows Phone 8 - auto saves to camera roll

I have an existing application developed for Windows Phone 7, which uses CameraCaptureTask.
The captured image is returned back to the app, which will be processed for grayscale conversion.
While testing the same app (same binary to be precise) in Windows Phone 8 Lumia 920, I figured that a copy of all the images captured through the CameraCaptureTask are saved in "camera roll" folder.
This is a bit annoying as the users of my app are not expecting the captured images crowding the "camera roll" folder. I looked up the documentation http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394006(v=vs.105).aspx and found the below quote,
On Windows Phone 8, if the user accepts a photo taken with the camera capture task, the photo is automatically saved to the phone’s camera roll. On previous versions of Windows Phone, the photo is not automatically saved.
So far I couldn't find a way to avoid this case in Windows Phone 8.
Is there a way to turn off this feature before calling the CameraCaptureTask's Show() method in Windows Phone 8?
No. This is a consumer feature request implemented on WP8 that's transparent to developers. The usecase here is that a consumer uses the CameraCaptureTask to line up a perfect shot, doesn't use it an app for whatever reason and can't find it ever again later.
As a side-note, I actually had this happen a few times to me when using various twitter and photo editing apps and it's quite annoying.
Makes no sense. CameraCaptureTask was created to allow apps to capture photos for the app use, not for users to push them into Camera Roll. That is what Lenses are for (either custom code can write into camera roll as well).
It is not transparent to developers because one of my apps has just been removed from the WP8 market. They say because can cause "undesired upload of an app photo to skydrive".
Justin are you sure it isn't a bug? is it going to be fixed?
This forces me to break my development into 2 now: WP7 and WP8. I don't want that hassle right now...

Resources