I need help for a game which im creating for my portfolio

166 views
Skip to first unread message

ylk...@gmail.com

unread,
Apr 23, 2014, 9:36:20 AM4/23/14
to mitappinv...@googlegroups.com
I want to make a chesslike,2d, turnbased, multiplayer game for 2players. I choose to use app inventor for android. The problem is i dont have any idea how to program the board. It must be 10 on 10 field and the sprites must move like chess one at a time. I use pixelart for diseign and no animations (for the prototype). There are flank attaks which are trigert by the way the sprite is looking. For each unit there are 4 postions (4 different pictures). The problem is that i have no idea how to creat the field and how to determine the moves. Do i have to program each square and to load a different screen to chose which position the player likes?

SteveJG

unread,
Apr 23, 2014, 10:13:16 AM4/23/14
to
The following discussion shows how to make a grid on a canvas.  It might be part of what you need:  https://groups.google.com/forum/#!searchin/mitappinventortest/buttons/mitappinventortest/c7xYUTKFG_Q/d6R62Pj8VG4J     Look for the aia file  gridCanvas.aia   and the subsequent discussion simplifying it.   This is a 6 x 6 field, but can easily be 10 x 10 by providing that grid.... (hint, search Internet for  10 x 10 grid png or jpeg    https://www.google.com/search?q=10+x+10+grid+png+or+jpeg&oq=10+x+10+grid+png+or+jpeg&aqs=chrome..69i57.1400j0j7&sourceid=chrome&es_sm=93&ie=UTF-8#q=10+x+10+grid+)  and put that on the canvas.


You do not have to use different screens.    As far as 'programming' each square, you can use the Blocks to determine which grid square you want to manipulate ...look at the simplified 
code Scott provided in the above link.   You can use parts of that and some logic blocks to keep track of where your important sprites are at any moment.

This is not a solution.  These are some building blocks you might consider in developing your game.  You might also browse this link where others asked questions about building AI2 games for ideas:   https://groups.google.com/forum/#!searchin/mitappinventortest/game          Here is possibly something you could use with a checkerboard https://groups.google.com/forum/#!searchin/app-inventor-developers-library/snap$20to$20grid/app-inventor-developers-library/ZvtbMzfsQmE/ZmziagTQvlkJ  

Perhaps someone else will provide some additional guidance or ideas. Return here often in the next few days to see more possible suggestions.

Good luck; your game seems interesting.

Regards,
Steve

Reply all
Reply to author
Forward
0 new messages