WebRepo 2.0 - Easy access to projects from the Codea community (not iCloud compatible)

@UberGoober I may have a different version but it looks like you are basing the font size for the instructions on the value HEIGHT * 0.07

What I was suggesting was to keep my original hard coded value and multiply it by the ratio of the device width (WIDTH) divided by the hard coded width value from the device it was developed on (1366) and do it consistently for all the fontsize calls. You have done a width multiplier in one place and a height multiplier in another.

Regardless the rescaling you have done has fixed it for the iPhone but broken it on my iPad

@West Iā€™m sorry, I didnā€™t understand, I see what you mean now.

I based everything off of HEIGHT because I assumed the game was meant to be played in portrait mode; on my iPhone 8 you canā€™t even see the lizards in landscape mode so I thought it wasnā€™t supposed to be played that way.

This scaling works on my iPad in portrait mode, just not in landscape; it seems like once the font gets over a certain size in iPad landscape mode all the info text vanishes, Iā€™m not sure why.

@UberGoober it was written a while ago (quite possible before Codea was available on the iPhone) and was set up to run in landscape only mode (a deprecated function - very first command of the program - supportedOrientations(LANDSCAPE_ANY) - which forced Landscape only orientation)

Yes, if text spills off the edges of the screen it wonā€™t render at all. Iā€™m not sure why either.

Portrait mode would be even harder to play in 2 player mode - each player gets a half of the screen with a chameleon in it!

Addressing the forward compatibility issue is probably going to crop up a few times when revisiting old examples.

@West @UberGoober Iā€™ve removed ā€˜People Popcorn+ā€™ temporarily as it sounds like youā€™re hoping to get a single project running on iPad & iPhone? Give me a shout when itā€™s ready to go and Iā€™ll update the one on there already.

Iā€™ll list the authors after as ā€˜West ft. UberGooberā€™ if thatā€™s alright?

@Steppers I think you should just leave as is. Trying to make every project work in all four formatsā€”iPhone and iPad in both portrait and landscapeā€”will make a person kooky-pants. I thought I just had to get the text working for iPhone portrait and all would be good, but it turns out to be much hairier than I expected.

@Steppers I am very excited by this; the more I use it, the more it seems like everything necessary to get people really starting to use each others code more often!

I recommend putting a little spinny wheel or some other activity monitor on the project listings as they load, because that will make it obvious what the green coloration means once the spinning is done.

I didnā€™t catch on to that for a while, and I know Iā€™m not the quickest, but I think it would help other people too.

@UberGoober Iā€™m glad to hear youā€™re enjoying it.
In the long run itā€™d be great to see it grow into a default place for people to share projects alongside the forum.

Oh I know full well what you mean there. I port games to mobile for a living and having everything scale nicely to what seems like every screen dimension under the sun is a job and a half! Adjusting your entire UI to adjust for a notch as you rotate a device is an interesting one when the code youā€™re working with was written over 15 years agoā€¦

As for loading and progress indicators itā€™s definitely on my todo list amongst deleting projects, an additional information popup for projects and optional updates (possibly in the popup).

I love this! I havenā€™t been on the forums in ages but your comment on the Wriggles post brought me back around.

Hereā€™s a fun little demo project you could throw on there:

Name: Mirror Draw
Description: Make beautiful patterns with ease!
Runs on iPad and iPhone (in Portrait mode)

@JakAttak Thanks! Iā€™ll check it out and get it added too, looks pretty neat.

@JakAttak holy shamoley you used my color picker! Thatā€™s awesome! Thanks for giving me credit in the code!

Another childrenā€™s book inspired effort - this one is based on ā€œBarry the Fish with Fingersā€ by Sue Hendra.

Name: Fish Fingered Barry
Description: Stop the fish getting squashed
Author: West
Version: 1.0
Stand Alone?: Yes

@Steppers - installed WebRepo 1, ran it, registered it and all I get, even after closing Codea and switching off my iPad, is a black screen. Pulling out the tools window shows a message that WebRepo is working as expected. Where do I go from there?

I can access it from a browser which gives a display of the files as folders with an image of what I thought was the interface. Advice please.

how do you setup a project icon?

@skar - if you mean for the projects screen, when running your project press the camera icon on the screen in the bottom left. Then select project icon.

@skar take a screenshot with the camera button in bottom left of screen- option to set as icon, save or teeet

Ok very odd, Iā€™ll take a look into it. Thanks.

supportedOrientations is back! Credit must go to @UberGoober for the idea.

It should work as close to the original as possible and touch inputs, WIDTH & HEIGHT should all be adjusted automatically without any effort needed from anyone here :smile:

Obviously this will only take effect when the project is launched through WebRepo but I could potentially add a separate implementation for use in local development.

Checkout Westā€™s ā€˜Well Racerā€™ for an example of this in action.

@Bri_G Havenā€™t seen that one before. I may need to upload a more recent version then. Iā€™m currently working on a supportedInterfaces implementation but once thatā€™s done Iā€™ll take a look at that.

As for the icons @skar , as the others have said. If youā€™re wanting to submit a project thatā€™s the icon Iā€™ll use otherwise Iā€™ll generate one for you from a screenshot.

@Steppers Receiving this error.

WebRepo:209: attempt to index a nil value (local ā€˜fileā€™)
stack traceback:
WebRepo:209: in upvalue ā€˜callbackā€™
GithubAPI:85: in upvalue ā€˜callbackā€™
URL:56: in function URL:41

@dave1707 If this is consistent could you place the following on line 206 and let me know what the last thing it prints is?

print("Path:", e.path)