Gangi

Members
  • Content count

    8
  • Joined

  • Last visited

Community Reputation

100 Neutral

About Gangi

  • Rank
    Newbie
  1. [quote name='beecher' timestamp='1315269305' post='4858012'] I'm a beginner coder And what I'm making right now is a program called mixer which plays sound effects while playing a song of your choice And I'm trying to impliment a help screen but I need to make the play and pause button disappear to do that Can you guys help me please? [/quote] If you want to erase an object from the screen one thing you can do is draw the background again only on the SDL_Rect occupied by your object.
  2. Help for an absolute beginner

    [quote name='mrsnowwhite' timestamp='1313242412' post='4848625'] Hello guys.. i am interested in game development~so how do i start?cn anyone plz tell me? i noe nothing about game development.. can anyone recommend some book for me?thx do i nid programming knowledge and wht role programming play in game development? wht is the use of game engine? wht part did maya and 3ds max play? and wht is xna studio? with software such as unity 3d, xna studio, and game maker, do i still nid programming knowledge?? thx for answering my question~appreciate it very much^^ [/quote] For me, two good books to start are "Game Development with Python and Pygame - McGugan" and "Beginning_C++_Game_Programming". And as usual I recommend you to start with 2D games if you are more interested in programming. If you are only interested in 3D I recommend you a game engine like unity 3D (you need to know a little bit of programming) but to start I think it's better with 2D games.
  3. Where to handle input logic

    [quote name='Serapth' timestamp='1312990865' post='4847183'] Do you need to handle multiple simultaneous key presses? If no, don't worry about the state array, if you do, you need the state array. [/quote] Serapath is right. But I think there are some exceptions depending on the results you want to achieve. For example, if you want to move a character inside a RPG game, one thing I like is use the arrow keys is to give priority to some movements. I mean, if I'm going down but I want to avoid an obstacle I have to turn right and then continue going down, what I do is give priority to the last pressed key. Differences in key pressing if you want to go down and avoid an obstacle between the two approaches: -Without priority: Press down_key + release down_key + press right_key + release right_key + press down_key -With priority: Press down_key + press right_key + release right_key With key priority I find it easier to drive a character and it's not obvious that you have to use a state array or something similar.
  4. [quote name='MrTwiggy' timestamp='1312936436' post='4846972'] I'm not sure if I'm understanding right. Do you mean that all of the sprites are different in size, and at random positions? Or do you mean you have multiple textures/animation sprites, each with their own size, and location? For example: If you have a character with a run animation and also a jump animation on the same sprite sheet, each with 5 frames. Are the 5 frames for the run animation all the same size, and are next to each other in order, while the jump animation has a different 5 frames, all with the same size, except it is a different size from the run animation, but each are in order? If so, thats a relatively easy fix. I had something like this before, however the way I structured my animating classes fixed it. Esentially, I had a base Animating class with drawing functions/methods, that was passed in an 'Animation' variable (a seperate class), and the 'Animation' class had its own name for the animation, starting location of the first sprite, number of frames, size, etc. and various other intuitive functions that determined the frames to be used. And all these animation variables were declared inside the Player class (hard coded). This was in XNA, so I'm not sure if it will work for whatever program your using. Best of luck. [/quote] No, the frames are of differents size so the problem is to locate them easily. In other games I did something like this to locate the frames in the image: next_frame.x = prev_frame.x + width. But now I can't because each frame has a different size. [quote name='IggyT' timestamp='1312938680' post='4846979'] Taking less of a programming approach, I took out a picture editor and put everything where I wanted it. I think it'll become more difficult to make a program to contain the chaos rather than to manually contain it yourself. Unifying your artwork into a specific format will cut down the processing time/take away those bugs that can creep in from when something unexpected arises in another file. I don't know much about picture editors but if you found one with a grid I'm sure it'd help out a lot. (the alternative if making your own grid) [/quote] Yes, that's a good idea. I'm looking for an sprite editor program, until now I've found: - Sprite Vortex: This program locates (x,y,width and height) all the frames in an image and print the results in a XML file. Just what I want!! It's a pity it's only for windows. - Texture Packer - Sprite buddy Thanks for all your answers!!
  5. Hello!! I looked in the forum but I didn't find anybody with the same problem I have so I think I should ask. This is my situation: I have an image with a lot of sprites of the same character inside and I want to use this image to create an animation of the character in my game. In other images I used, all the sprites were equally spaced and had the same size so it was easy to locate them inside the image. Now my problem is that almost every sprite has a different size and position so it's very tedious to get the position of the sprites. Since I have 7 images with like a 50 sprites inside of each of them getting the position manually is not an option. I thought to make a program to detect the size and position of the sprites ( I did something similar to detect shapes using the Matlab image toolkit so it's possible). But I think there's no reason to reinvent the wheel, I suppose somebody should have the same problem sometime. How did you solved it? Is there any application that makes this? Thanks!!
  6. Y-Angle rotation from 3-d vector

    [quote name='Steve_Segreto' timestamp='1312924733' post='4846899'] Hi guys, Given a 3-d normalized vector (x,y,z) that represents some rotation around the (x,z) axis, how can I figure out the Y-angle (in radians) that this vector represents? [/quote] I dont't know how to do it but this books are pretty good so maybe you can find what you are looking for. 3D_Math_Primer_For_Graphics_And_Game_Development - WordWare Mathematics_for_Game_Developers - Thompson
  7. Hello!! I looked in the forum but I didn't find anybody with the same problem I have so I think I should ask. This is my situation: I have an image with a lot of sprites of the same character inside and I want to use this image to create an animation of the character in my game. In other images I used, all the sprites were equally spaced and had the same size so it was easy to locate them inside the image. Now my problem is that almost every sprite has a different size and position so it's very tedious to get the position of the sprites. Since I have 7 images with like a 50 sprites inside of each of them getting the position manually is not an option. I thought to make a program to detect the size and position of the sprites ( I did something similar to detect shapes using the Matlab image toolkit so it's possible). But I think there's no reason to reinvent the wheel, I suppose somebody should have the same problem sometime. How did you solved it? Is there any application that makes this? Thanks!!