プレイ日記
Chickens32 Chickens32
Working on a 3D-ish engine. It's REALLY simple using SPOFS and SPSCALE. I made the back wall, but I have NO idea on how I could make the diagonal side walls. (What I mean is, if the sprite were to walk up to the wall, they stop moving. I know things like IF X<23 THEN X=23.) How do I make diagonal collision? Any ideas?
4そうだね
プレイ済み
返信[1]
親投稿
PChicken NerdChicken
You could try to get the angle of the line and then get the Z value of the aprite and get the intersection of the two lines, then not let the sprite past that point
0そうだね
プレイ済み
返信[2]
親投稿
PChicken NerdChicken
My two cents anyways, I learned this stuff in school so it makes much more sense than two months ago.
0そうだね
プレイ済み
返信[3]
親投稿
PChicken NerdChicken
I will try to replicate what you did and implement this in, if I have time. Continue working on the problem!
0そうだね
プレイ済み
返信[4]
親投稿
PChicken NerdChicken
Game plan for me (this is so i can gather my thoughts): Create back wall Create randomized side walls and record line angles Get sprite Main loop Get sprite position Controls, change variables to not truely move sprite Find line intersections with new positions If hitting, don't move sprite, else move sprite repeat
0そうだね
プレイ済み
返信[5]
親投稿
PChicken NerdChicken
*truly
0そうだね
プレイ済み
返信[6]
親投稿
PChicken NerdChicken
Oh, but I'll have to take into account sprite size as well...
0そうだね
プレイ済み
返信[7]
親投稿
PChicken NerdChicken
I'll do this using SPSCALE OUT
0そうだね
プレイ済み
返信[8]
親投稿
Chickens32 Chickens32
I can send you the code. I'm thinking about using this for the Endless War to make it Earthbound-y.
0そうだね
プレイ済み
返信[9]
親投稿
Snookems apples2254
Recen
0そうだね
プレイ済み
返信[10]
親投稿
PChicken NerdChicken
this is a lot of math... but i'm making good progress
0そうだね
プレイ済み
返信[11]
親投稿
PChicken NerdChicken
I don't need the code at this point, it is pretty simple to make.
0そうだね
プレイ済み
返信[12]
親投稿
PChicken NerdChicken
other than the side walls
0そうだね
プレイ済み
返信[13]
親投稿
PChicken NerdChicken
more than an hour for 31 lines of code... what am i doing with my life... anyways, it works. I finally did the math right after it all went over my head over and over again.
0そうだね
プレイ済み
返信[14]
親投稿
PChicken NerdChicken
I'll get screenshots and code in soon. I really really like my code. But it has a 1 in 359 chance of crashing because of a divide by zero, because of math. I'm going to make a player-centered camera for this.
0そうだね
プレイ済み
返信[15]
親投稿
PChicken NerdChicken
8EVN438J I made the player a log so I can could see the full boundaries of the sprite.
0そうだね
プレイ済み
返信[16]
親投稿
PChicken NerdChicken
But how do I make the camera not take into account the sprite size? How do I make things smaller instead?
0そうだね
プレイ済み
返信[17]
親投稿
PChicken NerdChicken
*confuzzled*
0そうだね
プレイ済み
返信[18]
親投稿
Chickens32 Chickens32
I know this is probably SUPER annoying for you, but could you take my key and implement what you did on my engine? I'm not a mathematician, and I am completely and utterly AMAZED of what you did. It's awesome! (you'll get credit [if you help {more than u already have}]) thx
0そうだね
プレイ済み
返信[19]
親投稿
PChicken NerdChicken
I have a feeling your code is not going to be simple
0そうだね
プレイ済み
返信[20]
親投稿
PChicken NerdChicken
But I won't help you on the last stretch, sorry. It's not that big of a deal that you want me to help a bit more. But the fact that you would only give me credit for FULLY implementing it into your code after spending an hour and a half for making a working example is kind of sad. If you feel overwhelmed by my code, then just edit mine. I'm sure it wouldn't be too much of a change.
0そうだね
プレイ済み
返信[21]
親投稿
PChicken NerdChicken
I'm not a bad guy, but you ask for so much with this "credit" thing hanging off a hook for me to chase, and it isn't working.
0そうだね
プレイ済み
返信[22]
親投稿
Chickens32 Chickens32
I understand. I guess it would be your own game then. But could you at least tell me why the code isn't working? I got rid of the random number thing and put my own. But now when I move my character around only the x-coordinates move and not the y. He also won't stop when he hits my line. Whats wrong with my code?
0そうだね
プレイ済み
返信[23]
親投稿
PChicken NerdChicken
That's the initialization. Any errors would be in the main loop. (if you're in the main loop, something is very wrong)
0そうだね
プレイ済み
返信[24]
親投稿
Chickens32 Chickens32
Oh! Never mind! I got it to work! Just need to make some adjustments! Thanks so much! Any way I can make this up to you?
0そうだね
プレイ済み
返信[25]
親投稿
PChicken NerdChicken
nope
0そうだね
プレイ済み
返信[26]
親投稿
Chickens32 Chickens32
...if I can someday I will...if I can... xD
0そうだね
プレイ済み
返信[27]
親投稿
Chickens32 Chickens32
Do you care if I use this for a game?
0そうだね
プレイ済み
返信[28]
親投稿
PChicken NerdChicken
Why would I? Make sure you texture the walls.
0そうだね
プレイ済み
返信[29]
親投稿
Chickens32 Chickens32
I don't know, I just thought it'd be respectful because you helped A LOT! I'm not very professional at coding. I was also wondering how I could do that. I was thinking using GFILL, but I don't think GFILL can go diagonally. I could make a map, and reposition the lones to fit it, but that'd take a while. Oh well, whatever works.
1そうだね
プレイ済み
返信[30]
親投稿
PChicken NerdChicken
Use GPAINT, it's like the fill/paint bucket in most tools.
1そうだね
プレイ済み