It looks like you're new here. If you want to get involved, click one of these buttons!
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!
The WebRepo project allows users to browse projects stored on the community repository, download, update and launch them directly from the WebRepo project itself.
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.
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
Comments
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.
This is amazing @Steppers!
Feels like something we should have built into Codea
@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.
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.
@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:
@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.
@West You should see it appear in the WebRepo now.
It plays really nicely. I like it!
@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
@West Don’t get me wrong, I’m not complaining. The more the merrier!
I’ll check it out, looks pretty nice.
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
@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
@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.
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.
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
@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
@West that’s exactly what I did. That’s in my zip. Up there.
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
@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.@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.
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).
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.
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?
@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
@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)
@Steppers Here’s the result when I selected the first box.
Path: BB8 Platforms - West.codea/Info.plist
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 hereObviously 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.
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.
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?
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.
@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.
@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.
@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.
@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.
@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
tosupportedOrientations
and it seemed to fix the issue I was having with using it as a dependency so worth a shot.@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!
I noticed an crash when there's no touched() function thanks to this. I'll get it fixed soon.