RayCasting: why i get a more width vertical lines on square grid size? Programming Software Development by cambalinho …'Get the Ray Distance: HorizDist = Math.Abs((player.PosX - HorizX) / Math.Cos(RayRadians)) 'Check for vertical intersections…VertY = Player.PosY + (Player.PosX - VertX) * -Math.Tan(RayRadians) StepX = ObjectSize Else 'Facing left VertX = (… Re: RayCasting: why i get a more width vertical lines on square grid size? Programming Software Development by cambalinho …If VertDist < HorizDist Then WallDistance = Math.Floor(VertDist) OffSetGrid = VertY Mod ObjectSize …Else OffSetGrid = HorizX Mod ObjectSize WallDistance = Math.Floor(HorizDist) clr.Color = Color.DarkBlue … Re: RayCasting: why i get a more width vertical lines on square grid size? Programming Software Development by rproffitt When I work such an issue I set the breakpoint where the trouble is and examine variables. There's some variable that controls the output so that's what you look at. You've posted a lot about ray-tracing and that's all good but setting breakpoints to see what's going on seems to be the challenge. Re: RayCasting: why i get a more width vertical lines on square grid size? Programming Software Development by cambalinho debug print line height: Line Height : 1452 Line Height : 1441 Line Height : 1430 Line Height : 1419 Line Height : 1407 Line Height : 1397 Line Height : 1386 Line Height : 1375 Line Height : 1364 Line Height : 1353 Line Height : 1342 Line Height : 1331 Line Height : 1321… Re: RayCasting: why i get a more width vertical lines on square grid size? Programming Software Development by cambalinho i can see: 1 - maybe some are too much height(but they are converted to 300 of max); 2 - on some they are repeated... and maybe the problem is there... i can save the previous Height for test the actual Height.... but i see a problem: if i avoid them, i can lose some height, unless i continue add angle and don't count the rays ;) ... but maybe i… Re: RayCasting: why i get a more width vertical lines on square grid size? Programming Software Development by cambalinho will be rounded numbers problem or something? yes i'm testing more, but no success :( Re: RayCasting: why i get a more width vertical lines on square grid size? Programming Software Development by cambalinho maybe you have right... but, for now, i don't understand why and where i'm fail :( i'm learning from: https://permadi.com/1996/05/ray-casting-tutorial-table-of-contents/ theres several tutorials, but not all are so good :( Re: RayCasting: why i get a more width vertical lines on square grid size? Programming Software Development by m_624 In RayCasting, you may observe wider vertical lines on a square grid due to the nature of the algorithm. This phenomenon occurs because the vertical lines represent intersections of rays with grid cells, and depending on the angle and distance of the rays, they may intersect multiple grid cells horizontally, resulting in wider lines compared to the… Re: RayCasting: why i get a more width vertical lines on square grid size? Programming Software Development by cambalinho what make me more crazy is that i'm using a code, converted and works, from VB6 lol Re: Need help with Lem-in Project Programming by Oven Sadly, like i said GPT is not working anymore. My team coded this one. And AI & Ready code is acceptable. But it has to simple because we must understand the code. I found the working code but its 800 rows. So no we cant use it either. Even if anybody can explain the algorithm, that would help a lot too. Its like onion, we are thinking we … Re: Need help with Lem-in Project Programming by rproffitt Then you have to design and create the algorithm before you write code. There's a lesson here about writing code before the design is done. Re: Need help with Lem-in Project Programming by Oven True. Wish we had able to. We cant manage it, thays why im seeking some help. Re: Need help with Lem-in Project Programming by rproffitt This is some academic assignment so the lesson isn't about fixing this found or GPT generated code, it's not even about coding. It's about designing before code. Without a design, how would we code? Or if we use AI to write code, it's a lesson about how we still have to understand the code that it generates. Now for those that just want it … Re: Need help with Lem-in Project Programming by toneewa Display everything to see where you go wrong. Also, simplify your testing, e.g., 1 ant 2 rooms, 2 paths. There are some algorithms to consider. The Breadth-First Search (BFS) and Dijkstra’s algorithms are ways to find the shortest path. Research those to understand your use case. A fix to your parse function and ant struct will help get you back … VB2010- why i get a different vertical size\color on RayCasting? Programming Software Development by cambalinho … MapX = GetPositionMap(HorizX) MapY = GetPositionMap(HorizY) Loop HorizDist = Math.Abs((player.PosX - HorizX) / Math.Cos(RayRadians)) 'Check for vertical intersections: If RayRadians… Bouncing Balls: Creating a new ball when two balls collide Programming Software Development by jprog1000 …x <= 0 ) { xUp = true; xDx = ( int ) ( Math.random() * 5 + 2 ); } else if ( x >= this.panelwidth …* this.radius ) { xUp = false; xDx = ( int ) ( Math.random() * 5 + 2 ); } if (xUp) x += xDx; else… Re: Bouncing Balls: Creating a new ball when two balls collide Programming Software Development by toneewa …x <= 0 ) { xUp = true; xDx = ( int ) ( Math.random() * 5 + 2 ); } else if ( x >= this.panelwidth …* this.radius ) { xUp = false; xDx = ( int ) ( Math.random() * 5 + 2 ); } if (xUp) x += xDx; else… Re: Bouncing Balls: Creating a new ball when two balls collide Programming Software Development by toneewa …x <= 0 ) { xUp = true; xDx = ( int ) ( Math.random() * 5 + 2 ); } else if ( x >= this.panelwidth …* this.radius ) { xUp = false; xDx = ( int ) ( Math.random() * 5 + 2 ); } if (xUp) x += xDx; else… Graph of quadratic function with CanvasRenderingContext2D Programming Web Development by alexanderrm2024 … has to be a number!"; } else { var x1 = (-b - Math.sqrt(Math.pow(b, 2) - 4 * a * c)) / (2 * a);… var x2 = (-b + Math.sqrt(Math.pow(b, 2) - 4 * a * c)) / (2 * a); output = "… Paris Olympics Chatbot- Get Ticket Information Using Chat-GPT and LangChain Programming Computer Science by usmanmalik57 …result.content) ``` **Output:** ``` Why was the math book sad? Because it had too many problems!…(result.content) ``` **Output:** ``` Why was the math book sad? Because it had too many problems! ```… print(result) ``` **Output:** ``` Why was the math book sad? Because it had too many problems! ```… Need help with Lem-in Project Programming by Oven …; "io/ioutil" "log" "math" "os" "strconv" "…tunnel among the accessible ones shortestTunnel := "" shortestLength := math.MaxInt64 for _, tunnel := range accessibleTunnels { rooms := strings.… Re: What's the most unexpected hobby or interest you have outside of coding? Community Center Geeks' Lounge by jkon … I had a computer , I was coding and I liked math. Most of them were various martial arts. Now in my… stopped me) . I have started categorize math and physics as "hobbies" even if math is a part of my job… Re: Bouncing Balls: Creating a new ball when two balls collide Programming Software Development by jprog1000 Thank you so much for your reply and additions! It is certainly working as I wanted. I will read through the code you have added and ask you any questions I might have. I hope you don't mind. Regards Re: Bouncing Balls: Creating a new ball when two balls collide Programming Software Development by Dani I’ll mark this question solved :) Re: Bouncing Balls: Creating a new ball when two balls collide Programming Software Development by Dani … oh, sorry, missed the bit about you still needing clarifications. Feel feee to ask :) I’ll now unmark this topic as solved. /facepalm Re: Bouncing Balls: Creating a new ball when two balls collide Programming Software Development by jprog1000 Hello, Thank you again so much! All your additions are clear, but it seems like whenever two balls collide, more than one ball is added to the arraylist and painted. Any way to have just one ball added to the panel for every collision? Have some kind of a toggle flag in paintcomponent? Regards Re: Bouncing Balls: Creating a new ball when two balls collide Programming Software Development by toneewa Yes, this is true. Overlapping ball spawns can do that causing a chain reaction. Something like that could be done. How you handle the spawning of the new ball is what I played with a bit before. You will see better collision detection changing to: g.fillOval(ball.getX(), ball.getY(), 1 * ball.getRadius(), 1 * ball.getRadius()); Re: Bouncing Balls: Creating a new ball when two balls collide Programming Software Development by jprog1000 Got it. Thank you so much! Re: Bouncing Balls: Creating a new ball when two balls collide Programming Software Development by aishamushtaq Hi, Its helpful for me. I got my answer. Re: Graph of quadratic function with CanvasRenderingContext2D Programming Web Development by Dani Have you learned how to graph things? Did your professor teach you about using Canvas yet? Here is a tutorial for getting started: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial