Call for Australian students

Hi everyone

With Hour of Code coming up, we’d like to hear some stories from Australian students who use Codea. So if you are one or know of anyone, please post here and let us know.

I produced better compression code a year ago

http://www.codea.io/talk/discussion/2295/tutorial-26-rle-compression-for-spritely-images/p1

@Ignatz - That would work as well (I forgot about that one) :slight_smile:

@TechDojo - btw, I meant it was better than Spritely, not better than yours (which I haven’t looked at closely) :smiley:

@Ignatz - I do remember reading your RLE compression stuff when you first posted it. It would do a much better job of compressing the images, mine was only a quick proof (in fact it was more of a random thought), although it does raise a good question about how to distribute custom images via text.

Although this depends a LOT on the images, it might be even easier to actually “code” the graphics - that is using the available drawing primitives to create the images - this is something that I’ve been experimenting with on / off for a while now and I’m seeing favourable results especially in terms of download size, auto creation of retina images and ease of use (especially as I can’t draw for toffee :)) )

Obviously the next step is to take a more data driven approach and store all the drawing instructions in a list which if you take it to it’s logical conclusion means that you end up with a kind of source based SVG / .EMF / .WMF renderer - a few years back I actually wrote an .EMF / .WMF decompiler that parsed the file and output Actionscript source that you could include in a Flash / HaXe project and it worked really well. I was actually thinking of combining this with some filled vector code - then I discovered that it was a lot easier to simply use iDraw and export / import PDF assets via Dropbox. Great for my use case - not so good for the OP’s source distribution though :slight_smile:

@Simeon - Oops - sorry to hijack the thread :slight_smile:

@CayDay47 - Congrats on the apps, looks like your really motoring along with Codea #KeepItUp :slight_smile:

@Ignatz - Oh, you-re from Perth? I was born there and lived there for my pre-teenage years. By the way, your RLE compression code is really useful, since I make 99% of my images on Spritely.

@CayDay47 - yes, I’m from Perth

I think it would be a LOT more efficient if the code that spritely produced was something more in the style of…

function Images:getButton()
   local sprData = { 
      --  RGBA values for each pixel (4096 values in total (32x32x4))
   }


   local img = image(32, 32)
   local c = 1
   for i=1,32 do
      for j=1,32*4 do
         img:set(j,i,sprData[c])
         c = c + 1
     end
   end 

   return img
end

The double for loop could also be extracted out as well to avoid unnecessary duplication

Just my $0.02

Thanks Ignatz, but I’m actually using images I made in Spritely, so either I’ll use the given set image pixels, or turn them into a image, the latter of which I don’t know how to do.

@CayDay47 - maybe this will help

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

Hi, CayDay47 here, I’m from VIC in Australia.
I’d like to express how great Codea is, as our school’s Year 8 extension studies group (consisting of about 6 students including myself) had been using Codea throughout the year to make some great programs. A few apps by the others in the group were small games such as Tic Tac Toe, or a board which uses the Codea’s gravity function to roll a ball around and avoid the holes.
My own apps include an Air Hockey game using the physics engine, a windows-based GUI in Codea, the funtions of buttons, windows, cursors and virtual controllers, more, and all of these rolled into one. I’m still working on that last one.

Here are my GitHub reps, which I am currently working on. Please check them.

https://github.com/CayDay47/Codea_DesktopGUI

https://github.com/CayDay47/Air-Hockey

That’s fantastic @CayDay47. Thanks so much for sharing.

Your Github repos are currently empty (still uploading?)

Yep

Edit: The Air Hockey one is finished, currently uploading PC Touch

Ok, the Air Hockey and PC_Touch in their entirety as of now have been uploaded on the GitHub Repositories.

Wow - I hope you didn’t have to type in the image code by hand :slight_smile:
(yes I realise he didn’t, but still it’s a pretty inefficient method of storing image data :slight_smile: )

I realise it would be better to store it as a document that can be retrieved, but the problem is, I don’t know how to make it into one.