Howdy, Stranger!

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

WebRepo 2.0 - Easy access to projects from the Codea community

edited November 5 in Code Sharing Posts: 255

Hi all,

As many of you will know by now, I’ve been working on the Codea Community Repository and its associated project WebRepo which allows users to browse and download projects directly from the community repository.

I’m pleased to announce that WebRepo 2.0 has now been released! :smile:

The WebRepo project allows users to browse projects stored on the community repository, download, update and launch them directly from the WebRepo project itself.

  • All projects downloaded are made available for editing like every other project in Codea. Note that local changes will be erased when the project is updated using WebRepo so I suggest renaming it if you plan to make modifications.
  • The powerful search functionality allows you to search project names, descriptions & authors to find the project you’re looking for.
  • Functions on both iPad & iPhone and will scale with available screen space.

iPad

I’m sure there will be many updates to come but for the time being I’d like to focus on filling this as much as we can so get those projects coming in! Old. New. It doesn’t matter.

Please add any feature requests or bugs you may find as issues on Github so we can keep track of them. Feel free to comment on this discussion too but it’s far easier to track using Github.

Submitting a project

To submit a project, fill in the required fields on the Submit New Project screen (these are saved between launches). Once you've filled it all in hit the 'Upload & Submit' button and wait for it to tell you it's done!

Once submitted, your project will not be available until an Admin approves your project. I'll endeavour to get this done within 24 hours but if it takes much longer feel free to leave a comment on the Codea forum.

The only limitations imposed are:
- The project must be in a working state.
- The project must include an Icon image.
- Assets required must be included within the project itself, builtin assets from Codea or downloaded at runtime. No external asset packs please. We are not limited by the forum’s 2MB limit so large projects should be fine.
- Projects of an illegal, malicious, unethical or inappropriate nature will be ignored.

Cheers all,

Steppers

Tagged:
«13

Comments

  • Posts: 1,547

    This is going to be awesome.

    I ran West’s side scroller and it kept suddenly turning into different games. The first time it turned into his trench run and the second time it turned into a slashing game.

  • SimeonSimeon Admin Mod
    Posts: 5,718

    This is amazing @Steppers!

    Feels like something we should have built into Codea

  • Posts: 1,547

    @Steppers is it possible to make updating manual instead of automatic, like showing a badge or something on the listing icon if there’s an update?

    I know it’s more of a pain to program.

  • edited May 13 Posts: 255

    Thanks both!

    @UberGoober Now that’s a bug I hadn’t seen before! It’s because I hadn’t cleared out some of the input callbacks the WebRepo project uses so the tap events were still going to the project browser… If you run the WebRepo project again it should autoupdate with the fix.

    As for the updates, that’s something I’d like to add more control over similarly to how you describe. That and being able to delete projects from the browser are the main things I have my eye on at the moment. I assume you haven’t run into any apps needing to be updated though yet? Nothing’s changed in the repo to trigger an update at least.

  • Posts: 894

    @Steppers great work.

    I’ve got a few old projects I don’t mind sharing. Most of them have been developed on the iPad, and not checked to see if they work on the iPhone. I’ll drip feed them into here when I can. Many of these are half games and playthings I’ve put together to either learn Codea or for my kids.

    Here is the first one:

    Name: Wrigglies
    Description: Side scrolling diamond munching worm game
    Author: West
    Version: 1.0
    Stand Alone?: Yes

    Other info: Graphically inspired by “Baby's Very First Fingertrail Play Book Garden” book:

    Wrigglies.zip 566.3K
  • Posts: 255

    @West Thanks! I’ll take a look and see if I can get that one added too. There’s an awful lot of ‘West’ on there at the moment ;)

    As for the iPad vs iPhone thing the thought had crossed my mind so It may be worth me adding something to the listings to indicate if a project is intended for either. That way you know what you’re getting into at least.

  • Posts: 255

    @West You should see it appear in the WebRepo now.

    It plays really nicely. I like it!

  • edited May 13 Posts: 894

    @Steppers I appreciate there is a whole bunch of my stuff - don't want to flood it, but these are the ones I have to hand.

    In terms of others not by me - there is this nice butterfly demo: https://codea.io/talk/discussion/9472/butterflies

  • Posts: 255

    @West Don’t get me wrong, I’m not complaining. The more the merrier!

    I’ll check it out, looks pretty nice.

  • Posts: 894

    Here’s another - this one from 2012 from Pepe Enguídanos (pepinganos) - a tiny wings type game. I’ve updated to remove warnings but code unchanged.

    Original thread here:
    https://codea.io/talk/discussion/1267/little-jumping-thing

  • edited May 13 Posts: 1,547
    @West Wrigglies is great! Really sweet and charming.

    @Steppers here’s a project I found on the forums that demonstrates height maps, but the code in the original post won’t run without a heightmap added to it. I altered it to use the heightmap included in the Surfaces asset pack, and now it runs fine.

    Name: Infinite Heightmap Terrain

    Description: Good performance using single heightmap tile.

    Author: spacemonkey

    Version: ? I think version information is going to be near impossible to find for the great majority of projects, if you ask me there’s not a lot of value to tracking this, especially on old projects mined from these forums

    iPad, iPhone or both: both

    Standalone or library: Stand-alone

    LICENSE.txt: none and personally I think this is an enormous can of worms. I think it’s much better to make clear up front “if you share a project to WebRepo it’s exactly the same as posting it on the forums—there is no binding license agreement at all.” Making people feel like they have to track down explicit license agreements before they use any code in these projects would have a chilling effect on sharing, for example, I wouldn’t feel right about sharing spacemonkey’s code like this, and that kind of over-cautiousness ruins the whole point.

    Forum discussion: https://codea.io/talk/discussion/5786/heightfield-terrain-very-large-with-good-performance
  • Posts: 255

    @UberGoober Thanks! I’ll take a look and get it added.

    With the versioning I agree, most will just be 1.0 and probably stay like that forever, it was more or less added as it was so easy to.

    Thinking about it now I think you’re probably right about the licence stuff. I figured I’d just give people the option but as you say it could over complicate things. Anybody else have opinions on this? If not I’ll remove it and do as UberGoober suggests above.

  • Posts: 1,547
    @West I adjusted the font sizes and placement on People Popper so that it reads legibly on the iPhone, please let me know if it looks ok to you.

    Previously the text was all way too big and it all overlapped and I couldn’t tell what the goal was.

    Gameplay doesn’t seem to work on iPhone though, which I can’t suss out how to fix, but at least it will be clear how it’s supposed to work.
  • Posts: 1,547

    Here’s a project I’ve had a ton of fun just playing around with—especially with pressure sensitivity added.

    It’s originally by @JakAttak, and contributed to by @West, @Jmv38, and me, so I don’t know how you credit that.

    Name: Wrigglers? I think JakAttak wanted to call it Wriggle Room.

    Description: Swipe around and watch them wriggle!

    Author: see above

    iPad, iPhone or both: both

    Standalone or library: Stand-alone

    Forum discussion: https://www.codea.io/talk/discussion/4760/reverse-bounce

    Wrigglers.zip 232.1K
  • Posts: 2,496
    Hi guys, impressive accumulation but you are missing three of the better demos from the old master. @Ignatz posted a 3D dungeon, 3D fighter plane demo and a 3D walk around village. Not forgetting his 3D race game and the sea war. I'm sure he wouldn't complain if you posted them.
  • Posts: 894

    @UberGoober the text is too big for my iPad pro screen - can no longer see the instructions.

    Probably the simplest way to make it universal would be to replace the fontSize(x) with fontSize(x*(WIDTH/1366)). Might need a math.ceil in there too - don't know if non integers work with fontSize

  • Posts: 1,547

    @West that’s exactly what I did. That’s in my zip. Up there.

  • Posts: 255

    Thanks for the suggestions everyone.

    I’m slowly working my way through these when I get the chance so keep them coming. I’ll get them all in eventually :)

  • Posts: 255

    @UberGoober Just given ‘People Popper+‘ a quick test on iPhone. It seems legible now and does seem to function correctly. though the scores may need to be offset using layout.safeArea.top to avoid a notch.

  • Posts: 894

    @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

  • Posts: 1,547

    @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.

  • Posts: 894

    @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.

  • edited May 13 Posts: 255

    @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?

  • Posts: 1,547

    @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.

  • Posts: 1,547

    @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.

  • Posts: 255
    @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).
  • Posts: 2,051
    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)
  • Posts: 255

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

  • Posts: 1,547
    @JakAttak holy shamoley you used my color picker! That’s awesome! Thanks for giving me credit in the code!
  • Posts: 894

    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

    Barry.zip 1.5M
  • Posts: 2,496

    @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.

  • Posts: 185

    how do you setup a project icon?

  • Posts: 2,496
    @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.
  • Posts: 894
    @skar take a screenshot with the camera button in bottom left of screen- option to set as icon, save or teeet
  • Posts: 255

    @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.

  • dave1707dave1707 Mod
    Posts: 9,725

    @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

  • Posts: 255

    @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)

  • dave1707dave1707 Mod
    Posts: 9,725

    @Steppers Here’s the result when I selected the first box.

    Path: BB8 Platforms - West.codea/Info.plist

  • Posts: 255

    Ok very odd, I’ll take a look into it. Thanks.

  • edited May 15 Posts: 255

    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.

  • edited May 16 Posts: 255

    supportedOrientations has now been added as a standalone library on WebRepo available to download.

    When added as a dependency to any of your projects it should provide an implementation of the old supportedOrientations function and should be a drop in replacement with no other code adjustments necessary.

    Bug fixes for WebRepo are next up.

  • edited May 16 Posts: 1,547

    supportedOrientations is great, I’m really impressed that you pulled it off.

    It’s a bit of a crash monster for me, though, on my iPhone at least; it crashes when I run a project with it as a dependency and even sometimes when I add it as a dependency.

    It’s working for me as a dependency, but when I tried to add a demo tab to the supportedOrientations project, so that you could see it in action when you run it, it doesn’t work, why is that?

  • edited May 16 Posts: 1,547

    Also it isn’t quite working right on Well Racer on my iPhone, see attached screenshot.

    The right wall has gone missing in that shot but also sometimes the player character disappears entirely for a while, and other things too.

  • Posts: 255

    @UberGoober I had noticed a few crashes and then it just never appeared as an available dependency again for some reason. I just put it down to me confusing Codea somehow and moved on.

    As for the example, the supportedOrientations tab needs loading first (on the left). Seems to work after that.

  • Posts: 1,547

    @Steppers you're right, that fixed it, then it crashed again. I’ve sent at least five crash reports from Codea in the last hour.

  • Posts: 255

    @UberGoober Damnit. Ok, could do with some work then but I can’t get it to trigger any crashes now… :/ Well Racer also seems to be fine on my phone too so not sure what’s going on.

  • edited May 16 Posts: 2,496

    @Steppers - just letting you know downloading your updated version 1.1 of WebRepo from your GitHub account installed and ran fine on my iPad. Thanks.

    Edit: Just downloaded the World of Warships using WebRepo and Codea crashed when I tried to run it. Closed Codea and ran it again - this time it was succesful. Reminiscent of the times you upgrade Codea and the first project you run results in a Codea crash - fine after that. It's almost like there are change in the system that don't register until you have re-started Codea.

  • edited May 16 Posts: 255

    @Bri_G I’m not sure what went wrong there then but glad to hear it’s sorted now.

    @UberGoober I’ve added a new version of the supportedOrientations lib above. I’ve just changed the tab name from Main to supportedOrientations and it seemed to fix the issue I was having with using it as a dependency so worth a shot.

  • Posts: 1,547

    @Steppers so far so good, knock wood.

    Have attached a version of the project that includes a super-minimal demo in Main and an icon.

    Icons are good!

  • edited May 16 Posts: 255
    Thanks @UberGoober. Looks good! I'll replace the WebRepo one with this one with the demo.

    I noticed an crash when there's no touched() function thanks to this. I'll get it fixed soon.
Sign In or Register to comment.