You have to decide if you want to go for a 3D view. Learning to use OpenGL can take a couple of months if you are experienced with C. The purpose is to minimize the need for changes propagating too far in the source code. To keep the model independent on the display, sometimes called Model-View-Controller. This is a basic technique of programming. When that works, you can replace the print functions with an interface to OpenGL, or whatever library you find. You can start with making a chess game that simply prints out the positions on the dos prompt using character representations for pieces. That way, you can easily change the appearance if you want to make a more advanced solution without having to change anything in the main game state. The data structures you use to represent current game state should not depend on how it is drawn using OpenGL.
#THE GAME CREATORS SELECTING OPENGL CODE#
Where and how do I tie OpenGL into this? What classes should have openGL code in them? Should I make seperate classes for openGL?ĭo I still make a 2d array in memory to store the position of the pieces? Or is eveyrthing done on screen? For example, would I say, " rook location is " or would I tell openGL "When I click on this part of the screen, select the rook", or both?Īre there classes I should add? What other functions will I need? How do i get started? All of the pieces will inherit methods from Piece and be able to override those methods. move() // moves the piece in a way dependent upon what piece getIsSelected() //returns a boolean, true if selected, fale if unselected GetPosition() //returns the current position of a piece GetValue() //returns an int value of the peice(for scoring) isValid(move) //checks if the move is valid At this point, I'm not sure where to start. I'm not looking for somebody to tell me all of the answers, I would like to figure the code out on my own, but pointing me to the right concepts is what I really need. So, I'm not sure if i will get much help on here, but any would be much appreciated. (3) Give me a head start into Game AI before I take the AI class next semester (2) Help solidify OOP concepts I've been learning. This would do three things for me: (1) Help to make me more fluent in C++. I chose a chess game, rendered with OpenGL. We were assigned a final project, and I want to start working on that project now so that I can refine it until it is perfect by the end of the semester. So, I'm a student at UHV and I'm taking a class called Computer Graphics Applications, as is required for my degree in Computer Science - Digital Gaming and Simulation.