Archiverse Internet Archive
投稿のみ 投稿と返信
前のページ(最近)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
次のページ(過去)
返信[2]
親投稿
Stewart segludian1
I prefer the spset [management number] out [id variable] format. That way SmileBasic makes an ID for you, you only have to save it in a variable.
0そうだね
プレイ済み
返信[1]
親投稿
Stewart segludian1
It depends on how you made the map. Did you create it with the editor in the Smile Tool? If so did you save it as one file or several layers? If you have a bunch of data statements or read from a text file the answer will be different. The SmileTool editor is nice but has hard coded map sizes. Which is why other methods can be better.
1そうだね
プレイ済み
プレイ日記
Stewart segludian1
"Dodger" adapted from "Invent your own Computer Games with Python" (inventwithpython •com). More difficult to adapt than I expected. Now to clean it up and add a whole lot of comments. I think I redrew the characters rather close to the originals.
2そうだね
プレイ済み
返信[18]
親投稿
Stewart segludian1
I suppose there is one graphical game at the end of Invent your own Computer Games with Python called Dodger. Would it help if I converted it to SmileBasic?
0そうだね
プレイ済み
返信[17]
親投稿
Stewart segludian1
You shouldn't feel down about sprites. They get complicated quickly. It can take a while. There are also a lot of games you can make with just text. Did you have any questions about the sprite demo I posted earlier? If we are recommending learning materials I nominate Al Sweigarts invent with python site. He has two game dev books you can read online for free. His first book is all text games.
0そうだね
プレイ済み
返信[4]
親投稿
Stewart segludian1
As for sprites, attached is a small demo to get you started.
0そうだね
プレイ済み
返信[3]
親投稿
Stewart segludian1
That being said it is very rewarding to finish something and is usually something you can hold your head high about. It is worthwhile and good for you. On the other hand if it becomes a dreaded chore and misery don't punish yourself. It is ok to try new things and to give yourself a break. It is a subtle life skill to learn. If you would regret quitting, give it another try.
0そうだね
プレイ済み
返信[2]
親投稿
Stewart segludian1
Sometimes programming isn't fun. It isn't unusual to hit a section of code or hit an stage where you would rather do other things. However, that isn't just programming. It is anything that takes practice skill or dedication. It is a normal part of life. So it isn't so much motivation as dedication. You do it because you want to see things through not because it is fun.
0そうだね
プレイ済み
返信[7]
親投稿
Stewart segludian1
Try reading through my Guess the number game. KEY: 8E7Y33G4 It is designed with beginning programmers in mind and has a lot of comments (please excuse the type-os). Let me know if you have any questions.
0そうだね
プレイ済み
返信[4]
親投稿
Stewart segludian1
part three. The final part. This is the circle intersect checking function.
1そうだね
プレイ済み
返信[3]
親投稿
Stewart segludian1
part two.
0そうだね
プレイ済み
返信[2]
親投稿
Stewart segludian1
I made a demo for you, see part one attached.
0そうだね
プレイ済み
返信[6]
親投稿
Stewart segludian1
Bad news on the voxels. If you want to show those files in your program you will need to make a 3d engine to draw them. That gets difficult fast. I haven't used that program before but I would guess you load a 3 dimensional array and each square is either empty or a color code. Voxels are basically 3D pixels. For the background, you want something like the attached right?
0そうだね
プレイ済み
返信[3]
親投稿
Stewart segludian1
So, what is in the file then? Is it polyon coordinates, an image file, or something else? Did you make it or get it from someone else's code?
0そうだね
プレイ済み
返信[1]
親投稿
Stewart segludian1
What is in the box file, text or an array? For text you want something like: VAR BOX1$ LOAD "TXT:BOX1.VX" FALSE OUT BOX1$ For a number array, something like: VAR BOX1%[0] LOAD "DAT:BOX1.VX", BOX1%, FALSE Box1.vx was the filename, right? If not update with the right filename.
0そうだね
プレイ済み
返信[14]
親投稿
Stewart segludian1
That sounds reasonable you would just have to pass more variables around or make different update functions for each type of projectile.
0そうだね
プレイ済み
返信[11]
親投稿
Stewart segludian1
If the enemy is at ex, ey and the player is at px, py, just check if ex == px and ey == py. Demo attached.
2そうだね
プレイ済み
返信[11]
親投稿
Stewart segludian1
Lastly we have update shovel. Note how we have to resave any spvar values we modify at the end. If the sprite goes offscreen it deletes itself. The Step variable is there to keep line length shorter and not calculate that value twice. This function is called for each shovel every frame. Hope this all makes sense let me know if you have questions.
0そうだね
プレイ済み
返信[10]
親投稿
Stewart segludian1
The penultimate funtion updates the hero. Note the use of the cooldown timer so we don't fire too fast. This is called when Call Sprite is called in the main game loop. CALLIDX has your sprite id. The max thing is just so I don't have negative cooldown which may not matter unless you leave the game idle for hours and the counter wraps around. We create new shovels to throw here.
0そうだね
プレイ済み
返信[9]
親投稿
Stewart segludian1
Forgot the picture :(
0そうだね
プレイ済み