godsenddeath

Members
  • Content count

    917
  • Joined

  • Last visited

Community Reputation

182 Neutral

About godsenddeath

  • Rank
    Advanced Member

Personal Information

  1. I'm working on a wheel-of-fortune-style spinning wheel, and I'm looking to animate the spin. So I want to try using a quadratic easing function. This is on an android device using openGL ES 2.0, so view animations aren't in play. So my problem is, given an initial speed, and a predetermined spin distance (and possibly a duration), how would I create an animation class. The approach I've taken is, since I want a quadratic ease, I use -a(x^2) + initialVelocity (Where a is a constant) as my acceleration function, and I'm thinking of integrating this to get a distance function to ensure the correct distance is spun. Does anyone have any suggestions on how to approach this? Am I on the correct path? Thanks
  2. Rapidly Repeating Sounds

    Thank you, I'm definitely going to try that. I have some experience with fmod/C++. I wasn't aware there was a c# wrapper.
  3. I'm making a small mini-game using WPF; this game involves a spinning wheel. My initial hope was to fire a beep sound after every n degrees of rotation, but the application was choking on the sound. My 2nd approach was to play a single file that beeps at a constant interval until the wheel slows down enough so that the individual sounds can come through, I've been using MediaElement, and my question is, is there a higher performance sound class that would allow me to fire sounds off at a higher rate? Obviously I'm not going to be able to fire off 100 times a second, but I'd like something that hinders me the least. Thanks
  4. Thanks for the help. I decided to hard code it to make sure it was done today, but also informed my boss that I'd be pulling that code back out to improve the design. Not the ideal solution, but we don't always get an ideal situation.
  5. [quote name='tanzanite7' timestamp='1338767110' post='4945958'] Granted, it is ~2:45 here and i really should be sleepoing, but ... [quote name='godsenddeath' timestamp='1338760382' post='4945922'] I've got N credit cards, grouped into categories such as rewards cards, business cards, etc.... On top of this, I need them to be members of sub-categories such as low interest rewards cards, income range, etc.... This leaves me with 80+ lists of cards, which is very difficult to maintain. If I can maintain just the high-level lists and generate the more specific lists from those, a change in one card wouldn't require me to change ~20 other lists. I'm aware that the code could get a bit dicey, but I just see it as more maintainable, since the changing of that many lists would lead to many errors, as opposed to one chunk of code. [/quote] Why on earth would anyone ever hard-code+compile-time any of it? This is insane ... well, it sure as hell looks like that ... can you elaborate? [/quote] Pre-existing codebase that is a mess to say the least, and a tight deadline, I'm trying to incrementally improve it while still getting work done and hitting deadlines. Doing that much work isn't possible at the moment.
  6. Thanks for the replys. It's not a game, it's actually for work. I've got N credit cards, grouped into categories such as rewards cards, business cards, etc.... On top of this, I need them to be members of sub-categories such as low interest rewards cards, income range, etc.... This leaves me with 80+ lists of cards, which is very difficult to maintain. If I can maintain just the high-level lists and generate the more specific lists from those, a change in one card wouldn't require me to change ~20 other lists. I'm aware that the code could get a bit dicey, but I just see it as more maintainable, since the changing of that many lists would lead to many errors, as opposed to one chunk of code. And yeah I know that was the intersection, and all through the post I had used intresection, but I realized I put union in the title erroneously, and couldn't figure out how to change the post title, so I went through and changed it all to union, and forgot the change the example :S It happens. The StackOverflow post is great, but I'm stuck using MSVC2008 for this specific project, so C++11 is a no go. I'll consider using non-const arrays and creating sublists at runtime, since the solution would be easier, thanks for the help.
  7. I've got a few master arrays of items, and as well as arrays containing items that hold certain properties. I want to create arrays containing the union at compile time to make the generation of these arrays more flexible. I'll give you an example. const Players blueTeam[] = { a,b,c,d,e,f}; const Players redTeam[] = {a,g,b,x,c}; const Players goodPlayers[] = { a,c,d,r,t}; const Players badPlayers[] = { c,d,f,w,q}; const Players goodRedPlayers[] = UNION(goodPlayers, redTeam); I'm thinking either macros or templates could solve this problem, but I'm having trouble getting started. Thanks.
  8. Rendering a bitmap WPF

    Hello. I've got a System.Drawing.Bitmap containing an image that I want to render it to a window in WPF, but I have no idea where to start. I'm newish to C#/WPF/Winforms so I'm not familiar with the library and how classes interact, nor do I have time to look through MSDN for a book for a few hours. If anyone has a suggestion it would be greatly appriciated (Efficiency is important, if at all possible, I've got to render screen grabs at ~30 fps) Thanks
  9. I've noticed Visual Studio 2010 adds certain DLLs to the linker input by default. I have an idea of what kernel32, user32, and gdi32 contain, but do I really need winspool.lib,comdlg32.lib,advapi32.lib,shell32.lib, and ole32.lib among others? Is there a resource that would give me an overview of that these libraries contain, and if I would be able to remove some frm my project? Thanks.
  10. I'm looking to render different images to different screens from the same application. I need to modify an existing MFC application to do this, so using D3D or openGL isn't an option until it is the only option.
  11. Seeking suggestions for hosting

    Thanks. There are many good ideas in the replies and I've gotten a better handle of my options.
  12. I've recently started playing around with the Android SDK, and I'm looking for a server to respond to requests and whatnot. I read the FAQs (specifically Q20) and I'm looking for some opinions. What I need is a simple, cheap host that will allow me to run my own software. The FAQs mention self managed and virtualized hosting. I'm not very knowledgable when it comes to the ins and outs of different server options, hence the call for help. What are the most cost effective options? The storage and bandwidth I would need for my projects would be miniscule, as it would be just for testing purposes. I don't need the server to be dedicated, just a simple host which allows me to install software I've written to handle communications between android devices. Thanks
  13. New Win32 Tutorials

    Oh yeah, the URL would probably help huh? [url="http://bitsinrepair.blogspot.com/"]Right Here[/url]
  14. New Win32 Tutorials

    I just started a technical blog to get myself writing a bit more. I've posted 2 win32 tutorials (Basic window, and window wrapper). Feel free to take stroll over, any constructive criticism is welcome in any aspect, bugs, grammar, and stuff that's just plain wrong. I'm still trying to find my sweet spot between brevity and thoroughness. I want to get an idea of how it's going and what things I need to work on before I pump out any more. Thanks.
  15. I've recently switched to D3D10 from D3D9, and I've yet to find a nice way to handle the changes in the way it handles Vertex Layouts. Right now I have a Shader class. This class has a create() method that takes the path to the shader, and enum representing what type of vertex format to expect (ie FORMAT_PTN), and a string giving the default technique name. it then constructs an input layout using the pass description from the default technique. This just seems like a very ugly way (with the enum and an if statement for each vertex type). Does anyone have a shader system they feel works better, or even a comment on the shader creation below? [code] bool create(std::string path,ID3D10Device *device, int formatType, std::string techniqueName) { this->path = path; this->setDevice(device); unsigned int compileFlags = (Shader::effectPool != 0) ? D3D10_EFFECT_COMPILE_CHILD_EFFECT : 0; if(FAILED(D3DX10CreateEffectFromFile(path.c_str(),0,0,"fx_4_0",D3D10_SHADER_ENABLE_STRICTNESS,compileFlags,this->device,Shader::effectPool.p,0,&this->effect.p,0,0))) return false; if(this->addTechnique(techniqueName) == false) return false; if(this->setTechnique(techniqueName) == false) return false; //create input layout int listSize; InputElement *elements; if(formatType == FORMAT_PTN) { listSize = PTNVertex::numInputElements(); elements = PTNVertex::getInputElements(); } if(formatType == FORMAT_PC) { listSize = PCVertex::numInputElements(); elements = PCVertex::getInputElements(); } //get a description of the sole pass D3D10_PASS_DESC passDescription; if(FAILED(this->currentTechnique->GetPassByIndex(0)->GetDesc(&passDescription))) return false; //create the layout if(FAILED(device->CreateInputLayout(elements,listSize,passDescription.pIAInputSignature,passDescription.IAInputSignatureSize,&this->inputLayout.p))) return false; return true; } [/code]