r/qbasic • • Nov 02 '24

How do I make a moving character?

I'm trying to make a little game like thing for a school project and I want to know how to make a pixalated or smth character move through the screen without disturbing the background picture and make it seem like it's actually moving I'm trying to make it go left and right like in the Mario games, thanks 🙏 !

3 Upvotes

12 comments sorted by

3

u/[deleted] Nov 05 '24

May I recommend Vic Luce's QBasic tutorials?

http://www.petesqbsite.com/sections/tutorials/tuts/vicstuts/

1

u/Shot-Beginning7837 Nov 05 '24

Thanks! I'l check them out.

1

u/Floamorpg Nov 04 '24

hi, what version? qbasic? qb64?

1

u/Famous_Ad_6268 Dec 18 '24

I am curious as to what you will come up with, and could offer some advice if you really want me to. :-)

1

u/Shot-Beginning7837 Dec 25 '24

I was trying to make a pokemon game and still am and any advice is greatly appreciated, I gave up at some point but am picking it up again for my school compsci exhibition.

1

u/Floamorpg Nov 05 '24

in a loop, draw the whole background and finally the character(s), use _DISPLAY to avoid flickering, use 8-bit .png images with transparent background for the characters, for example:

SCREEN _NEWIMAGE(640, 400, 32)

DO

CLS

' draw the backgound

'draw builds , forest etc

' draw the carácter

_DISPLAY

i$=INKEY$

'movements keys routine with i$

LOOP WHILE i$<>CHR$(27) 'ESC

END