Jump to content




BBCards

game api

15 replies to this topic

#1 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,096 posts
  • LocationTasmania (AU)

Posted 04 May 2014 - 03:03 PM

So I've been working on this off and on for quite some time now. Mostly off - I started before the CC 1.6 betas appeared.

Anyway, once things got out of beta (by which I mean we got to 1.63) it struck me that the new window API would be fun to shoe-horn into it and things started moving along. Those references have since been removed, but they were interesting to play with.

So what we have here is part card game and part game-API. The point is to make it easy for other coders to produce card games of their own without having to worry too much about all the underlying mechanics involved, other than those specific to the game they have in mind - well that's the plan, anyway. The API lets you define cells you can place cards in, deal them out, move them around and so on. I guess you could call it a super-charged button API.

Truth of the matter is that it's still somewhat unfinished, so both games and API are (somewhat) subject to change - however, it's still quite workable, so here it is together with Solitaire and FreeCell:

Screenshots

Thanks to Zambonie for the beach image, and to Requiem for some of the others. :)/>

I'm not aware of any bugs at present, so please let me know if you can get it to mess up in some way. At this time I'm not considering lack of polish to be a "bug", but please speak up if you feel something is amiss anyways. ;)/> You'll want a 4x3 colour monitor attached in order to play.

BBCards (games):
pastebin get dhWZ7kJU bbcards

Card API (required by games):
pastebin get A8kCA8Zc card

Card API documentation

Version History

Edited by Bomb Bloke, 10 February 2016 - 11:13 PM.


#2 viluon

  • Members
  • 183 posts
  • LocationCzech Republic

Posted 04 May 2014 - 03:06 PM

Seems nice :) (haven't tested yet)

#3 Zambonie

  • Members
  • 477 posts
  • LocationSpring Hill, Fl

Posted 04 May 2014 - 03:57 PM

Seems Nice, I might try it in a while ;)

#4 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 06 May 2014 - 03:02 AM

Looks cool! Definitely not what I guessed when you uploaded your request thread in the Media section.

#5 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 06 May 2014 - 06:38 AM

View Postawsmazinggenius, on 06 May 2014 - 03:02 AM, said:

Looks cool! Definitely not what I guessed when you uploaded your request thread in the Media section.

Oh! Right, that explains alot.

Anyway, this looks really, really nice.

Any plans to add multiplayer games? I play cards at lunch when I'm not busy with other things and there's just so many things you can do with them.

#6 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,096 posts
  • LocationTasmania (AU)

Posted 06 May 2014 - 06:45 AM

Yes, in fact networking would be the only practical way to handle the likes of Poker, or anything where you've got a hand you're supposed to see while hiding it from other players.

#7 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,449 posts

Posted 06 May 2014 - 07:12 AM

For such games, the Pocket Computers might be worth looking in to.

#8 sEi

  • Members
  • 41 posts

Posted 30 May 2014 - 04:28 PM

Very nice game

Beautiful code. Helps me a lot getting into CC and LUA.

Thank you - Have a nice day

/sEi

#9 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,096 posts
  • LocationTasmania (AU)

Posted 31 May 2014 - 07:03 AM

Glad you like it - though I sorta get the impression you're the first to try it! :lol: :(

I'd gone with the new 1.6 functions (eg the window API) on the basis that someone might find it handy to have an example of them in use, but they kinda got swallowed up in a sea of other code and I'm inclined to ditch them (that particular API, for eg, made it faster for me to get my code written but slows the execution of my code down compared to what I otherwise would've done). Anyone have any thoughts?

#10 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,096 posts
  • LocationTasmania (AU)

Posted 08 June 2014 - 03:13 PM

Well I guess I won that vote - code's been tweaked to run under older CC versions.

#11 cptdeath58

  • Members
  • 139 posts
  • LocationError 404: Could not find.

Posted 10 June 2014 - 12:57 AM

Nice game. :D

#12 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,096 posts
  • LocationTasmania (AU)

Posted 14 June 2014 - 07:42 AM

Thanks. :)

Just updated with FreeCell:

Spoiler


#13 cptdeath58

  • Members
  • 139 posts
  • LocationError 404: Could not find.

Posted 16 June 2014 - 09:55 PM

Nice Animations dude. :D

#14 TheOutcast5

  • Members
  • 104 posts
  • LocationKonoha - Hidden Leaf Village

Posted 15 March 2015 - 04:25 AM

Next step, Yu-Gi-Oh!

#15 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,096 posts
  • LocationTasmania (AU)

Posted 15 December 2015 - 02:04 PM

CC 1.76 (in beta at the time of writing) offers new font characters which're handy for pixel art; I've updated the script files to take advantage of these:

Spoiler

It should still work fine under older CC builds, albeit without the new imagery.

#16 ExplosiveFerrets

  • Members
  • 51 posts
  • LocationSweden

Posted 04 February 2016 - 09:23 PM

Seems nice, will try it out :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users