Sounds fun! I'd love to help
I can see how I'd program it, idk how working with others on one SmileBASIC program works though
0そうだね プレイ済み
@Harley: Actually it does us 3D algorithms to position all the blocks, it would actually be quite easy to replace the sprites with actual 3D polygons
1そうだね プレイ済み
FANTASTIC GAME!
I enjoyed it so much I took time to understand all the code
I haxed it X]
1そうだね プレイ済み
Idk that was just a quick example typed up real quick
But if you want to see something done ill show you the code for it
0そうだね プレイ済み
You could try something like this
The green is just a comment, which gets skipped when ran
Comments start with a single quote
The code gets ran from top to bottom
1そうだね プレイ済み
Wait how'd you do that? I didnt know you could transform text like that
0そうだね プレイ済み
By looking at the paths you can tell the precision isnt perfect (they wobble a bit)
But they do attract each other the closer they are to each other
1そうだね プレイ済み
^
if thats what you were looking for
0そうだね プレイ済み
Mkay, here:
Two circles will bounce around the screen, and will be attracted to each other using realistic planetary physics.
1そうだね プレイ済み
This is written on one of the white boards at Google:
"You need to be twice as smart as the person who wrote the code in order to debug it. So if you use all your smarts to design and write it, you won't be smart enough to debug it!"
I try to make cleaner code now after reading that quote, but still enjoy obfuscating
Hope this helps later on
3そうだね プレイ済み
then you'd move the bullet like so:
X=X+XVEL
Y=Y+YVEL
SPOFS BULLETID,X,Y
Keep in mind these variables should be arrays if you want more than one bullet on the screen at once
1そうだね プレイ済み
Well thats when you need to use sine and cosine to convert an angle in degrees to a x velocity and y velocity
It takes a bit of math unfortunately
So lets say the sprites rotation is stored in
VAR ROT
rotate the sprite to that angle with
SPROT SPRITEID,ROT
get the x and y velocities of the bullet with
XVEL=-10*SIN(-ROT*PI()/180)
YVEL=-10*COS(-ROT*PI()/180)
[you might need to tweak]
1そうだね プレイ済み
Here, I added a machine gun to the spaceship in this key
The code shows you exactly how to make a gun
Key: [ RAPXEQD ]
2そうだね プレイ済み