News:

Function Finder  Find all the functions within source code files

Main Menu

Developing a Game in PB for Intel's AppUp

Started by empty, October 05, 2010, 12:59:37 PM

Previous topic - Next topic

empty

Intel pushes a lot of money and efforts in their AppUp store, and while the group and age of netbook users seems to vary a lot from country to country and region to region, this might be a good opportunity for indy developers to get games easily presented and distributed to a relatively broad audience. Although I don't think that it will come close to the success of Apple's AppStore. But still :).

PlayBasic is very well suited for such a task and so this is sort of an "experiment" to submit a presentable game to the AppUp center and I will "abuse" these forums as a kind of dev blog for this. While I can't work full time on this project, the goal is to finish it within 4 to 6 weeks.

The game will be a 5-in-a-row incarnation, because I had written a basic AI algorithm for that many years ago, so I'm not totally starting from the scratch. However it the game will include several rules (and there are plenty of them), as well as several themes (ie. different boards)

First considerations
Intel provides an SDK for their AppUp store that is statically linked  to a C or C++ app. Of course I can't use that for my PlayBasic
game, thus I need to wrap the functions in a DLL. But a word of warning! The functions that the SDK provides are there to make sure that your app is allowed to run on a certain netbook. In other words, it is the copy protection of your application or game. If you simply wrap the library, anybody can exchange that DLL with one that always authenticates the application. So it will run happily on any computer, AppUp installed or not. Even if your app is freeware you shouldn't do it that way. I'm not sure if that would pass Intel's validation process anyway. So in order to get things right we need to protect the DLL from any kind of manipulation.


What I've done so far:
Last week I wrapped the AppUp SDK. I wrote a PlayBasic library to access the DLL and an MD5 library that will make sure that the DLL can't be manipulated.
Today I wrote the first revision of the design document.

Next step is to disentangle the old AI, improve it and make it aware of the new rules. The following rules are planned (from the design doc):

Quote
Rules
The player can choose between the following rules:

Standard Gomoku:
Black places the first stone and requires a row of exactly five stones to win and get one point (rows of six or more, called overlines, do not count), else White gets one point. White gains two points for a row of five stones (overlines are allowed).

Gomoku 3 & 4
Black places the first stone. Moves that simultaneously form two open rows of three stones and two open rows of four stones (rows not blocked by an opponent's stone at either end) are prohibited for both players. Black wins one point for a row of exactly five stones. White requires a row of five or more stones to gain one point.

Pro Gomoku
Similar to Standard Gomoku but has the following sequence of opening moves:
1.Black places the first stone in the centre of the board
2.White's first move can be anywhere
3.Black's second move must be outside the five-by-five area in the center of the game board.
All subsequent moves can be anywhere on the board
Both players need needs a row of exactly five stones to win the match an receive one point.

Renju
with the rules of  3 & 4, and overlines applied to black only.
Renju has the following sequence of opening moves:
1.The first player places 2 black stones and 1 white stone on the board.
2.The second player now chooses whether to play black or white.
3.White then places one more stone on the board.
4.Black places 2 stones on the board.
5.White removes one of the two black stones from the previous move.
6.White places a white stone.
Black needs a row of exactly five stones to win the match an receive one point. White requires a row of five or more stones to gain one point.

Wu
with the rules of  3 & 4, and overlines applied to black only. Additionally captures are possible.
Captures are obtained by surrounding pairs of an opponents' stones vertically, horizontally, or diagonally with stones of their own placed at the ends of the pair. A player cannot "cause" the capture of his or her own stones by moving into a surrounded position. A player wins by either getting 5 (or more) of their stones in a row or by capturing 5 (or more) pairs of their opponent's stones.
Opening moves:
1.Black places a stone on the centre of a board
2.White can place a stone anywhere on the board
3.Black places a stone anywhere outside a five to five boundary from the the centre
4.All subsequent stones can be places on any free intersection
Black needs a row of exactly five stones to win the match an receive one point. White requires a row of five or more stones to gain one point. Each player can also win one point by capturing five pairs of stones.

Action
Black places the first stone and requires a row of exactly five stones to win and get one point (rows of six or more, called overlines, do not count), else White gets one point. White gains two points for a row of five stones (overlines are allowed). Additionally there's a chance for each player to perform a random "special" action. These actions include:
1.remove an opponent stone
2.place an additional stone (unless this leads to a row of five)
3.place a "blocking stone"1
4.place a "joker stone"2 (unless this leads to a row of five for any player)

1 Blocking stones block an intersection or field. Both players cannot place a stone on such intersection or field for the rest of the match.
2 Joker stones are friendly stones for both players.

As soon as there are news to report I'll write them down here.

monkeybot

bloody hell Empty,where have you been?

Gonna finish the IDE then??

;-)

BlinkOk

hey empty that sounds cool. if you would like any help with the graphics i would be happy to help (although looking at the game board it doesn't seem to require that much)

empty

Quotebloody hell Empty,where have you been?

Gonna finish the IDE then??

;-)
Developing apps (and add ons for other apps) for digital surveillance systems
And what do you mean by "finish"? ;)


Quote
hey empty that sounds cool. if you would like any help with the graphics i would be happy to help (although looking at the game board it doesn't seem to require that much)
Thanks for the offer. :)
It's true, it's not that graphics heavy (another reason I chose this project), but different themes means different board styles. I have a few in mind, some of which I'm able to produce on my own, but I have a feeling that I might come back to your offer ;)

empty

Today I worked on the AI. It has slightly improved and usually beats the old version as well as most of the free and online games. Although it's much stronger on the defensive side and lacks a little aggressiveness.

While thinking about the most effective way to implement the rules, I thought of a slightly different approach to the whole AI, but I'm not sure how much impact on the performance this will have.
That's something that I'll hopefully be able to test tomorrow, as I won't have much time working on this Friday and Saturday.

monkeybot

the source inspector crashes the IDE,very annoying.

empty

The new AI approach turned out to be a successful adventure. It beats the previous version by far and is aware of most of the traps (well all I could think of). Performance is a bit slower but still acceptable.
The only problem with it is to achieve balanced difficulty levels. So after cleaning the source up, that's the next thing to do. If all goes well I can start implementing the rules next week.


Quote from: monkeybot on October 06, 2010, 01:39:50 PM
the source inspector crashes the IDE,very annoying.
Hm.. there's a post in the bug report section reporting the same. It doesn't do that here. It stalls sometimes for a second or two, but doesn't crash. Could you post more details (in bug reports ;)), like OS version, IDE version, IDE prefs (ie. Fine scroll, auto case, auto indent)





monkeybot

#7
here you go

link (login required)

It would be great if you could get to the bottom of this.

Thanks

empty

I tried a few ways to implement different difficulty levels and it appears that my worries about this were ungrounded. They still need to be balanced out but that can still wait till the game is in beta phase. I won't be in town tomorrow so the next session will start on tuesday.

I achieved everything I had planned for this week, and should be able to finish the AI part (incl. the rules) the coming week. After that, all the theme stuff needs to be finalised (sizes, layouts, configurations) and probably a simple theme viewer/editor for artists.

empty

The AI is now aware of all the rules except for "Action".
Out of town for the most part of tomorrow and friday but should still be able to complete the AI this week.

kevin


empty

there is not a lot to see except for red and blue circles in black and white boxes :)
But eye candy comes next. I won't be able to spend that much time on this next week, but it should be enough for a screen shot or two :)

kevin


Quotethere is not a lot to see except for red and blue circles in black and white boxes

That'd fit in nicely with the V1.64M WIP thread :)

empty

True, aesthetically they are quite similar.
Still, your shots are more colourful :D

empty

Not much progress this week as several other things got in the way. So there was only time for a few tweaks here and there and a first shot, even though the theme is just for testing purposes.
Next week will be a busy week as well but I should be able to get more things done.