davethecross

Member
  • Content count

    13
  • Joined

  • Last visited

Community Reputation

122 Neutral

About davethecross

  • Rank
    Member
  1. This seemed like the most relevant forum to post this:   I'm starting a game that will be two player split screen, and I want to know how to do it the most optimally.   My first thought was to use two canvas elements side by side, but it seems too sloppy; especially when dealing with things like a menu screen when there is no split screen showing.   I was wondering if there was maybe a built in way to deal with this, or if not what should the pseudo code roughly look like?   Thanks for reading
  2. Hey Gamedev, To put it gracefully, I'm trying to draw a line from my character to the nearest tile in the direction he's facing. I found out that this can be achieved with a voxel traversal algorithm. The one I'm using is in this tutorial: [url="http://www.metanetsoftware.com/technique/tutorialB.html"]http://www.metanetsoftware.com/technique/tutorialB.html[/url] near the bottom of the page. I've attached the pdf of the actual algorithm as well. Everything has gone fine and I have it running. Once the calculation has finished, the algorithm leaves you with the x and y coordinates of the tile(or voxel) that the line should stop at. This is all well and good, but I'm missing the final step. What are the final x/y coordinates for the end point of the line that I want to draw? It must be very obvious if they felt like excluding it in the pdf, but I just can't figure it out. To clarify some possible confusion, I have the x and y of the tile(aka x*tile size,y*tile size will give me the in game coordinates) but I want the x and y of where the line should stop after it hits the tile. Thanks for reading Dave
  3. Lots of new members on this site

    Everyone saw drawsomething sell for 200mil and are here to make their fortune. Seriously though, I'm curious myself.