how to create a chess board

Problems with Canvas, OpenGL, etc...

how to create a chess board

Postby freedom_life93 » Wed Sep 28, 2011 11:10 am

hi everybody! I want to create a chess game in android , but I don't know how to create a chess board and pieces,i don't know where should I start .plz help me ! thanks u so much :)
freedom_life93
Freshman
Freshman
 
Posts: 5
Joined: Wed Sep 28, 2011 10:55 am

Top

Re: how to create a chess board

Postby redbulletnl » Wed Sep 28, 2011 2:56 pm

for a tablet or phone?
redbulletnl
Experienced Developer
Experienced Developer
 
Posts: 84
Joined: Wed Sep 14, 2011 7:44 am

Re: how to create a chess board

Postby freedom_life93 » Wed Sep 28, 2011 4:49 pm

redbulletnl wrote:for a tablet or phone?

for phone :), i think i can draw a chess broad but i don't know how to create pieces and move them, and then how can i catch event move pieces to dispose that event , can you give me some ebook which talk about that.tks you :)
Last edited by freedom_life93 on Thu Sep 29, 2011 2:41 am, edited 1 time in total.
freedom_life93
Freshman
Freshman
 
Posts: 5
Joined: Wed Sep 28, 2011 10:55 am

Re: how to create a chess board

Postby jonbonazza » Thu Sep 29, 2011 12:19 am

What you are essentially asking is how to write a chess game. This is not really a daunting task, but it's one of those things that if you don't really know where to begin, then you aren't quite ready for the challenge.

Furthermore, you won't find an ebook on how to do this because it is such a specific question. What you need to do is learn how to program in Java, learn your way around the Android API, and then learn how to use OpenGL (or the Android Graphics API).
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Re: how to create a chess board

Postby MichaelEGR » Thu Sep 29, 2011 12:43 am

Creating a chess game without a strong knowledge of coding will be slightly daunting. As jonbonazza mentions having a good handle on Java and the Android API is handy. You don't necessarily need to start with the graphics side of things though as there is a good deal of back end engine / algorithm aspects to explore. A good resource to check out which I haven't looked into deeply is this wiki:
http://chessprogramming.wikispaces.com/

I certainly think an appropriate direction is to work on a back end that understands the rules of playing chess and contains the algorithms necessary to run a game. Creating a basic text display and any debugging and logging tools that you can test on the desktop to test the back end is an appropriate step to take before worrying about how to get things running on Android or displaying the board & pieces for your game in a graphically pleasing way.

It's a good thing to have a end goal that you are passionate about coding, but consider there are many steps involved and it might take a little time to develop, so don't get frustrated or try to jump ahead to a graphics display before implementing the game mechanics. Searching for open source chess programs written in Java may be handy, but in a quick search I didn't find anything I'd recommend offhand.
Founder & Principal Architect; EGR Software LLC
http://www.typhonrt.org
http://www.egrsoftware.com
User avatar
MichaelEGR
Senior Developer
Senior Developer
 
Posts: 147
Joined: Thu Jan 21, 2010 5:30 am
Location: San Francisco, CA

Re: how to create a chess board

Postby millerni456 » Wed Oct 05, 2011 2:12 am

It may be helpful in your case to acquire some sort of modeling engine so you can create the chess pieces. Also the chessboard is as simple as pasting a checkerboard texture onto a flat square.

If you need help with this take a look at learning OpenGL. There are plenty of sources regarding this, and I recommend swiftless tutorials online. This really helped me learn the basics. After that you'll want to know how Android can harness OpenGL. I've found some sources online, but there are several books for Android that explain this.

To be honest I'm not sure how much you know, since the post wasn't too descriptive, but you'll want to learn how to point to arrays containing vertex/index/texture coordinate data so that you can draw your models. Again, I reccomend a modeler for the chess pieces. But if you don't want to invest in one, or can't find a good free one. Simple geometry could be used to replace it... Or better yet you can create Images that always face the screen. All you need for that is Paint.NET or photoshop.

So you should start by learning :D!
Don't fret if OpenGL is hard to understand at first. Keep persevering, and you'll find yourself very far down the learning road.
millerni456
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed Oct 05, 2011 12:39 am

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 6 guests