Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Everything posted by Wooh

  1. Wooh

    Who vs. whom

    What is your opinion about using "whom" in games? Should it be used or should "who" be used everywhere? I'm asking because I'm not a native speaker and I try to follow the grammar rules as much as possible, but the use of "whom" doesn't always sound right to me and it seems like many native speakers don't even use it.
  2. Wooh

    Who vs. whom

      But that could be a good thing. If people say it's wrong I can always fix it.
  3. Instead of having a game state for each stage you could have a game/play state that contains Ryu and the current stage (which is no longer a game state). Then you can easily switch stage without loosing your Ryu object, and he will not appear in the other game states.
  4. Wooh

    Who vs. whom

    I will try to get the apostrophes right. I promise. I know the difference between "it's" and "its" but it's an easy mistake to make. Both sound the same and it seems logical (if you don't think about other pronouns) to put 's after "it" to form the possessive form because that's how you do it with nouns. What really confuses me is when you have nouns ending with s, in plural and in possessive form. So now you have got me thinking (worried) about how I should write my contractions. Should I just go by feel or is there something I should think about?. I often use the contractions for "is" and "not", a bit less often with "are", sometimes with "will" and almost never with "has" and "have". I feel that contractions suit best at the start of sentences. In the middle of sentences I'm not always sure.
  5. Wooh

    Who vs. whom

    Do people have strong feeling about it? If I use "whom" (assuming I do it correctly) will people react? If I don't use "whom" at all will people react? Or do people in general not care? Bregma mentioned "tweed jackets" and it's things like that that makes me unsure because it seems like some people think of "whom" as snobbish, but maybe that's only in speech? I think I will use "whom" because it seems to be the more correct way of doing it. If I change my mind later I can always do an automated find & replace all "whom" with "who".
  6. Wooh

    SDL_Mixer can't open wav

    To rule out you have not put the file in the wrong directory you could test passing the full path of the file to Mix_LoadMUS.
  7. I know there are many ways you can do these things but if I decided to do a pacman game I would have made much more use of the fact that it's a tile-based game. The way I see it pacman's movement is from the center of one tile to the center of another tile. Each time pacman reach the center of a tile I would check to see if it is possible to start move pacman in the new direction. If not, then continue in the current direction if possible.   if center of tile has been reached if can move in new direction start move in new direction else if can move in current direction continue moving in current direction else stop Note that when you check to see if it is possible to move from one tile to the next you don't need to do full-blown collision detection. If you know the coordinates of the tile you're on you can easily calculate the coordinates of the next tile and check what type it is (walkable or not).
  8. Wooh

    SDL2 Displays wrong image?

    You destroy the texture in the nivel constructor but the texture is still used by the tile objects that you created.
  9. What happens if you remove the calls to SDL_SetWindowSize and SDL_RestoreWindow?
  10. Shouldn't you also assign values to enemybox.w and enemybox.h?
  11. If the damage was always the same a slight improvement in damage might not give you any advantages against a particular type of enemy. If an enemy has 15 HP and you have a weapon that do exactly 5 in damage it would always take 3 hits to kill it. If you get hold of a weapon that do 6 damage you still need 3 hits to kill the enemy. A damage of 7 also makes no difference. You would need a weapon that do 8 damage before you could kill the same enemy with less hits. 5 damage: 15 -> 10 -> 5 -> 0 (3 hits) 6 damage: 15 -> 9 -> 3 -> 0 (3 hits) 7 damage: 15 -> 8 -> 1 -> 0 (3 hits) 8 damage: 15 -> 7 -> 0 (2 hits) With a range it doesn't always take the same amount of hits to kill the enemy but if your weapon is slightly better it increases your chances of killing it in less number of hits. 4-6 damage: 4 hits: 37% , 3 hits: 63% 5-7 damage: 4 hits: 0% , 3 hits: 100% 6-8 damage: 4 hits: 0% , 3 hits: 67% , 2 hits: 33% 7-9 damage: 4 hits: 0% , 3 hits: 11% , 2 hits: 89%
  12. Make sure to flush the cout stream object to make sure that you can see what has been written.   std::cout << "Mouse is in quit button!" << std::flush; If you use std::endl you don't need to use std::flush because it will flush automatically. I think the real problem is that you return at the end of the loop in checkEvent.
  13. I have been under the impression that turning on and off the sound without any kind of fading is likely to cause clicking/cracking noise. Now when I tested it I don't have this problem. I guess I could have drawn the wrong conclusion the first time, it was many years ago and the noise could have been caused by something else. I just want to be sure. Is turning the sound on and off from one sample to the next not going to cause any noise? If I have a sound mute button in the game what is most recommended? Should I have at least some fading? How much? 5 ms? 10? 50? If I have too much the button will feel unresponsive.
  14. Wooh

    Please help me with my menu

    Maybe you could make the menu items move up and down, rotate and dance to the music. You probably shouldn't make them move too much because you probably don't want the menu to turn into a game where you have to concentrate to click the correct ones. Maybe the selected item could move less, or you could make sure that if the mouse is hovering the item it will dance in a way keeps the pointer approximately in the middle of the item.
  15. Wooh

    how to crop on SDL 1.2

    The function you need to understand is the SDL_BlitSurface function. int SDL_BlitSurface(SDL_Surface* src, SDL_Rect* srcrect, SDL_Surface* dst, SDL_Rect* dstrect);src (first argument) is the SDL_Surface that you want to draw on to some other surface. srcrect (second argument) is the rectangle that you want to cut out of src surface. dst (third argument) is the SDL_Surface that you want to draw the src surface on. srcrect (third argument) will decide where on the dst it will draw. // The surface that we want to draw SDL_Surface* src = SDL_LoadBMP("img.bmp"); // The area that we want to draw from img.bmp. SDL_Rect srcrect; // The area is ... srcrect.w = 100; // ... 100x100 pixels ... srcrect.h = 100; // srcrect.x = 0; // ... with the top left corner located at position (0,50) srcrect.y = 50; // // The surface that we want draw on. SDL_Surface* dst = SDL_GetVideoSurface(); // The screen surface // The position on the screen where the top left corner of the cropped image will be drawn. SDL_Rect dstrect; dstrect.x = 10; dstrect.y = 20; // w and h will not be used by SDL_BlitSurface. SDL_BlitSurface(src, &srcrect, dst, &dstrect);
  16. Wooh

    FastCall Is Alll

    I tried some of these alternitives but it failed to compile (VS9)You have to disable microsofts language extensions... https://msdn.microsoft.com/en-us/library/34h23df8.aspx#sectionToggle9 https://msdn.microsoft.com/en-us/library/0k0w269d.aspx
  17. Wooh

    Solve this Logic Question...

    Interesting problem, indeed. Took me while to figure it out.
  18. Wooh

    Template or Macro

    I think you should prefer templates unless you have a good reason not to. If you pass an array to SAFE_DELETE it will still compile, but using templates you can force this to give you an error. int arr[5]; SAFE_DELETE(arr);
  19. Wooh

    Free Web Hosting Area

    From my experience free web hosting can be good. I'm currently using http://gigarank.net for my hobby project and it has worked great so far. The bandwidth limits are spelled out and is easy to keep track of in the CPanel and it doesn't have stupid file size limits (only total).
  20. Wooh

    please help with SDL

    Make sure you don't have any circular include dependencies. SDLGameObject.h includes Game.h, so if Game.h includes Player.h (or Enemy.h) it will fail to work because Player.h need SDLGameObject but it has not yet been defined and the #pragma once prevents SDLGameObject.h from being included again.
  21. Tell that to the SDL devs. :/ I have no idea why they can't do whatever they are doing in SDL_Init() and SDL_Quit() instead.
  22. When using SDL it is not only a matter of good practice to explicitly return from main but something you should always do. On some platforms (e.g. Windows) SDL uses its own main function and #defines main as SDL_main in the header. #define main SDL_main This means that the main function you define is not really the main function at all, but a function named SDL_main. Leaving out the return statement from a value-returning function other than main results in undefined behavior, so it's something you want to avoid.
  23. Upon exiting the program, a call will also be made to SDL_EnableUNICODE(SDL_DISABLE)[/quote] You don't need to do that.
  24. You could have something blocking movement, and force the player to focus on base building because there is nothing other to do. There could be bad weather at the start, and from time to time during the game. The bad weather makes it difficult or impossible to go far away from from your base. Maybe they can't see, or they get lost, or something. It doesn't have to be bad weather. I can also think of:drought - the troops can't go too far away from the base or they die of thirst.tide - water is blocking the way.night - the troops can't see without the light from your base.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!