Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 21 Jan 2012
Offline Last Active Jan 26 2013 02:14 AM

Topics I've Started

[SDL] Jumping input

25 January 2013 - 10:24 AM

hello i am creating a platformer in C++/SDL and for some reason i cant work out the input for the jumping when i press the "UP" key like so


case SDLK_UP: jumping = true; break;


which sets jumping to true


inside the main game loop i have this



if (jumping == true)
myDot.yVel = 0;
myDot.yVel -= 30;
if (myDot.yVel == -100)
myDot.yVel = 0;
myDot.yVel += 60;
jumping = false;

what this is little snippet is supposed to repersent is when you press the "UP" button jumping is set to true which them runs this which sets yVel to = and then decreases it by 30 (which allows the player to move in the upwards direction for by 30. However when it hits -100 it knows you have jumped high and starts decreasing your yVel to fall back to the ground. But what is actully happening is the Player(myDot) is just forever going in the upwards position even though i have set it to stop at -100.


i realize i have completely over complicated that but you get the picture

[SDL] SDL_mixer not working (ubuntu)

25 January 2013 - 07:28 AM

Hello i have been working with sdl for a while but this is my first time
using sound. However when i try to install SDL_Mixer with this
following command


sudo apt-get install ibsdl-mixer1.2-dev


it all installs perfectly and such but then when i run a program (made
by lazy foo) it returns an error "SDL_types not found" how would i be
able to fix this?

[C++/SDL] How to render integers with SDL_TTF

18 January 2013 - 03:00 AM

Hello i am currently creating my first SDL game and i need a little counter on the side of my screen that displays the score however when i do the normal

   message = TTF_RenderText_Solid( font,score textColor );

i get an error stating i cannot convert a int to char*,How can i overcome this?

How can i make a text based game fun and enjoyable

17 December 2012 - 11:47 PM

I am currently working on a text based game i feel its not fun and enjoyable so could some actual game designers or just hobbyists with some experience point me to the right direction of how i can make a graphicless game enjoyable.

(yes i realise that graphics does not make a game fun)

BlitzMax Collision Barrier

24 September 2012 - 05:05 AM

Hello could someone send me a piece of code that when an image collides with another it stops moving