UnderwareDESIGN

PlayBASIC => Show Case => Topic started by: empty on October 05, 2010, 12:59:37 PM

Title: Developing a Game in PB for Intel's AppUp
Post by: empty on October 05, 2010, 12:59:37 PM
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.
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: monkeybot on October 05, 2010, 02:32:00 PM
bloody hell Empty,where have you been?

Gonna finish the IDE then??

;-)
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: BlinkOk on October 05, 2010, 03:04:53 PM
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)
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: empty on October 05, 2010, 03:28:13 PM
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 ;)
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: empty on October 06, 2010, 12:12:06 PM
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.
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: monkeybot on October 06, 2010, 01:39:50 PM
the source inspector crashes the IDE,very annoying.
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: empty on October 07, 2010, 09:37:14 AM
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)




Title: Re: Developing a Game in PB for Intel's AppUp
Post by: monkeybot on October 07, 2010, 01:43:15 PM
here you go

[plink]link (http://www.underwaredesign.com/forums/index.php?topic=756.msg23097#msg23097)[/plink]

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

Thanks
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: empty on October 10, 2010, 02:39:57 PM
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.
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: empty on October 13, 2010, 02:11:55 PM
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.
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: kevin on October 14, 2010, 07:17:05 AM

So when will we see this ?  :)
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: empty on October 14, 2010, 11:29:23 AM
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 :)
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: kevin on October 14, 2010, 11:44:32 AM

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 :)
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: empty on October 14, 2010, 11:53:53 AM
True, aesthetically they are quite similar.
Still, your shots are more colourful :D
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: empty on October 24, 2010, 04:45:57 PM
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.
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: kevin on October 25, 2010, 02:42:07 PM
 Even with temporary art it pretty good.  Have you got NetBook to test on ?
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: empty on October 25, 2010, 02:51:08 PM
yes, sort of.
I bought one couple of months ago but it's under repair already :)
I sent it in right before I started this project and was told to get it back at quote "calendar week 43" which is this week...
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: kevin on October 25, 2010, 02:52:06 PM
 what was wrong with it ?  (a battery thing ?)
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: empty on October 25, 2010, 03:04:42 PM
it used to freeze or reboot sporadically.
Memory module was ok, so I sent it in... warranty and all that.
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: BlinkOk on October 25, 2010, 03:25:45 PM
looking very nice empty dude.
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: kevin on October 25, 2010, 03:28:29 PM
Quote from: empty on October 25, 2010, 03:04:42 PM
it used to freeze or reboot sporadically.
Memory module was ok, so I sent it in... warranty and all that.

ouch, one the (drum) kids one's died, so they just end up sending a new one.

Title: Re: Developing a Game in PB for Intel's AppUp
Post by: empty on October 25, 2010, 03:41:46 PM
Quote
looking very nice empty dude.
Thanks! :)


Quoteouch, one the (drum) kids one's died, so they just end up sending a new one.
Yeah I don't know why it takes so long, but I got it very cheap so I don't complain ;)
Title: Re: Developing a Game in PB for Intel's AppUp
Post by: empty on November 11, 2010, 03:52:02 PM
Not a lot news on this, cause besides doing a few things on the IDE front, I've been an graphics mode lately which is surpringly fun albeit not that effecient due to my lack of expierence in this field :)
So it takes time to get things to look the way I had planned them but it's getting there.
I did update the design doc a bit though, scrapped the theme-editor idea for now, and cleaned up the code a bit.
An unexpected commission flew in a few days ago, so time is a little restricted. That's why I aim for a release at mid december now.