I am working on a project in C# using WPF to attempt to make a program much like http://www.scaleofuniverse.com/.
I know it can easily be done in flash but I want to integrate the controls into other platforms (ie the new Leap motion and Kinect). I know I could rig it so that the kinect emulates key presses onto a flash game but i would really like to figure out making this in C#. I completed a few basic tutorials on basic animation and storyboarding but i've found nothing that indicates the project i want to complete can even be done! Am i biting off more than i can chew or am i over-complicating the program somewhere? I am only in the design stage so i do not have any source code for review (still completing tutorials). I really want to know if this project is even plausible before I continue working on it.
It definitely can be done in WPF. Here is an example of a custom zoom control for WPF http://www.ab4d.com/ZoomPanel.aspx.
Related
I am currently making a simple game in XNA but am at a point where testing various aspect gets a bit tricky, especially when you have to wait till you have 1000 score to see if your animation is playing correctly etc. Of course i could just edit the starting variable in the code before I launched but I have recently been interested in trying to implement a console style window which can print out values and take input to alter public variables during run-time.
I am aware that VS has the immediate window which achieves a similar thing but i would prefer mine is an actual part of the game with the intention that the user may have limited access to it in the future.
Some of the key things i have yet to find an answer to after looking around for a while are:
how i would support free text entry
how i would access variables during runtime
how i would edit these variable
I have also read about using a property grid from windows form aps (and partially reflection) which looked like it could simplify a lot of things but i am not sure how I would get that running inside my XNA game window or how i would get it to not look out of place (as the visual aspect of is seems to be aimed just for development time viewing).
All in all I'm quite open to any suggestions on how to approach this task as currently I'm not sure where to start. Thanks in advance.
I've used this in the past, and it worked great.
http://xnacc.codeplex.com/
It will require some programming to set it up to work with your game, but may be worth the effort if this is something that interests you.
I'm an electronics engineer used to coding in embedded C and assembly, but I decided to start learning higher-level stuff like C#, .NET, etc., so I can start making software as a hobby. I have a great idea for one of my first projects, but after searching several forums for days on end, I'm left not really knowing what would be the easiest path forward.
The functionality that I'm looking to create is pretty similar to the idea of a photo slideshow, but applied to videos instead. The program would open a playlist or a folder full of videos and then play the videos in a random order, starting from a random starting position, and with a fixed duration (let's say 10 seconds as an example). You would end up being able to watch a sort of "video montage" that consisted of small clips from random parts of the videos in the playlist, shown in a random order, ad infinitum until the program is closed.
There are a number of ways I could tackle the problem:
Develop a standalone video player with the fixed functionality of showing "video slideshows." DirectX has the Microsoft.DirectX.AudioVideoPlayback API that
could be a good starting point. I found an example here: http://www.dreamincode.net/forums/topic/111181-adding-video-to-an-application/
Modify an open source project to add the desired functionality. I've seen a few cool projects that could get me started, like this simple C# Movie Player: http://www.codeproject.com/Articles/18552/C-Movie-Player
Use a scripting interface to implement this functionality on an existing media player, like VLC or Winamp. You could also control VLC via C#, like the example here: Controlling VLC via c#
I realize that the obvious answer for most people would be to "use whatever you're most comfortable with," but since I'm a pure beginner, I don't really have any allegiances to a particular language or development environment. So, I was just curious if anybody had an idea of what might be the least painful option for a beginner.
I also apologize that this is not a very specific programming question. I'm sort of just testing the waters to get my footing. Hopefully, once I get started on the project, I'll be able to come back and post more intelligent and relevant questions!
While your background would lend you toward C#, I recommend investigating something like this and using WPF for the media player. You can then control the media player using a background worker in order to stop the video or queue up the next one. Some other .NET concepts that will be of use to you are FileInfo and DirectoryInfo objects, to provide you with the necessary information about the files. I'm not sure if you've had experience with generic data structures in .NET, but the System.Collections.Generic namespace would be a good place to start to get a feel for data structure you want to keep your playlist in. WPF will also be able to help you with transitions between video clips.
Admittedly WPF is easier with an understanding of the MVVM or MVC design patterns, but I think you'll be able to get something working without having to delve too far into that right up front.
I am working on a Kinect project that requires me to prompt the user to perform gestures. I have the gesture recognition completed, but was wanting to do something a bit more fun then having the screen just say "JUMP!".
Is there a fairly painless way to add a short video, gif or something? I would obviously have to create these animations as well, but I am more concerned with adding them to the application once I have the animations.
The animations being played would have to change throughout the program, as I will be prompting the user to perform various gestures.
I am completely open to any ideas or suggestions you guys might have.
Thanks!
Decided to try mediaElement. Seems to be working. If anyone stumbles across this, it can easily be changed in C# by setting the source attribute.
I need to use OpenGL in my WPF project. I'd prefer it to be as simple in installation as possible, but I'm beginning to lose hope.
I've tried SharpGL: it's pretty good and easy to use, but it has massive memory leaks and the app crashes after few seconds. Not very useful.
So now I am wondering: is there an alternative to this library? Actually I don't have to use OpenGL - I just need to present a 3D scene in any technology .. perhaps D3D or something else will be easier to manage in WPF...
What do you recommend?
Kind regards
Q.
Update: Yes, I'm working under Windows 7. And I'd really prefer smt. OpenGL based because I already know the technology.
Within WPF, I can easily say that using XNA will be the easiest way, which many people have done before. There's even an example project here: http://blogs.msdn.com/b/nicgrave/archive/2011/03/25/wpf-hosting-for-xna-game-studio-4-0.aspx
The Tao framework supports this: taoframework-2.1.0-setup.exe
Once you've installed it, right click on your Toolbar and select "Choose Items.." and add "SimpleOpenGlControl" from the .NET Framework Components list. If you can't find it in the list, hit browse and search for Tao.Platform.Windows.dll in your Tao Framework installation directory.
After that you can just drag the OpenGl control wherever you like, and use its Paint event to do your stuff in. (Not really sure how often that event fires though, last time I checked it fired once every 12 seconds or something so you may need to do some magic stuff to have it fire more often - say a thread to call Draw, or some other nifty stuff)
I have used successfuly OpenTK library (http://www.opentk.com/).
Works with WPF/Windows Forms.
I'm wanting to create an animation in C# such as what you would see in a slot machine where the pictures spin round. I know I could manually move the location of a PictureBox or something like that but that seems like not a good idea to me.
How would you guys do it? It doesn't actually matter whether its in standard forms or WPF or anything else similar. Possibly using XNA?
I suggest you use WPF.
With Expression Blend you can easily do the animation you need.
I think I've already seen a slot machine WPF sample somewhere on the web.
I'll search for it and post it if I find it again
Edit
Nope it was a silverlight application, but code is almost the same. Here is the link:
http://www.dolittle.com/Silverlight/SlotMachine/SlotMachine.html
Anyway, if you find that approach to difficult I suggest you read a bit about simple WPF programatically driven animations. They're very easy to do, and with a few lines of code you can accomplish your needs.
Best regards