Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About neilkenny

  • Rank
  1. I am currently writing a puzzle game that involves fitting different shapes blocks into a box and am coming across problems with directX while trying to implement the graphics. For the box I simply want to draw eight lines, 4 lines joined to make a square which will represent the base of the box, and one line sticking up from each corner of the base. I had these lines appearing perfectly and stored a copy of this code in case I ended up messing it up at a later stage. My next task was to draw one of the pieces above the box(lines). I went about trying to do this and did something that caused nothing to be rendered on the screen (not the lines or the piece). Luckily I had made a copy of my previously working code and loaded this up again only to find out that nothing appeared on the screen when I ran the program even though I had changed no code from when it worked previously. I am getting the following D3D error when I run the program now Direct3D9: (ERROR) :DrawPrimitive failed. Direct3D9: (ERROR) :Stream 0 does not have required number of vertices I have looked this error up on google and found a few other postings on forums where a similar thing has happened with other people(code that used to work doesn't anymore). My piece is made up of 78 vertices/26 polygons. I have a simple application that can draw the piece on it's own with no problem as well as move and rotate it. Is this a hardware problem? Would reinstalling the graphics drivers help? If anyone can help me with this I will be eternally grateful. Thanks Neil
  2. neilkenny

    Algorithm for solving 3d puzzle

    There are too many combinations for a depth first search. I'll give the genetic algorithm a try. Thanks for the help.
  3. I am currently trying to write a program to make a 3d version of a puzzle I own. The idea of the puzzle is to fit blocks of different shapes and sizes into a cube without having any parts sticking out at the end. There are thirteen different pieces that can each be rotated in twenty-four directions. Each piece is made up of a number of cube units. The size of the box is 4 units * 4 units * 4 units. Here are pictures of the pieces in the puzzle Each piece can be rotated on the X Y or Z axis by 90 degrees at a time. 7 of the pieces have 24 different orientations, 5 of the pieces have 12 different orientations(because they are the same shape when turned upside down) and piece12 (the last red piece show on the web page above) has only 3 different orientations. I have also figured out how many different positions each piece can be placed in in the box. (piece0:432, piece1:216, piece2:432, piece3:384, piece4:192, piece5:432, piece6:216, piece7:324, piece8:216, piece9:432, piece10:432, piece11:576, piece12:48) I hope to write different algorithms to try to solve the puzzle and compare how each of them works. I am fairly new to this type of problem however and would like a few suggestions of what type of algorithms would be most useful. I have read up on genetic algorithms but find it hard to understand how I could implement this for this type of problem. This is my final year project and I have been encouraged to seek help from experts and people who are knowledgeable in this area. Any suggestions would be greatly appreciated.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!