Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Mágica Gems source code

edited November 2011 in Code Sharing Posts: 437

Here it is

https://gist.github.com/1353548

Next: genetic algorithm for generate the new Gems...

«1

Comments

  • 2096

  • Posts: 437

    what?

  • SimeonSimeon Admin Mod
    Posts: 4,366

    Yeah, mysterious.

    Thanks for sharing @juaxix! I will be checking it out shortly. I really wish Apple would approve the next update already as it makes code sharing so simple.

  • Posts: 437

    I hope so :)

  • Posts: 437

    I forgot to mention that this is not following the common rules of a typical bejeweled game, the gems will clear when there are 3+ together, left-up-right-down.
    For example:

    [3][1][2]
    [1][1][2]
    [3][1][4]
    

    All the 1's are cleared ,and this is the result, after cleaning:

    [_][_][2]
    [3][_][2]
    [3][_][4]
    

    I choose not to animate the falling, in stead of that i set the cell to exploding and then regenerate with another gem, so, the next few frames appear all together: score of each group cleaned, explode sprites and falling animation, that's the magic of this game mechanic :)

  • Posts: 622

    added to wiki https://bitbucket.org/TwoLivesLeft/codea/wiki/UserContrib

    Btw that was my score the first time I played it. This forum could really stand a "like" button.

  • Posts: 437

    hahaa, ahh!, ok!

  • Posts: 437

    Here is the video...

    I have added two game modes, new gestures to control the game, and some features like check if the game has a solution, bonus, score multiplier, tweeners, etc.
    Hope you like it :)

  • Posts: 437

    It is online.

    People just ask for a promo code and i'll post it via PM ;)

  • Posts: 563

    That is very impressive!

  • Posts: 266

    awesome can i have a promo code?

  • Posts: 115

    Very nice indeed. Congrats and good luck.

  • Posts: 437

    Thanks @Reefwing and @Keebo
    @veeeralp : i have just sent the promo code ;)

  • Posts: 130

    Looks pretty nice! :)

    There are promo codes for me? ( I'm kidding, only one code :-D )

  • edited July 2012 Posts: 21

    Woo, there're three games I know now which developed with Codea:
    Cargo-Bot, Magica Gems and Space Puzzle para.
    I'm surely should spend some time to learn Lua and Codea.

  • Posts: 437

    Hey @Georgian check out your PM's ;)

    ...

    @Zenz : I made Space Puzzle too xD and i'm getting ready more games, i dont know why, Codea is perfect for me to do these kind of prototypes that can turn in commercial games :)
    thanks @Simeon

  • Posts: 25

    Congratulations @juaxix. As a developper (.net :/ ), i can only say one thing : RESPECT ;-)
    Nice work. I'm really impressed by the work that can be done with Codea.

  • Posts: 437

    Thank you @yelnats ,do you have a website where we can see your work?

  • Posts: 57

    @juaxix: very nice game. I wonder how do you do the graphics? Which program do you use? I mean the background, the stars, the sparkling effects, etc. I'm working on a game and it looks flat and boring... well it is still a prototype, but my question is how do you take a game from the prototype looking to the professional look and feel that Cargo Bot and Magica Gems have? What other tools do I need apart from Codea?

    Is there any tutorial or example on how to do this phase?

  • Posts: 437

    Hey @LightDye ,i use Photoshop, Gimp, and code shared here in these forums by others users like me...
    it is said that you first have to create the game you want to play, when you get the finished prototype, just remove all the unfun from it xD ,...well, that's the theory, this requires a lot of game-making and a good team...
    that's what I can say :)

  • Posts: 226

    Hola @juaxix! Promo code, please? [-O<

  • Posts: 437

    Hey @quezadav ,PM with promo code sent ;-)

  • edited July 2012 Posts: 226

    Thanks a lot! I wish you the best of luck! (rising my Codea-Champagne cup).
    Victor ~O)

  • Posts: 57

    Thanks @juaxix for replying. BTW, can I get a promo code, please?

  • Posts: 437

    Lol @quezadav XD ...
    sure, @LightDye ,check your PM's :)

  • Posts: 121

    great work @juaxix! how much time required to you to complete the game using codea? if possible I'd like to have a promo code too.

  • edited July 2012 Posts: 437

    The first prototype was made in about 2 days, you can see the videos...then i have changed a little bit the game logic and aesthetics during one or two weeks in my spare time,...some time later i got the 0.0.2,

    quite better but not fun enought for me, so i decided spend more time investigating new ways of improvement, i added the sounds, new graphics and change the code to make it faster,until the version 0.1.3:

    and then i started with the production phase, this took me 3 months aprox, and we are in the version 1.0.0, the final prototype to sell:

    but if you buy the game you will realize there is HD music and effects (mp3) and cool graphics made with design tool as photoshop... i'm preparing a tutorial in spanish for this game also...

    Anyway, you have your code in your inbox @shrike ,thanks for commenting

    People, there are still some codes for you to enjoy ;-)

  • Posts: 688

    Looks great. Well done on getting it to store! If you have a spare promo code then I'd appreciate one.

  • Posts: 226

    Hi @juaxix, do you mean a tutorial right from scratch up to the AppStore? That would be great!
    Saludos, Victor ~O)

  • Posts: 57

    Thanks @juaxix for the promo code. Also, I'm looking forward to read your tutorial en Español.

  • Posts: 25

    Hi @juaxix, if you still have promotion code, i'm interested. :-D

  • Posts: 437

    Yes @quezadav, part of the process is already here in this forum, but i think maybe people need more explanations to make work a full project with the new Codea Runtime Library, there is some things like, you may have to remove the twitter framework if you want to run in iOS 4.0- or less, code tricks with Objective C, work with the orientation, etc.

    And @yelnats ,welcome to Codea, the code is already sent ,enjoy :)

  • Posts: 226

    =D> Great! In the mean time, some of us could more-or-less translate parts of the tutorial from Spanish to English for all the audience here in the forum, if you like. ~O)

  • Posts: 437

    Haha, ok, now i'm on vacation :)

    Meanwhile, enjoy the final version:

  • Posts: 437

    You have your code ,big @West :)

  • Posts: 688

    Thanks!

  • Posts: 25

    @juaxix. Thanks a lot!

  • Posts: 266

    @juaxix how did you add downloaded music to your app and game center? Please reply. I wanna know how because I wanna use incompetech too

  • Posts: 437

    Hey @veeralp ,check this post first:

    http://twolivesleft.com/Codea/Talk/discussion/1197/objective-c-classes-for-music-play-and-interaction-with-the-game-center

    you have to encode music files as mp3, then create a folder group in XCode and call it "music", add there the mp3 files...you may want to change the functions in the classes to access to your filenames correctly.

    Game Center is done also with those classes, from Lua code (you can debug app in Codea checking if external-function exists with a simple if), call the aGameCenter_start() , then you can open the highscore boards, or submit and fetch scores, achievements,etc.

    Have a nice time coding :)

  • Posts: 266

    hey, do you recommend using this game center method for high scores or @Vega's version with the Google App Engine. Thanks for the help. I'll let you know if I have any further questions

  • Posts: 437

    Actually the @Vega's method is not using Apple Game Center...

  • Posts: 266

    I asked a question on the discussion you mentioned. Also, is there code for the release version of Magica gems. I'm interested in seeing how you wrote your code for gamecenter

  • Posts: 437

    I answered you @veeeralp , the first time is a little bit hard, but you can do it ;-)

  • Posts: 2,160

    Missed this one first time round ... looks good, any promotion codes left?

  • Posts: 437

    Sure @Andrew_Stacey ,already in your inbox :)

  • Posts: 2,160

    Thanks! Gave it a quick spin last night - highly addictive.

    I think I said this on your Space Puzzle Game: I miss instructions!

  • Posts: 2,160

    My scores seem to be getting muddled up. My first '1 minute' score is permanently lodged in the scoreboard and any further scores go on the 'Zen' scoreboard.

  • Posts: 437

    There is a bug with the params in the objc call from lua, thanks, im working in the fix

  • Posts: 2,160

    In the 'Zen' mode (haven't tested the other) then I can reduce my score to zero by dragging my finger around the non-grid area.

  • edited August 2012 Posts: 437

    Thank you so much for your help @Andrew_Stacey ,you are a great beta tester :) ,worth the promo-code hahaha
    This bug is also fixed right now, on my way to submit version 1.0.1, maybe it would be nice to follow the @Simeon advice and use the Test Flight App...
    Your idea of the instructions is good also but i need a designer right now :]
    When you hit the yinyang button, there is appearing a heart over a gem, there is a solution near that gem ;)

Sign In or Register to comment.