Qbasicnews.com

Full Version: Charakter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have read darkdreads RPG-tutorial on how to make an map and a character who the player can move with the arrow keys.... now i want to change the charakter and i dont just want to use circles( i want lines also) but when i try the game get screwed so can someone explain to me how to change it and NOT screw the game

this is the code for the charakter:

Code:
X% = PlayerX% * 20                  ' This little routine draws our
    Y% = PlayerY% * 20                  ' character in the right position
    CIRCLE (X% + 9, Y% + 9), 9, 40      ' on the screen.
    PAINT (X% + 9, Y% + 9), 40, 40
    CIRCLE (X% + 5, Y% + 6), 3, 31
    PAINT (X% + 5, Y% + 6), 31, 31
    CIRCLE (X% + 13, Y% + 6), 3, 31
    PAINT (X% + 13, Y% + 6), 31, 31
    CIRCLE (X% + 5, Y% + 6), 0, 16
    CIRCLE (X% + 13, Y% + 6), 0, 16
    CIRCLE (X% + 4, Y% + 17), 2, 4
    PAINT (X% + 4, Y% + 17), 4, 4
    CIRCLE (X% + 14, Y% + 17), 2, 4
    PAINT (X% + 14, Y% + 17), 4, 4
    CIRCLE (X% + 9, Y% + 9), 2, 16
    PAINT (X% + 9, Y% + 9), 16, 16
Without fully understanding how your game is getting screwed I'll have to guess, so try reading this and copying the code etc: http://faq.qbasicnews.com/?blast=DoubleB...ngConcepts
just to make things more complicated, here's another tut on double buffering (i like it very much)

www.rpg-dev.net/buffering.txt
well this is the prolem...

if i change the first circle(CIRCLE (X% + 9, Y% + 9), 9, 40 )
to: LINE (X% + 9, Y% + 9)-(X% + 9, Y% + 9), 9, BF
then you only can see the charakters eyes and everything is red
and when i move u can see the part of the map where the charakter is but if you move 2 or 3 steps more everything gets
red again... that is the prolem
is there a paint command?
Check paint's last parameter. It specifies which colour will be the limit. It will surpass any other colour. That's your problem.
im makinbg program that you fly a helicopter around and it is red with a blueish windshield and when i used paint to paint it red it went right over the windshield
Because the border colour for the body (I presume you are painting the body red, not the windshield) is not one colour. There will be a hole and so paint keeps filling past it. That's why I don't like and hardly ever use PAINT. It's better to make the actual image and PUT it to the screen (with the lovely WAIT &H3DA command to eliminate flicker).
Quote:Because the border colour for the body (I presume you are painting the body red, not the windshield) is not one colour. There will be a hole and so paint keeps filling past it. That's why I don't like and hardly ever use PAINT. It's better to make the actual image and PUT it to the screen (with the lovely WAIT &H3DA command to eliminate flicker).

That what happened to my windshield
Eh? What do you mean?
Pages: 1 2