I am making a 2d star wars game with allegro4 and I want to add a space ship image which is able to move(with keyboard up,down,right,left).
I can't find the fuction about that.Can you help me?
I am making a 2d star wars game with allegro4 and I want to add a space ship image which is able to move(with keyboard up,down,right,left).
I can't find the fuction about that.Can you help me?
Copyright © 2021 Jogjafile Inc.
There's the
if(key[KEY_UP]), if(key[KEY_DOWN]),ect, functions that can read keypresses in Allegro 4. It's up to you to move the sprite based on that. You can do something likeThat will move the character sprite up when the up key is pressed.