You're not trying hard enough. I assume there's a folder icon on your desktop. Can you right-click it and select an option to open the folder in another window? Otherwise just move the folder elsewhere (like Documents) or extract it again and run it from there.
OK. FINALLY it works. I'll just go to replacing Sonic with Shadow. And, since I don't wanna screw up, I made another copy of WindowsZone so that I'll still have at least one that works.
OK so, I fixed it so that it uses the application's directory as the current directory which would fix your problem when you run it like that, and I fixed random input mode.
http://themysticalforestzone.com/AttoSama/...ebula_Nov08.gif http://themysticalforestzone.com/Sprite_section.htm
Oh no. Just tried the latest version and it doesn't work for me.... =( I'm using XP SP3, if it helps.
I finished Shadow! :D It turned out better than I expected it to be. Although there are a few slight differences in the dimensions, it's barely noticeable and turned out just GREAT. ;D EDIT: Here's a picture. I made a few boundaries on the top of Firefox for Shadow to roam freely in random input, because he usually gets in my way of typing when roaming down there.
Finally works for me! This is really cool! I like how I can throw Sonic around and how he can push the windows around too! Great Job! EDIT: I just realized he can also make the window bigger if he is on the inside of it and pushes it!
Oh, hey, I just thought, what if there was some way to implant a Super Sonic mode? That'd be pretty kick'n.
Come to think of it, I was gonna ask that question myself! >:U I think I'll make a Super Sonic version, too. It SHOULD be easy, after all. :P
Very neat concept! It seems quite inefficient though. Using Reflector, I decided to take a look at what your code is doing. I found a number of things that are likely to be causing the very high CPU and memory usage, and other problems. 1. You're using a standard WinForms Timer control with low milliseconds. Problem is that the WinForms timer isn't really suited for things like 60fps animation; it's not that high-resolution. I think its minimum is anywhere from 10 to 15 millisecond intervals, and even then it's hardly guaranteed. A more appropriate choice could be the StopWatch class: System.Diagnostics.StopWatch is a class containing a very high-resolution timer, with an accuracy of less than a millisecond, I believe. Only thing is that it's not automatic—it works just as the name implies. It has Start() and Stop() methods and an ElapsedTime property that you can read from. I'm not sure how much knowledge you have, but if you can, you could run the main logic in a separate thread in its own loop, checking its stopwatch every 16.6666...ms or so. This isn't absolutely essential, though. It just makes frame timing more accurate. 2. In each timer tick (every frame), you're creating a Graphics class for both the 'level' bitmap and for the Form itself. Not only that, but you're not calling Dispose() on them, causing memory to temporarily leak (at least until garbage collection). What would be a better solution is to create a Graphics instance once, at form initialization, and keep their references in your Form class. You shouldn't need to create/destroy it every frame. 3. You also seem to be creating a Bitmap object every frame for the current Sonic sprite. This is probably fairly expensive. What you should do instead is similar to #2—create the bitmaps at initialization and hold on to those references. Or better yet (though not strictly required), put all of Sonic's sprites into one image, then draw from sub-rectangles of that image. This would be more efficient with memory, disk storage, and CPU. 4. This isn't as readily fixable or easy to replace, but just using GDI in general is slow. I believe there are ways to use DirectX/Direct3D with a transparent background, but I don't really know much about that. But if possible, it would give you insanely better graphics performance. There might be more than that, but that's what I saw in a quick glance.
Cairo with GTK# is one way to accelerate it. It can use OpenGL and fall back to GDI if necessary. And I know it works with Microsoft's .NET Framework. GTK# for Windows for .NET Framework can be downloaded here.
Just redownloaded and it's the same version I had. Here's the error window I got: And the text: Quite odd, since the previous version I had downloaded worked fine. =\
I will consider this. Probably a good idea. As far as I can tell, I need to do this in order to be able to flip the image when he's facing left, or he'll flip every frame. I would like to get away from GDI+, as it would also fix the 32-bit color issue some people are having. ICEknight: You need the DirectX runtime download at the top of page 5, or under the download on the first page.
Nice Idea, this is really cool. But I don't seem to get smooth controls as other people here. I'm using Windows XP SP3. I mean, if I run Windows Zone, every other input for a program gets blocked. I don't know if this is the expected behaviour, but when I run this, I can't interact with anything else(not even the taskbar, and the system clock), unless I alt-tab out of it. If I alt-tab, I can still run and everything, but once I left click in something, WindowsZone takes the focus again and I have to alt-tab out again. Is this normal or a bug?
I see. Another thing, I don't know if this has been mentioned before, but I noticed you load the sounds as soon as they're used right(and they seem to remain in cache luckily)? Wouldn't it be better to preload them when the program starts? Just another tip. BTW, nice detail with pushing the windows, it made me smile .