Cargo-Bot

Ok, so there:

  • first thing is that once happened that the app slow down in performance significally (the cargo movement was like dropping). It happened after I reopened the app a lot of time, having that alive in background when browsing or doing other. For what I can remember the app was never reset during this period. It could be some memory issue related to the multitask support.

  • second, If you get the right timing and press the ‘step’ button when the level is done (i was playing the solution with double speed), just when the ‘red stars tent’ is showing, tadà! you see a strange glitch, and if you replay the level, the level restart but the tent (the panel?) stay there, covering everithing but the cargo operation area. you can still play, if you remember the position of things! but if you just press play and the level finish again, it crashes.

I have a picture if you need, btw what you see at that point is the classic codea execution environment, on the right the play area completely dark, on the left a ‘dt’ parameter with a value of 1.6257 and the debug console showing:

TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
error:[string “…Panel.lua…”]:18:adding duplicate obj
Pausing playback

If the repro steps are not clear enough just ask!

@shrike, thank you! The step thing will be fixed in an update soon.

I hadn’t noticed the slowness, it’s weird indeed. For me the app does reset often when I switch in/out of it (I also don’t know why) so probably why I haven’t noticed. This may be a codea runtime env issue. @Simeon, what do you think?

The reset of a backgrounded app depends on how iOS handles multitask and on how an app is implemented. the codea runtime library support multitask api, so until there’s free memory the app is keep alive. if there’re too many other open apps and the system go in low memory state some apps are ‘killed’, and so reset when open again.

The loss of performance coud be related to memory issues or at lua vm level or, more probable, at xcode level. btw it happened just once. if I will reproduce the problem I’ll give you maybe better details.

@ruilov it gets unloaded to free up memory for other apps. I think this is mainly due to the space occupied by the music — it probably eats a lot of memory.

I’ll check, but I think it is in the order of about 30 meg, if that helps.

Great game … I played the dang thing in bed until 3am last night! It is the reason I bought Codea this morning. Very nice job…simple unique concept, terribly addictive.

Oh did I mention that Cargo Bot has 4 hidden levels? :slight_smile:

They are levels that didn’t make the cut, either because they were too hard or can be hacked.

To see them, first beat the last level and then press “Next”

@shrike, @Simeon, @Ruilov, the current version uses 22 Mb of memory for the music. I’ve redone the cache allocation to reduce this by half in future updates.

I hope for a level-editor and extra levels too. Ideally, a set of “standard” levels selected by an editorial board (or just the original designer) to avoid too much confusion.

At the same time, perhaps a clean-up to move some of the levels to the right difficulty would be in place.

Cargo Bot is really clean, but it seems that there might also be room for some extra elements, or elements that combine several of the existing ones into one register. And multi-colored boxes perhaps, or other special objects (paint? bombs?).

cjr, thanks for the feedback. What levels do you think are out of order? difficulty is a bit subjective and sometimes hard to evaluate so would be great to hear what you think

Multi colored boxes is a very interesting idea. Will see if I can figure out some levels that depend on it

I’m in the same class as Mark’s son - err… I mean “programming is boring”, it caused me to drop out of uni, but I love this game. I have a graphical suggestion for next version update… instead of the hoist smashing itself to bits in one move, it would give me more thinking time if it slowly disintegrated after repeatedly smashing up against the post. It’s a bit how I feel until I finally get it. :slight_smile:

An interesting article on Cargo-Bot: http://www.fastcodesign.com/1669821/cargo-bot-an-addictive-ipad-game-that-teaches-programming-concepts

finally got around to posting the Cargo-Bot source: https://raw.github.com/gist/2815276/e66ea134d7a2384715c203519bcf106df340f2b7/cargobot1

Thanks @ruilov! Been looking forward to this to see how the “record this solution” is done.

@ruilov Thought about making that into a proper github project?

JockM, yes I will do that, thanks!

@ruilov, Awesome, thank you!

github here https://github.com/ruilov/CargoBot/tree/856e74611aa3feaedfb22132f87e746585ea76a

that’s the version currently in the app store. I’ll continue to use that repo for future development.

uploaded other codea stuff there as well

@ruilov - Wow. Thanks a lot!