![]() ![]() Then we can say the nuetral part here is the 1 under the very first one. We just have to pick a point that is nuetral to the piece For Example: Thanks for the ideas and i will let you know what works. The code's redundant but seems efficent enough to run. Its the same for you, i kindly ask that you bring your standards down to that of a beginner and not that of a high level programmer.ĭuoas and other arrogant programmers need to remember what its like to be confused, and how it feels to struggle when making a programming and having a hard time even just understanding these concepts let alone use them. My point is the same one made about Visual for beginning programmers, the standards are so high a beginning programmer could never execute without some error. Then we can talk about vectors and redundancy. I have to be able to code something efficient and relevant and to understand that i have to go to basics first and build from there. However, i believe you are being arrogant and only thinking about programming not the fact that i'm on the rise of learning. I hope to have your level of expertise on the issue. Your seem like you know what your doing and i dont degrade that by any means. This is just what came to mind and I suppose its where I might start. Don't take any of this as real code or even the best option. This is just a quick idea of how the game might go. Then if the bottom of the piece // reaches the bottom of the board, save the board like this and start a // new piece return 0 You should probably make this // a variable that you increment every time. now add 2 to the y value of the array. But add 1 to the y value of the array for ( int i = 0 i 10) I don't have time to // test it at the moment. I may not have the indexes on the arrays right. initialize the board to blank pieces for ( int i = 0 i 10)īreak // so you don't exceed the bounds of the array I just want to know how thats done (in any fashion) and how to think about this in a way that makes sense because it isnt clicking for me, i need some direction here. Note: Prototypes but not code is appreciated as i'm learning and just giving me the code out right doesnt help me learn. Either i try silly idea 1 or idea 2 but i cant think of how to use an update function to control the pieces. Using an update function in the game, update every second or so. I think even if it was plausible that its just bad programming and it shouldnt be as complex, in short it can be simplified for better results.Ģ. Store pieces and rotations in an array and update the board each button press (for rotation) and line clear (for score).Ĭonclusion: This would be very experimental for me, im new to C++ and i just took 'C++ I' at the college i'm attending and i dont know if i can declare an array (the board) and then place the pieces (another array) inside of one another and then update that effeciently. I have a 10x10 array defined for the game board, initialized to zero at first. I'm working on doing a tetris game and i started to prototype everything but the problem i'm having is with the pieces. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |