Archiverse Internet Archive
投稿のみ 投稿と返信
前のページ(最近)
1 2 3 4 5 6 7 8
次のページ(過去)
返信[7]
親投稿
Stewart segludian
Attached is a splink demo. Use Phillips suggestion when you want something bigger than 16x16, and link sp to make a character out of several pieces, or both ideas at once.
0そうだね
プレイ済み
返信[6]
親投稿
Stewart segludian
For sprites larger than 16x16 use Phillips suggestion. If you want a character composed of several sprites like say a hero and the weapon they hold then use splink sprites. I have attached an splink sprite example for your amusement. You can of course use both together
0そうだね
プレイ済み
返信[1]
親投稿
Stewart segludian
try using spofs after you allocate a sprite. spofs 0, 24, 43 where 0 is the management number, 24 the x coordinate and 43 the y coordinate to move the sprite to the desired location.
1そうだね
プレイ済み
返信[9]
親投稿
Stewart segludian
Here is an updated version of my previously posted code with circle pad support. Remember to use floating point numbers for recieving position data from the circle pad. I also added some waits on moving through the menus so things didn't go too fast. Hope that helps.
0そうだね
プレイ済み
返信[7]
親投稿
Stewart segludian
Attached is something to show what I mean by processing input for the menu. Let me know if you need to see all of the code.
1そうだね
プレイ済み
返信[6]
親投稿
Stewart segludian
I see a couple of problems, you define a bunch of functions to manipulate the menu but never call them. You also need something to loop over button events and move the cursor around/select menu items. Anyway put a call to your openmenu functionjust before the first def line and you should at least see something drawn.
1そうだね
プレイ済み
返信[3]
親投稿
Stewart segludian
30 is fine assuming you have a return command somewhere. @MAIN looks ok too, although you would be much better off with a while/wend or repeat/until loop, but then I would replace your gosub calls with functions/subroutines too. Anyway, gosub @label to jump to a line of code. return to go back where you came from, and @label to define a point to jump to.
2そうだね
プレイ済み
返信[7]
親投稿
Stewart segludian
I see maxy instead of maxy% on line 5. That would give you an undefined variable error. If that doesn't work try moving option strict up to line 1, and let me know if you get a different error message.
0そうだね
プレイ済み
返信[14]
親投稿
Stewart segludian
REPEAT VSYNC UNTIL BUTTON(3) != 0 END ACLS TITLESCREEN 'ADD CODE FOR YOUR GAME HERE ACLS END I think I attached the background loading code. Just make sure to use scsave instead of save in smile tool if you prefer a tile map.
0そうだね
プレイ済み
返信[13]
親投稿
Stewart segludian
I think I posted some map loading code a day or two ago, but if you just want to put a picture on the screen it may be easier to draw it in smile tools drawing program, then load it from file. Something like: DEF TITLESCREEN DIM X%, Y%, MSG$ LOAD "GRP0:SPACETITLE", 0, 0, FALSE GCOPY 0, 0, 0, 400, 240, 0, 0 MSG$ = "PRESS A BUTTON TO PLAY" X% = (49 - LEN(MSG$)) * 8 Y% = 20 GPUTCHR X%, Y%, MSG
0そうだね
プレイ済み
返信[2]
親投稿
Stewart segludian
Attached is my take on a generic title screen. You would probably want a picture in back instead of just a flat color. You would want to do something with the bottom screen too. Just add your game code in between the title screen call and the title screen function declaration. I hope that helps.
0そうだね
プレイ済み
返信[1]
親投稿
Stewart segludian
I found some code at smilebasicsource.com by JamieYellow and wrote an example around it. For your own code you will have to adapt it for map size and file names. Mine was shorter than a screen vertically so add some code to handle scolling on the y axis in your code too. Good luck. For this to work use scsave in the map editor, not the normal save button.
0そうだね
プレイ済み
返信[5]
親投稿
Stewart segludian
Attached is my attempt at a fading text example.
1そうだね
プレイ済み
返信[1]
親投稿
Stewart segludian
Thanks, glad to hear you like it.
1そうだね
プレイ済み
返信[3]
親投稿
Stewart segludian
The code in the attached screen shot may help. It sets up an animated sprite, then moves it around using values from STICK as mentioned above. Sorry no space to add bounds checking in a single screen full of code.
1そうだね
プレイ済み
返信[2]
親投稿
Stewart segludian
Sounds nice, I like it.
0そうだね
プレイ済み
返信[1]
親投稿
Stewart segludian
Looks really nice, is it real time, or does it take a while to render?
0そうだね
プレイ済み
返信[5]
親投稿
Stewart segludian
In your code, you shouldn't be looping over random numbers between 0 and 9999 in a double nested loop. instead x should be a random number between 0 and screen width, and y a random number between 0 and screen height. you only need one loop between 0 and 19 where you initialize each enemy as you go. Hope that makes sense. My demo key above has a function that does about what you are looking for.
0そうだね
プレイ済み
返信[4]
親投稿
Stewart segludian
I totally got carried away. I was gonna make a small bit of code to show how to initialize your enemies and wound up making a mini game. Too long to post the code but it should be fairly easy to follow and show an example of what you are looking for. I opted to use spvar instead of parallel arrays but it isn't really all that different either way. Anyway, the key is 5K4KNPA6 assuming I uploaded ok
2そうだね
プレイ済み
返信[1]
親投稿
Stewart segludian
Sounds very cool, I am impressed. Any code to show off?
1そうだね
プレイ済み