Jump to content

  • Log In with Google      Sign In   
  • Create Account

ptrrf

Member Since 08 Jul 2012
Offline Last Active Oct 19 2014 03:01 AM

#5021288 Losing interest in game development...

Posted by ptrrf on 14 January 2013 - 12:03 AM

This feeling is normal. Complete something to be proud of yourself, this just happens when you see your projects working.

You are young, don't think you are failling. The great things come with time.




#5010653 Newbie with questions!

Posted by ptrrf on 14 December 2012 - 10:35 AM

2) SDL have enough features to your project. I'm not sure if the other libraries that I know are "better" to your purposes.
3) SDL doesn't have native scaling/rotation functions... But you can use SDL_rotozoom. it's a extension of SDL (not sure if this is the correct definition).
All the SDL_rotozoom functions are to rotate and scaling images.


#5009384 allegro+code::blocks install...

Posted by ptrrf on 11 December 2012 - 05:57 AM

This setup is just applied to a new project. What you can try is setup the lib the same way, but instead of click (project name) >> build options >> linker settings, you click settings (on IDE menu) >> compiler and debugger >> linker settings and keep following the tutorial.

I didn't installed allegro 5, but i'm almost sure this will work.


#5009119 L want design a mini game,what game can l choose?

Posted by ptrrf on 10 December 2012 - 10:46 AM

If the game that you are interested is big, you should try to replicate each of his features in small projects to learn how each part of the game works.


#5009102 L want design a mini game,what game can l choose?

Posted by ptrrf on 10 December 2012 - 09:56 AM

The best choice is the one that will teach new things.

I never programmed a RTS game, so, few weeks ago I decided to try, and I learned tons of things...
It really depends on what you think that you is capable to do at the moment and what you want to learn right now.


#5009051 L want design a mini game,what game can l choose?

Posted by ptrrf on 10 December 2012 - 05:44 AM

I like this list:

Pong -> good to learn about basic collisions and keyboard input

Tetris -> More collisions, the main thing to learn here is about data structures and more collisions

Vertical Scrolling Shooter -> More collisions, BUT... the main objective here is learn how sprite animation works and make different enemies behaviour

Pacman -> The first step on AI.

Platformer -> here you will put all the knowledgement of the games above. Think about his as your final test.


#5008705 is threre no way to regulate 'buzzing frames' without 'delta time...

Posted by ptrrf on 08 December 2012 - 11:20 PM

1) I think not.

2) How did you checked if the flags SDL_HWSURFACE and SDL_DOUBLEBUF were applied? I always used those flags together and never got the "sprites buzzing" problem.

3) Post the code that apply alpha blending to the images, then I can try help you.


#5007828 Trying to make background of a sprite transparent, but it wont work

Posted by ptrrf on 06 December 2012 - 11:50 AM

You must call SDL_SetColorKey BEFORE blit the desired surface.

A good practice is load the image on the beginning of the application, and set the color key after.

(Sorry if I wrote something wrong.)


#5007804 [SDL] Every time I move the mouse the sprite redraws need help.

Posted by ptrrf on 06 December 2012 - 10:56 AM

What's the reason to not draw the sprite every time you move the mouse?
Are you clearing the screen before redraw all the content?


#5007799 [SDL] Every time I move the mouse the sprite redraws need help.

Posted by ptrrf on 06 December 2012 - 10:42 AM

1) You don't need to call SDL_ShowCursor on every cycle. Call this function before the main loop.

2) Personally, I think is better to check SDL_PollEvent on a "while" like this:

[source lang="cpp"]while(SDL_PollEvent(&event)){ // Handle events here}[/source]
3) Put the function apply_surface() after manage the events. You must separate the event manager code and the draw code. (Just put that apply_surface() before the SDL_Flip(), on the place where SDL_ShowCursor() is actually.)


PARTNERS