CHollman82

Members
  • Content count

    398
  • Joined

  • Last visited

Community Reputation

100 Neutral

About CHollman82

  • Rank
    Member
  1. I have some skeleton code that does nothing but draws the framerate to the screen. I use a SurfaceView and get access to the canvas to draw directly to the screen using Canvas.drawText() and that is all that happens in the loop. The frame rate, as calculated using the difference between the milliseconds reported by SystemClock.uptimeMillis() from one draw to the next, jumps from 40fps up to several hundred fps and it's all over the place, it doesn't settle on a tight range and then change over some time, it seems to fluctuate randomly and constantly in a huge range... I was wondering if anyone had any understanding why this might be or if there is anything I can do about it (set the priority of my app higher? something like that...) I have the drawing frequency locked to 50fps right now in order to continue developing my game, but it troubles me that it dips below that when I am not doing anything at all...
  2. Android developers?

    [quote name='Enders' timestamp='1301713758' post='4793375'] Usually I just post android specific questions on the mobile phone forum. But most programming topics are universal. I don't really see a lot of android programmers here. Seems like for every 10 unity/xna programmers there is only 1 mobile developer. But, I'm a mobile developer specficly android. And welcome back. [/quote] Oh thanks, I must have missed the mobile phone subforum somehow! Yeah I just started learning Android development after I got my Evo 4g last week. It's been surprisingly easy so far, I already have what could be called a complete game (though lacking all polish), a top down scrolling shooter I am going to release under the name "Disasteroids". To answer Tom Sloper, I'll mostly be looking for technical help I'd imagine, though nothing specific at the moment. I am also looking for people to create graphics/sound effects/music as I am terrible at those things
  3. I'm just starting android development and have a rudimentary top down scrolling shooter working at the moment, I decided to go right for a single custom SurfaceView implementation to be used for the entirety of my development. This of course may change in the future but it's working out quite well so far. If you like using pre-built buttons and sliders and other canned UI widgets use the built in view layouts and all that jazz... if you would prefer to get a black screen and use it as a blank canvas to draw all custom content with bitmaps and/or graphics primitives then just override the SurfaceView class and have at it.
  4. Android developers?

    Is there a specific place I should be posting android development related threads? I haven't been here in a LOOONG time, sadly I kind of forgot about this place, glad to be back though and love the new look!
  5. Thanks guys, I have a feeling I have a lot of reading to do. It would seem I tried to skip past the hard part (understanding the concepts involved) and go straight to implementation in code, as I don't even know what a quaternion is or how one is used. I'll check out that link you suggested, seems like a good source with lots of examples in code.
  6. So I have been going through the NeHe tutorials and I took one of them and started expanding on it to the point where I have a marble-like sphere resting on a surface and the arrow keys can be used to move it around on this surface. As the ball moves along the surface I rotate it to make it look like it is rolling and not just sliding on ice or something. This works fine if you go straight along any axis from the origin but as soon as you combine two directions of movement the rotation is wrong. I understand why this is happening, for example if move the ball forward and it rotates a quarter turn along the x-axis the effect is that the z-axis of the ball is rotated to match the y-axis in the world coordinate space and the y-axis now matches the z-axis of the world (essentially, the y and z axes were swapped), so now when I move left or right it starts spinning like a top (on its poles, if it were a planet) instead of rotating correctly to match its movement. I am hoping there is an easy way to correct, or bypass, this effect without having to take into account the angle of rotation on all 3 axes to calculate the amount of rotation on all 3 axes every time I want to move the ball. I was thinking you could somehow "re-align" the balls axes to match the world coordinate space without effecting the appearance of the texture itself after each discrete rotation is performed. Lacking that, I would love someone to explain the math required to calculate the correct rotation angle on all 3 axes to move the ball on any vector (2D, on a surface) given its current rotation. Thanks!
  7. If I leave the objectVector.erase() but take out the delete it closes and goes back to the IDE. If I take that out but leave in the delete it will hang and I will have to ctrl-alt-delete the IDE, not the application, the IDE (devenv.exe, VC++ 8)... Yeah I kind of thought deleting something from inside itself was a bit of a paradox, but it did work... maybe it wasn't working safely before and VC++ 8 is just a lot more strict than 6 was. No, the Object class does not have a virtual deconstructor, should it?
  8. I had this working until I updated from Visual Studio 6 to 8. Now for some reason it doesn't work anymore and will crash the program as soon as it tries to do it. Basically, I have a vector of the type Object, which is an abstract base class used for every type object in my game. The vector itself represents every object currently loaded. It is a super mario clone and objects such as goombas, turtles, bricks, etc. need to be deleted as they are removed from the game world by the player. To do this before I would do something like this from within a function of the respective class: for(unsigned int i = 0; i < objectVector.size(); i++) { if(objectVector[i] == this) { objectVector.erase(objectVector.begin() + i); delete this; break; } } I run through the entire vector until I find the current object (the one who's member function the code is currently in). I then erase that vector index and delete the object. I am positive that this did work at one point, and now it doesn't
  9. Sorry it took so long to get back to you. I was wrong, all the intialization functions return properly, but when I call GetDeviceState() it returns DIERR_INVALIDPARAM. The only parameters sent to it are sizeof(keys) and &keys (keys is a 256 element array of unsigned int's). Also remember that this did work fine before I upgraded, and I can upload the executable to prove it, or look at my site: codextreme.net Another thing... This may sound stupid but I bought a new keyboard between the time that this was working and the time I came back to it and it was no longer working... I have a saitek eclipse now, in case there is some known problem with them...
  10. I have a super mario 3 clone I have been working on and in the process have upgraded from visual studio 6 to 2005 (version 8). The project will still build and run, but now keyboard input does not work at all, when it used to work fine. This is basically how I am handling input: //Variables LPDIRECTINPUT8 lpdi; LPDIRECTINPUTDEVICE8 keyboard; LPDIRECTINPUTDEVICE8 mouse; //Initialization DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&lpdi, NULL); //Keyboard lpdi->CreateDevice(GUID_SysKeyboard, &keyboard, NULL); keyboard->SetDataFormat(&c_dfDIKeyboard); keyboard->SetCooperativeLevel(hwnd, DISCL_EXCLUSIVE | DISCL_FOREGROUND); keyboard->Acquire(); //Mouse lpdi->CreateDevice(GUID_SysMouse, &mouse, NULL); mouse->SetCooperativeLevel(hwnd, DISCL_EXCLUSIVE | DISCL_FOREGROUND); mouse->SetDataFormat(&c_dfDIMouse); mouse->Acquire(); //Usage keyboard->GetDeviceState(sizeof(keys),&keys); mouse->GetDeviceState(sizeof(DIMOUSESTATE), (LPVOID)&mousestate); If I throw in a quick check around keyboard->SetCooperativeLevel I find out that that function is returning an error... but I don't know why
  11. Animating Textures in DirectX 9

    Quote:Original post by busytree I have another question Why is my background not square when vertices postion says it so? *** Source Snippet Removed *** Because your monitors aspect ratio is not 1:1. More than likely your aspect ratio is 4:3 (1024x768, 1600x1200 etc), 5:4 (1280x1024), or 16:9 (720x540, 1920x1080 ect), which will distort the screen accordingly.
  12. Anomalies of speech

    It's pop.
  13. US considers use of nuclear weapons against Iran.

    Im just saying they are not trying to destroy entire cities and hundreds of thousands of civilians, they are trying to destroy a large military establishment in one shot, there is a big difference.
  14. US considers use of nuclear weapons against Iran.

    I think a lot of you are confusing tactical nukes like the article talks about with Hiroshima-style "kiss your ass goodbye" nukes. Bunker busters are meant to destroy underground establishments and, though they are nuclear based, the yield is orders of magnitude less than the typical hydrogen bombs with mushroom clouds that everyone is thinking of...
  15. I'm back -- and I finished development of my game!

    LOL... PENGUINS FTW! (im at school so I haven't played, will try it later though)