? Pvsz2?... (Page 6) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Pvsz2?...

1 2 3 4 5 6
  • #101 ✎ 169 thou_fatGAMER12 Video Games I like to play video games! Hobbies Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Drawing I like to draw! Hobbies
    -get sniped son-
    So if you mean what I think you mean, you could just divide and round the location by the tile size or something, then multiply it by the same number to get the position. And to change what sprite gets placed, use a different sprite number or even a variable in SPSET.
    Multiplying doesn't work. And I think I know the reason why. This my friend, is the lawn. And as can be seen, it has a lot of what we gamers call 'pixels' and when getting the average amount of pixels per tile (length of the lawn x width of the lawn divided by 45 (the number of tiles)). When you do that math, it is 780 pixels per tile. Maybe that is more than anticipated. But even at that, dividing the TX and TX by 780 gets into 0.00000 territory, and even when you multiply it afterwards, it still equals less than one. :p please no get mad Edit like 3: also yes the house isn't finished and yes my 3DS all of the sudden allow to post pictures. It is weird like that.
    Posted Edited by thou_fatGAMER12
  • #102 ✎ 1357 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Forum Leader Hidden Achievements
    MOR SNIP
    Multiplying doesn't work. And I think I know the reason why. This my friend, is the lawn. And as can be seen, it has a lot of what we gamers call 'pixels' and when getting the average amount of pixels per tile (length of the lawn x width of the lawn divided by 45 (the number of tiles)). When you do that math, it is 780 pixels per tile. Maybe that is more than anticipated. But even at that, dividing the TX and TX by 780 gets into 0.00000 territory, and even when you multiply it afterwards, it still equals less than one. :p please no get mad Edit like 3: also yes the house isn't finished and yes my 3DS all of the sudden allow to post pictures. It is weird like that.
    Well you wouldn't find the area of each tile. You should find the length and width of each tile, then divide and multiply each tile based off of those and not the total area. Here's what I mean: x=round(x/length)*length y=round(y/width)*width Or at least something like that (I may have mixed up length and width and then was too lazy to switch them but now I've taken a long time to write this sentence instead gosh dang it) EDIT2: Quotes can be hard to deal with
    Posted Edited by rando
  • #103 ✎ 169 thou_fatGAMER12 Video Games I like to play video games! Hobbies Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Drawing I like to draw! Hobbies
    Well you wouldn't find the area of each tile. You should find the length and width of each tile, then divide and multiply each tile based off of ¿those? and not the total area. Here's what I mean: x=round(x/length)*length y=round(y/width)*width Or at least something like that (I may have mixed up length and width and then was too lazy to switch them but now I've taken a long time to write this sentence instead gosh dang it) EDIT2: Quotes can be hard to deal with
    Wait so I'm supposed to find the length and width of each tile, and then divide it, and multiply it, by itself? what Do you mean by "those" because if you mean multiply and divide the length and width (of each different tile!) by touch, your completely negating the fact that I originally asked for a way around having to code all different possibilities, and if your multiplying by itself, that doesn't make too much sense. If I were to use that, even if it worked, I would still have to account for everywhere people can tap on the lawn and find the length and width of each different tile. So... But then again my 3DS is dead so who knows Edit:by the way thanks for the help even if it isn't always a hit.
    Posted Edited by thou_fatGAMER12
  • #104 ✎ 1357 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Forum Leader Hidden Achievements Basically what I mean is divide tx (touch x) by the width, round it, then multiply again. For example, if one tile is 10 wide and 20 tall, you would do this: TX=ROUND(TX/10)*10 TY=ROUND(TY/20)*20 That should get sprite coordinates. Posted
  • #105 ✎ 169 thou_fatGAMER12 Video Games I like to play video games! Hobbies Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Drawing I like to draw! Hobbies
    Basically what I mean is divide tx (touch x) by the width, round it, then multiply again. For example, if one tile is 10 wide and 20 tall, you would do this: TX=ROUND(TX/10)*10 TY=ROUND(TY/20)*20 That should get sprite coordinates.
    Okay I'll try it, but do you think using the average width and height would work? Because The way your speaking,
    For example, if one tile is 10 wide and 20
    Sounds a whole lot like your asking for me to find the width and height of every different tile Edit:oop I spelled using ising
    Posted Edited by thou_fatGAMER12
  • #106 ✎ 1357 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Forum Leader Hidden Achievements
    Basically what I mean is divide tx (touch x) by the width, round it, then multiply again. For example, if one tile is 10 wide and 20 tall, you would do this: TX=ROUND(TX/10)*10 TY=ROUND(TY/20)*20 That should get sprite coordinates.
    Okay I'll try it, but do you think ising the average width and height would work? Because The way your speaking,
    For example, if one tile is 10 wide and 20
    Sounds a whole lot like your asking for me to find the width and height of every different tile
    You should probably find the average width and average hight. EDIT: It's best to find the average when all the tiles have similar dimensions. Otherwise, the sprites may be way off though evenly spaced. If one tile width is 10 and another is 11 or 12, it would be mostly fine. But if one is 10 and another is 100 (not likely if this is Plants vs Zombies) then there would be some major flaws.
    Posted Edited by rando
  • #107 ✎ 169 thou_fatGAMER12 Video Games I like to play video games! Hobbies Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Drawing I like to draw! Hobbies
    Basically what I mean is divide tx (touch x) by the width, round it, then multiply again. For example, if one tile is 10 wide and 20 tall, you would do this: TX=ROUND(TX/10)*10 TY=ROUND(TY/20)*20 That should get sprite coordinates.
    Okay I'll try it, but do you think ising the average width and height would work? Because The way your speaking,
    For example, if one tile is 10 wide and 20
    Sounds a whole lot like your asking for me to find the width and height of every different tile
    You should probably find the average width and average hight. EDIT: It's best to find the average when all the tiles have similar dimensions. Otherwise, the sprites may be way off though evenly spaced. If one tile width is 10 and another is 11 or 12, it would be mostly fine. But if one is 10 and another is 100 (not likely if this is Plants vs Zombies) then there would be some major flaws.
    Yah well, there isn't major differences. I mean, I haven't actually been doing the averages (because I didn't want to right now or for the past days), but I can already tell they won't very over around 5 at most, no more/less. This is because you can pretty easily guess that after seeing the picture
    Posted
  • #108 ✎ 169 thou_fatGAMER12 Video Games I like to play video games! Hobbies Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Drawing I like to draw! Hobbies I can say that the average for height, is 31 pixels. If figured this out incredibly easily by instead of counting the height of each different tile, I could instead find the height of the lawn itself and multiply that by 9. After multiplying it by 9, I would divide it 45 for the whole amount of tiles there. And using the same tactic, I found the average width was 28. (Actually it had decimals I just cut them off). Posted
  • #109 ✎ 1357 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Forum Leader Hidden Achievements
    I can say that the average for height, is 31 pixels. If figured this out incredibly easily by instead of counting the height of each different tile, I could instead find the height of the lawn itself and multiply that by 9. After multiplying it by 9, I would divide it 45 for the whole amount of tiles there. And using the same tactic, I found the average width was 28. (Actually it had decimals I just cut them off).
    I don't quite understand how you did that but I hope it works. The way I learned how to find the average is by adding each thing and then dividing that number by how many things there are.
    Posted
  • #110 ✎ 169 thou_fatGAMER12 Video Games I like to play video games! Hobbies Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Drawing I like to draw! Hobbies
    I can say that the average for height, is 31 pixels. If figured this out incredibly easily by instead of counting the height of each different tile, I could instead find the height of the lawn itself and multiply that by 9. After multiplying it by 9, I would divide it 45 for the whole amount of tiles there. And using the same tactic, I found the average width was 28. (Actually it had decimals I just cut them off).
    I don't quite understand how you did that but I hope it works. The way I learned how to find the average is by adding each thing and then dividing that number by how many things there are.
    Well, there are five different tiles going up and down, and nine going left and right, so, I found the height of the lawn itself (lawn hieght==5 tiles up and down), and multiplied by nine (the number of them left to right) for the average height. Then I used the same tactic for width but instead of top, it was left, instead of bottom, it was right, and instead of height it is width, and 5 is replaced with 9, and the other way around. It sounds way more complicated than it is. THEN I divide by the number of tiles (45)
    Posted
  • #111 ✎ 1357 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Forum Leader Hidden Achievements That doesn't sound like it would work, but that's because it's so complicated and hard to understand. (To find the average hight, you have to use the width...?) I don't see how that would work, but if it does, good job. Posted
  • #112 ✎ 169 thou_fatGAMER12 Video Games I like to play video games! Hobbies Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Drawing I like to draw! Hobbies
    That doesn't sound like it would work, but that's because it's so complicated and hard to understand. (To find the average hight, you have to use the width...?) I don't see how that would work, but if it does, good job.
    K so simply I thought with a big brain, and realized, instead of counting the height of each different tile, I could find the height of each column of tiles (height of the lawn itself), and multiply it by how many different columns of tiles there are (width). Then I could divide the final answer by the number of tiles on the lawn. And the same goes for the average width except you switch columns with rows, height by width, and 5 by 9 this is about the most simple I can explain it, and sorry you don't understand (if you still don't). Aside from repeating myself, I seemed to have a found an error. When I tap behind or above where it says 0, it instantly goes back to like 900 something and I don't know why. You'd think maybe it is a weird way of showing and counting negative numbers or something but no, it would use a - to show negative numbers. So I don't know. Once again back to the drawing board... Unless there is a way to fix it... Oh and you may think that doesn't matter, but it does, because it not only applies to that, but it also applies to going towards the 900s in number. Once you go above 990 something it resets to 0 being similar in issue
    Posted Edited by thou_fatGAMER12
  • #113 ✎ 1357 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Forum Leader Hidden Achievements I think I see what you mean: Since it's a lawn, each column is different. So you have to calculate each tile size. Because of this, you decide to find the hight for one column. Then you multiply it by the other columns and divide it by the total, instead of dividing it by the hight of the one column in tiles without multiplying. That way you get the same answer, with more work involved. As for the other issue, it doesn't matter if tapping on the lawn works. Just make it so that tapping outside of a range (in this case, the area of the lawn) does not do what tapping in it does if that makes sense. Posted
  • #114 ✎ 169 thou_fatGAMER12 Video Games I like to play video games! Hobbies Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Drawing I like to draw! Hobbies Ight if imma not be lazy then tomorrow maybe I can get the sun function done. Btw
    I think I see what you mean: Since it's a lawn, each column is different. So you have to calculate each tile size. Because of this, you decide to find the hight for one column. Then you multiply it by the other columns and divide it by the total, instead of dividing it by the hight of the one column in tiles without multiplying. That way you get the same answer, with more work involved. As for the other issue, it doesn't matter if tapping on the lawn works. Just make it so that tapping outside of a range (in this case, the area of the lawn) does not do what tapping in it does if that makes sense.
    It does matter. Just because you tap inside the lawn doesn't mean the error goes away and also it applies to positive numbers so it will go to 900 something and go back to 0 and that would really cause errors if you try to use X and Y for spofs as that would just kill it's position being good and stable entirely.
    Posted
  • #115 ✎ 169 thou_fatGAMER12 Video Games I like to play video games! Hobbies Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Drawing I like to draw! Hobbies when you thought it was music to relax to but it was really https://www.youtube.com/watch?v=B6CJo4IAzWY&app=desktop Also I'm actually getting work done like I said I would. Posted
  • #116 ✎ 1357 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Forum Leader Hidden Achievements Well I don't know how to help too much because I don't know the details. Posted
  • #117 ✎ 169 thou_fatGAMER12 Video Games I like to play video games! Hobbies Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Drawing I like to draw! Hobbies https://m.youtube.com/watch?v=TXGO1fRV2gM
    Well I don't know how to help too much because I don't know the details.
    Enjoy the 👌 supreme quality
    Posted Edited by thou_fatGAMER12
  • #118 ✎ 1357 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Forum Leader Hidden Achievements
    https://m.youtube.com/watch?v=TXGO1fRV2gM
    Well I don't know how to help too much because I don't know the details.
    Enjoy the 👌 supreme quality
    Could you send me the code? I still don't see what's happening. (You should probably encrypt it or something.)
    Posted
  • #119 ✎ 169 thou_fatGAMER12 Video Games I like to play video games! Hobbies Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Drawing I like to draw! Hobbies
    https://m.youtube.com/watch?v=TXGO1fRV2gM
    Well I don't know how to help too much because I don't know the details.
    Enjoy the 👌 supreme quality
    Could you send me the code? I still don't see what's happening. (You should probably encrypt it or something.)
    Ey I figured it now me big dumb
    Posted
1 2 3 4 5 6