プレイ日記
crazy pro Jakob13009
how do i make it so i see the figure moving when i hold down the d pad in any direction so you dont see it disappear when it moves then just reappear at the place it stops at
1そうだね
プレイ済み
返信[1]
親投稿
eddie ninteneddie
To move your character try the following: 1) Change x and y positions when a corresponding button on the D-pad is pressed. 2) Have it draw characters on screen at those x and y positions. 3) Use Vsync by 1 frame. 4) Clear the character on screen. 5)Use a loop to return to the beginning and repeat.
0そうだね
未プレイ
返信[2]
親投稿
crazy pro Jakob13009
what do i type in just show me
0そうだね
プレイ済み
返信[3]
親投稿
crazy pro Jakob13009
show me a picture of the code
0そうだね
プレイ済み
返信[4]
親投稿
klonoa hellkolbod
how do you add a map while also having a moveable sprite on screen at the same time (like pathogen 0)
0そうだね
プレイ済み
返信[5]
親投稿
Autz sonic-HD8765
Giving you a sample code, i think, is a bad idea. Since any game/app you're going to make has it's own unique challenges, so instead of copy/paste a code, try to learn how it works so you won't have these problems again in the future. What @eddie tried to say is that anything you display onscreen is based on coordinates, so to move something on the screen you should modify those coordinates-CONT-
1そうだね
プレイ済み
返信[6]
親投稿
Autz sonic-HD8765
PX=0 'Player coordinates on X axis PY=0 'Player coordinates on Y axis IF BUTTON(2) AND #UP THEN DEC PY IF BUTTON(2) AND #LEFT THEN DEC PX IF BUTTON(2) AND #RIGHT THEN INC PX IF BUTTON(2) AND #DOWN THEN INC PY LOCATE PX,PY PRINT "P"
1そうだね
プレイ済み
返信[7]
親投稿
eddie ninteneddie
To also add onto what Autz had said I would have added this to the end of the code: VYSNC 1 CLS What "VSYNC" will miss 1 frame out from your program in this case it's when you have to clear everything off screen to be painted on again. This will mean you won't be able to see the character disappear from the screen.
0そうだね
未プレイ
返信[8]
親投稿
Stewart segludian
Attached is my text mode d-pad demo. The chkchr calls are so you can restore what was at the old spot before you move to the new one. Unfortunately what I have doesn't restore colors. Anyway, give it a try. Let me know if you have questions.
0そうだね
プレイ済み
返信[9]
親投稿
eddie ninteneddie
Moogle, to make a map I would save the information into arrays. If you don't know what an array is it's similar to a variable but it can have lots of information within it. An array like this: "DIM HOUSES[5,2]". The first number represent how many houses are on the map and the second number is to represent the x and y position of each of them.
0そうだね
未プレイ
返信[10]
親投稿
eddie ninteneddie
To change the information of these arrays I would refer to them like this. HOUSES[0,0] = 5 HOUSES[0,1] = 10 All this does is set the x and y of the first house to (5,10). Then later I could print a house back on screen by doing this. FOR I=0 to 4 LOCATE HOUSES[I,0] , HOUSES[I,1] PRINT "P" NEXT What this will do is go through every house and print them at their x and y position.
0そうだね
未プレイ
返信[11]
親投稿
Stewart segludian
Is the map for text mode or are you wanting a graphical map moogle?
1そうだね
プレイ済み
返信[12]
親投稿
crazy pro Jakob13009
auts/eddie it didnt work
0そうだね
プレイ済み
返信[13]
親投稿
klonoa hellkolbod
text mode as in its just there and graphic mode as in it moves with the sprite (im new ok i just got the 1st chapter out for my first game which is a text adventure portion of it)
0そうだね
プレイ済み
返信[14]
親投稿
crazy pro Jakob13009
thanks everyone
0そうだね
プレイ済み