Howdy, Stranger!

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

Platform Game Draft

edited November 2013 in Examples Posts: 10

Hello, I'm new in Codea and was playing for 2-3 weeks. I decided to create a platform game draft. As I don't have a Mac, Codea is just an experimental area to me for now but seems really cool. I used Platformer arts for the beginning and all the objects are randomly placed. Here is the first video:
https://www.dropbox.com/s/fi7g5xxhbm8gaq9/2013-11-09 22.44.20.mp4
And here is the codes:
https://gist.github.com/barisdokudur/7397658
I know it's a classical game structure but it's just a beginning. I would really appreciate any suggestion if I could do anything in a better or easier way. (Sorry for my English..)

Tagged:

Comments

  • Posts: 577

    @Baris I just have to say... Wow, hats impressive for less then a months work of learning, was this self taught or tutorials?

  • Posts: 355

    Cool .

  • Posts: 10

    Thanks guys..
    @Prynok
    I'm new in Codea but not in programming. (not a professional developper, but self studied based on c# in the past) :) I reviewed some of the tutorials and examples released in the forum, tried to learn the structure by preparing basic things first..

  • Posts: 257

    thanks for the share but it miss the pictures ( spikes, coinGold...)

  • Posts: 10

    @hpsoft
    I've downloaded art set from the following site and it includes much more pictures than already implemented into Codea.
    http://kenney.nl/post/platformer-art-assets-deluxe
    Is there any way to link my Dropbox pictures to monitor in another Ipad?

  • edited November 2013 Posts: 355

    put that game in CC. if you want

  • Posts: 2,043

    @hpsoft, spikes and coin are both included in Codea. Just change the readImage to use the ones from the built in PlatformerArt sprite pack.

  • Posts: 2,820

    Very nice. Just a quick suggestion- It looks like you're using physics. When the player hits the floor, it bounces. You might try setting the restitution for both objects to 0.
    Thanks!

  • edited November 2013 Posts: 10

    @Luismi
    I put the game into CC, if I didn't do anything wrong :) Thanks for your suggestion.

    Until find a smart solution for the pictures, I add my Dropbox links:

    Edit: pictures will be downloaded automatically with the last update.

    @Zoyt

    Yes, I use physics for ground, box and hero. I don't remember well why I set restitution for hero and box as 0.3 although having 0 for ground :) but anyway I will fix it. Thanks

    Edit: Gold coin image in Codea does not work well, I realized that dimensions are different than I used. that's why I updated the link.

  • IgnatzIgnatz Mod
    Posts: 5,396

    @baris - you can get Codea to download the images the first time. I did it this way, here

    http://coolcodea.wordpress.com/2013/05/23/62-3d-downloading-images-on-demand/

    You do have to be careful that when they download, you just get the image and not a whole HTML webpage page, which is a problem with some cloud services.

  • @baris man..... This is awsome! You only needed to learn 3 weeks to create this! I almost have codea for half a year and i cant even make something like that.
    You have talent.

  • Posts: 10

    @Ignatz thank you so much.. This is what I was looking for during last few hours. :D
    I found some topics related to http.request but in my trials, problem was..

    First, we’ll take all the code out of setup and put it in a function called setup2, because we don’t want it to run until the images are loaded. So setup will contain just one line of code
    

    It's too late for today but it will be first thing to do after return back to home tomorrow.. :)>-

    @Jessevanderheide thanks for your kind words :) but I think mine is not a talent issue. If you have some background in programming (for loop, if, tables etc) and some knowledge on physics, maths, it's much more easy than a complete beginner. But anyway, once you get the basics, everything will be running.. I've also thousands things to learn. :)

  • Posts: 355

    @baris. you could use the method http.request () to load pictures from your program without having to dear all directions of your photos. :)

  • Posts: 355

    Http.request(URL your image , loadImage)

  • IgnatzIgnatz Mod
    Posts: 5,396

    @Luismi - there can be some problems with that

    1. depending on where you have stored your image, you may get a whole web page instead of just the image (eg Dropbox)

    2. http.request is asynchronous, which means your code doesn't wait for the image to be downloaded, but keeps going. When it tries to draw the image, crash! Your code needs to be made to wait for the download

    That's why I posted my link above, because it deals with those problems :D

  • edited November 2013 Posts: 355

    if the stored here: photobucket.com @ignatz

    is true that I resorted to your link while. but I just do http.request's call on images of my project Touchplay, and loaded without any problem ;)

  • edited November 2013 Posts: 10

    @Ignatz @Luismi, thank you both :) I think the codes in the link that Ignatz provided is working really well. Just a quick remark; in ImageDownloaded function, there is a syntax error on line 23 (most probabily copy+paste error in html) > should be replaced by >

    Anyway, I finally update the codes and all pictures will be automatically downloaded from photobucket from now on. :) I also released new version alpha1.1 in CC.

  • Posts: 51

    You did that in 2-3 weeks??

    Wow.. I've had codea over 2 months and can barely get a damn sprite to move. :(

    Impressive

  • Posts: 666

    Nice job.

  • Posts: 10

    @Mene @aciolino
    Thank you..

  • Posts: 1,976

    Wow. That's awesome. And 2-3 weeks?

  • Posts: 10

    Some updates in the codes related to gold movement direction in magnet zone
    Released CC alpha 1.2

Sign In or Register to comment.