2012-03-20 23:06:15 Posted by RetroZelda

Old mans junk = My new Toy

Yes, I have found a new toy. The Wii motion plus of course! For my optimization's class, we have a project to improve an algorithm, function, workload, etc on an older project and because I LOVE working with peripherals, Optimization is really important to make code run faster and faster, so I decided to check out my algorithm for detecting/guessing a wii remote's off-screen dot using the IR sensors. Now, because the wii remote's normal accelerometers cannot calculate YAW, I had to come up with something else that I could work with. So I used the accelerometer in conjunction with the IR dots for the off-screen dot placement. I accomplished this by first getting the distance from the two dots as they were last seen. This required a buffer of previous locations of the dots that I could use to later compare too. I then needed to get the angle between those two dots. A few dot products and other math fun stuff later, I had my angle. At this same point, I need to capture the ROLL of the accelerometer, and then get the difference between the ROLL and the angle between the two dots. Then with the saved old data, I could compare the current ROLL of the wii remote with that old data in conjunction with the single remaining dot on the screen to get the angle to the new, off-screen, dot. Now, by doing 1 of two things, I am able to directly place the off screen dot. I could use the distance between the last two dots, or I can use that distance and the accelerometers change in its Z axis to determine if the wii remote is now closer to the sensor bar(dots closer together). And Wha-lah! I have the position of an IR dot that doesnít really exist! Sounds simple, right? WRONG! Games now a days need to run fast fast fast, and with DMD (the project the wii remote is doing this on) being done [mostly] on a single thread, doing that kind of math is fairly pointless. Plus, my algorithm will not work if both dots are off screen, and thatís no fun! So, what could I possibly do to improve the accuracy of the in game cursor, as well as decrease the pointless workload that I am doing on a frame by frame basis? Well, for starters, I needed a way to calculate an angle between two points faster and easier. And then I need to calculate the off screen point faster! Then it hit me, I should completely forget about doing these calculations, and just use raw data to move the cursor. Well, having recently played (and highly enjoyed) The Legend of Zelda: Skyward Sword, I thought that using the Wii motion plus like Nintendo used on their menus to control the on screen cursor would be a lot easier, and it would greatly improve the wii remote's accuracy while trying to move the cursor around when the screen is so much closer to the player than on a normal wii game where the TV is, at least, about 10 feet away. So, by mimicking Nintendo's approach to how the on screen cursor will give me, the programmer, a lot more accurate data to work with, and give anyone who plays this game optimized control that are much simpler, and cleaner to use. So, I first enabled the wii remote to read extensions in the extension port, and I enabled the wii motion plus and I would poll the data from the motion plus along with the data from the wii remote itself. Doing this worked well, but the data I was reading in was reading fairly slowly, and I speculate this because that the wii remote gets pulled once per frame, grabbing all the data from the hardware and bringing them into memory. But when an extension is plugged in, unplugged, or even just changed, the sizes of data could possibly change, and if something gets removed that I am still setup to read from, I will crash. So to fix this, I wrote a callback function (basically a functor that the wiiyourself library takes in that will get called [asynchronously] when specified events happen). I have the callback function looking mainly for event with the wii motion plus to handle the plugging in and unplugging of the peripheral. Not only can I easily handle what data I read from the remote, but if the remote gets disconnected, or the entire game crashes, I can now handle it so the wii remote can properly shutdown which will in turn prevent the remote from leaking memory. Now that is all and good, but back to the fun stuff! The motion plus connects, and I can read its values, and they sure do look beautiful, and now itís time to get the cursor to move with this new data. So, I simply set the cursors position(x and y) to equal the motion pluses roll and pitch respectively. I run the game and I do not see anything. So then I go back into code and I enable the pressing of the Down button on the remote after B is being held to center the cursor on screen. I run the program again. I hold B and press down, and zoom, the cursor snaps to the center of the screen and then hastily moves towards the top right corner. I realized why Nintendo has a calibration time in every game that uses the motion plus, so now it is time for me to incorporate my own calibration state. But first things first, I know that I need to hold these values in memory so I can modify them with my calibration data. So, I make a structure of 3 floats (roll, pitch, and yaw), and I read in the motion pluses roll, pitch, and yaw, and I store them inside an instance of the structure. (Note, the wiiyourself library read both raw data and relative data, I am using the relative data). I then read about 20 of these in an array of these structures and add them all together as I read them in, and then I divide by the amount I read in. This took way too long, and made the function call take almost 3 seconds! So, I decided to split each read into one read per frame. Then, after reading in all the data into the array, I added each array member into a master object (of the structure), going one object at a time. Then, when all the objects of the arrays were done, I divided like I did before and I moved on with my life. This made the actual state last slightly longer, but It allowed the wii remote to have time between data reads(the time to run everything else each frame needed) to get more realistic results, and it also helped to reduce dependencies, which greatly improved the speed of the function, making its total time around a second. Now, I take the calibrated data and every frame I subtract it from the data read in by the motion plus and then ran the game. The cursor moves so smooth and fast that I need to slow it down a bit to help reduce the sensitivity that the motion plus has, and I simply divide the change in direction by 2, and the results are beautiful. I then use QueryPerformanceCounter() to time the new method of moving the screen cursor, and it is about half a second each frame. This is unacceptable! I then go to where ever I read from the motion plus into a structure, and I simply use memcopy to move the data over. I then take all my divide by 2ís and turns them into multiplies by 0.5s. I run it again, and I am getting around 0.0004 seconds each frame. That is more like it. The wii remote's input is not optimized to not need to do any kind of calculation for off-screen IR dots, as well as optimized for each player, to give them faster reads from the wii remote, and giving the cpu more time to work on other things that I think using the wii remote with wii motion plus is a lot more enjoyable! Happy Holidays, RetroZelda

2012-03-20 23:06:52 Posted by RetroZelda

No.. no.. no... Why YES!

So much to do, and yet no time to do them! What a bother it is to want to try doing an entire list of stuff including ffmepg, dll Injection(hehe), Plunder, RZEngine2D, Play Video games, classes, the journey to and from each class, blah blah blah more stuff more stuff. This doesn't make for any productivity when productivity is inflating me like a balloon, and I am ready to burst onto a single project; a single thing that I can look forward to do every day. Yes, a new project with new people in a new place and continue my Journey of Awesomeness with a fresh coat of paint! Although I havnt updated much of my doing on here, I can say that i am rather tired now, and wanted to type something before going to bed. Good night! I wont see you later, because i am merely text on a screen! -- RetroZelda

2012-03-20 23:07:08 Posted by RetroZelda

RZEngine2D

Yup, RZEngine2D is a slow work in progress. RZEngine2D is going to be an XNA 2D game engine, with hopes for it to be able to easily compile on the XBox360, Windows Phone 7, and, naturally, PC. Now, I have the basic interfaces done for some of the needed bits and pieces, as well as some things ported over from my other works, but it is a slow work in progress. If Anyone wants to help develop the engine, feel free to contact me about it, and I can get you set up on the repository.

2012-03-20 23:08:58 Posted by RetroZelda

Companies and Future Jerbs

With the last set of classes for the Month of October coming to an end, I am now over the Full Sail hump! That's right, I have now been at full sail for over and year now, and with less than a year left I've got a future to start to plan out. But where do I start? What do I want to do? Where do I want to do it? And finally, where do I want to be in 10 years? If you had asked me this a year ago, i would have probably either have had no Idea, or would give some snarky answer that was pie in the sky. But now, after learning my capabilities and my weaknesses, I think I can begin to answer these with Chrystal clarity. Where do I start? Well, the answer to that is very simple. i have already started. The day I was officially accepted into Full Sail was the day i had started. Although it was as if I was a lab rat being into a new maze, I still knew what I wanted to do. I wanted to make games. And making games is what I plan to do for the rest of my life. Although I am not really that creative and I always start personal projects and scrap them a week later, I think the way the industry is set up will be a perfect fit for someone like me. Give me a topic, and I will create ideas to add on to. Give me a task, and i will get it done no matter what. Have me implement something that I know very little about, and I will take the time to research, study and learn how to get it done and then I will get it done. That, so far, is the work ethic that I have slowly been developing, and when I go to do something, I try my best to get it done with the best quality work, which sometimes might take me longer than others, but great things take time. Look at the games made by Nintendo or Blizzard Entertainment. The Legend of Zelda: Twilight Princess was delayed many times before its final release alongside the wii, but It was a fantastic game. Any game Blizzard makes always takes them a while to get done, but when they get it done, they get it done right. These are two of many companies that really show quality, and how time is what a game really need to be sucessful. Now, I dont quite know exactly how the gaming industry works, so I was merely speculating, but I do feel as if that my, and my many other traits that fit my work ethic, will fit nicely into the a gaming company like Blizzard, Nintendo, Retro Studios, or even N-Space. What do I want to do? With the degree that I plan to get at the end of my Full Sail journey, I can go, from what I have heard, three routes. These routes are Gaming, Military Simulation, and teaching(Like how many of the Game Development teachers at Full Sail are alumni of the school as well). Now, i know for a fact that Teaching is out of the question. I understand things just fine in my head, and If I dont I can easily draw it out so I can help myself visualize what I am trying to do, and the way I think and explain my thought of how to solve a problem, my lack of teaching abilities comes back and I just confuse whomever i was talking to about it. So that means that Gaming and Military(or just any, really) simulation. Altough I do enjoy simulators, I just dont think that that will be a good fit for me. First of all, I have very little in me to be able to do anything in the military. Weather or not it would require going through basic training, it just isnt for me. Although simulation really does sound fun, I think bringing that fun to people for entertainment would be a lot more fulfilling. So, naturally, gaming is for me. i love the wath people play, I love to actualy play, and I really enjoy being a part of what others love so much. Gaming is going to be a part of my life until i die, so where do I want to do it? There are many great companies out there, including those that I have mentioned previosly, but there was one company that really stuck out a lot when I was looking into them. Blizzard Entertainment. I'm not jsut saying Blizzard because of their success or because I enjoy playing World of Warcraft, but because they too started out small and unknown, just like I am now to the gaming community. For example, I bet that if I log into World of Warcraft and ask other players "e;Who made the game The Lost Vikings?"e; and I bet 99% of people would have no idea, and/or would say Blizzard instead of Silicon and Synapse, Blizzards original name. Now, just because I know a game name doesnt really say much, but I remember as a child playing The Lost Vikings II with my brother. It has been years since I have played it, and I really wish I could find a copy, but some things are stuck in the past. ANother thing that really makes Blizzard stand out from other American Companies is their Campus. On their site, located Here, you can scroll down and view a gallery of the campus. It really looks like a mix between Full Sail University and my high School from back home. There is a beautiful cafeteria, a weight room, basketball and volley ball courts and many other sport and exersize rooms and games. but then, you can see conference rooms, what looks like someones office, and even what looks like All the employees and/or interns all coming together to celebrate some kindof event and looking really happy. All these things looks like a fun and extremely productive place of work. And just looking at these images assures me that that kind of company really knows what to do to keep their employees' moral up to continue to give the world fantastic games. Another good "e;underdog"e; company that I really look up to and who is slowly coming to the top is N-Space. N-space is mainly known for the DS version of games like Call of Duty::Moder Warfare Mobilized, Call of Duty: Black ops and Golden Eye 007. I remember playing these games and thinking "e;Wow, these are really fun, and play a lot better than Metroid"e;. But there are very few people who play the console versions of these games that will even concider playing the hand held version, and I just want to say SHAME ON YOU! Even though you might never have heard of N-space, you will in 2012 with Heroes of Ruin. I am really excited for Herod of Ruin on the 3DS, but I am not going to talk about it because it might just turn into a game review based on the trailers I have seen, but with all the featues jammed into one golden game, I have no doubts that n-space's quality will eventually shine into console-only gamer's eyes! Where do I want to be in 10 years? Well, as a child I always wanted to work for Nintendo, and my dream is to work under Shigeru miyamoto and be a part of a Legend of Zelda game. Also, working under Yu Suzuki on Shenue III would be a dream come true as well. Although these are really far out there, that is where I hope to be in 10 years. I want to be working under the greatest minds of the industry and be a part of giving people games that turn heads and break into new elements that have never been crossed. This really is dreaming of the top, but you may say I'm a dreamer, but I know I am not the only one.

2012-03-20 23:10:15 Posted by RetroZelda

Librarys

So, me being me, I forgot to include some Important library"s to get any of my projects to build, so this is the topic where I am going to place links to the location of the librarys and update it periodically as well as to start including needed DLLs with the builds. Note: These are going to be x86 versions. You can do the search for 64 bit versions. Microsoft Visual C++ 2010 Redistributable Package (x86) DirectX End-User Runtimes .NET Framework

<--Prev 0 1 2 3 4 5 6 7 Next-->