@Zoyt all good points. Had exactly the same thought about a button within the editor to access all assets, goes along the lines of what @toffer was saying to make repeat asset edits quicker.
Bug: Blend modes do not work correctly when recording, I'll demonstrate this when I've started a new beta testing thread and included a video for my app.
I've been playing a lot with Juice the last day or so, and it's really nice - I was wondering what the current status is (the original gist was never updated with the new features like juice.screen), and if it could be included in 2.1 (even if just undocumented and hidden).
Would be a really nice addition to 2.1 if it is in a completed state.
@Simeon - @JakAttak has made enhancements to allow animations to be interrupted, which I think will make it much easier to build Juice into a game engine. I'm planning to test them in the next day or so.
@Ignatz@Simeon, I loaded up the latest version of Juice, and rewrote my changes to work with the new code (variable name changes among other things broke my modifications). Currently testing it to make sure that it works correctly and supports all the new changes.
@JakAttak the best way would be to fork the Juice project on Github (make a Github account if you don't have one).
Then clone your version of the project, e.g:
git clone (your-forked-project-url)
Then make a new branch:
git checkout -b jakattak
Then make all the code changes you want and commit:
git commit -am "description of changes"
Then push the changes back upstream:
git push -u origin jakattak
Then on the original Juice repository (https://github.com/TwoLivesLeft/Juice) you can click on "Pull Requests" then "New Pull Request" and choose the branch from your fork and submit it as a pull request.
Edit: alternatively I can just make you a member of the project on TwoLivesLeft Github, you could then make your changes in a branch and push them upstream, then I could merge them.
Thanks @JakAttak I merged your pull request. I've modified it a bit to remove some of your comments — it's not necessary to note that you've added the code, the commit logs in git will keep track of that.
Also if you plan to keep making changes you might want to make your master branch reflect the TwoLivesLeft one, and then each time you work on changes do them in a feature branch and submit the pull request using the branch — it keeps things neater and ensures that you can merge any changes I make back into your version.
Already mentioned by @JakAttak, run / reload a project take more time than before. Seem it happen only when there is dependency linked to the project, even if there is 0 tab in the dependency.
@toffer I noticed this, I think it's on purpose as it no longer freezes when running a big project like it did before. I think it might be because it is the threaded renderer by Dylan Sale, that's a guess though.
@toffer@Luatee there is more overhead in running projects now because the entire project has to be copied prior to running so that the threaded renderer can interact with it.
@toffer thanks for the overlap bug, I'll need to account for that
But is anyone getting a crash when they try to run a project?
@Simeon, I am getting crashes when I try to run a project. Fairly often. A lot of times the close button stops working and I push it a couple times, and then the only way I can get out is to push run which crashes Codea
i still have the keyboard run button sometimes not working. The non keyboard run button always works.
It is random: happens sometimes on one project, then when i kill codea and restart, it works again.
@JakAttak are you on an iPad mini Wi-Fi? Is it a particular project that is crashing for you?
@Jmv38 that is odd, they are both linked up to the same piece of code to run projects. I haven't been able to reproduce that yet — does it happen in particular projects? If you press it quickly after editing text?
@Simeon, yup iPad Mini 1 Wifi. And no, it happens in just about all projects, after I run them a couple of times. (It just happens more in the ones I'm actively working on)
the keyboard pb seems to happen more on projects where i write into a tab. At some moment i run the project but the tab contains stupid code, like html, and it doesnt run. Then i suppress the tab, and it wont run. Then i wont run from the keyboard any more.
Creating a text/shader asset from the asset picker within a project crash Codea 4/5 times.
Tap the create text asset button, enter asset's name, close the asset picker > does not crash, but the asset is not here when I re-open the picker.
Tap the create text asset button, enter asset's name, tap edit asset button > crash often, if not I can enter text and close the picker, I can see the asset when re-opening the picker, but crash when I try to edit. The asset is not created when I came back.
Dropbox folder don't work for me. Even after the steps described by @Luatee to reset the sync. The folder is empty and the synchronize button does not react.
Same problem as @toffer with Dropbox. Couldn't see the "sync" button so am in the process of "Sync and Unlink" from the Settings menu (with a view to relinking again afterwards).
(Did have quite a lot in there to sync it must be said.)
camera() and perspective() are effective only if put in the draw(). Putting them in setup and touched does nothing. Is this on purpose? It feels as a bug to me.
See the example below: if you comment the setCam(0) in the draw(), then you are back to standard drawing, whatever you do.
-- faces
function setup()
c = vec2(WIDTH/2, HEIGHT/2)
m = mesh()
local z = -1
t ={ vec3(100+c.x,c.y,z), vec3(-100+c.x,c.y,z), vec3(c.x,c.y+150,z),
vec3(-100+c.x,c.y+100,0), vec3(100+c.x,c.y+100,0), vec3(c.x,c.y,0) }
cs = {color(255, 0, 0, 255), color(122, 30, 30, 255), color(223, 151, 151, 255),
color(15, 0, 255, 255), color(29, 34, 122, 255), color(151, 155, 223, 255)}
m.vertices = t
m.colors = cs
a = 0
setCam(0)
print("blue is anticlockwise")
print("red is clockwise")
print("slide right/left to rotate")
end
function setCam(da)
local h = WIDTH
a = a + da
camera(
c.x + h * math.sin(a),
c.y,
h * math.cos(a),
c.x, c.y, 0,
0,1,0
)
perspective()
end
function draw()
background(40, 40, 50)
setCam(0)
m:draw()
end
function touched(t)
local da = t.deltaX * math.pi /WIDTH*3
setCam(da)
end
another one: when setting camera(...), then perspective() MUST be used too, otherwise you get a black screen. Why is it so? There could be a default value, making it easier to start with 3d.
@Jmv38 I believe that is the correct behaviour (I'll have to check) but my recollection is that the transform matrix is reset at the beginning of draw()
@Simeon I updated to ios8 and now Testflight isn't working anymore. The old version went through a webpage and I get to the "Testflight wants to install Codea" but after that nothing happens. There's a new Testflight app, but I don't know how to get to Codea with that as there doesn't appear to be a place to login. Do you know anything about it?
I found a bug I'm pretty sure has to do with the threaded renderer: sometimes if you change a parameter like the integer, a frame draws in between when the value of the parameter is changed and when the callback is called, i.e. parameter X is changed, frame is drawn, parameter X's callback is ran (before, the callback was called after parameter X was changed and before the frame was drawn). Doesn't happen 100% of the time, but it caused some errors in my old metaball project when you moved the metaball count's parameter too fast.
Edit: Something that's been bugging me for a long time is that when you long press to paste a new project, the keyboard to enter the project's name doesn't come up immediately, you have to press the text box first.
@Simeon regarding bugging, something that bugs me is when using the search sidebar in the code editor, if I go back to my code and edit something it will wipe the search. Not sure if this has already been mentioned.
@Luatee yes sorry about that — it happens because changing the text necessitates a the code be searched again (in case you changed a search result). At the moment the options are to either re-perform the search on every edit, or wipe the results. The former would be much slower for older devices, but maybe it's okay for newer iPads.
@Luatee@Simeon Another problem with searching in the code editor is that the buttons to hide the reference/search disappear when you open a text box, and you need to press the code editor to get the special keyboard to hide the menu.
@SkyTheCoder true, that's a little tricky to support. Note that you can also dismiss search by pressing the back arrow in the upper left (it won't close the project if the sidebar is open, rather it will dismiss that first).
@toffer so far when I create assets in the current project asset folder they are saved (tested Shaders and Text) do you have a more detailed set of steps to reproduce?
@Simeon - For me it never save when the asset is create within the current project folder.
Those steps for ex :
create a project A, edit it, put readText() inside setup, open asset picker, create a new text asset inside A project folder, edit the asset, type some text, close the text editor, close the current project, re-open the project, open the asset picker, go to project folder > nothing inside.
Comments
@Zoyt all good points. Had exactly the same thought about a button within the editor to access all assets, goes along the lines of what @toffer was saying to make repeat asset edits quicker.
Triple tap to bring back buttons isn't working (iOS8)
Bug: Blend modes do not work correctly when recording, I'll demonstrate this when I've started a new beta testing thread and included a video for my app.
Bug as seen in here, with the jetpack thrust having coloured squares around it: https://www.dropbox.com/s/lga321rfzcapoou/Aedifico.mp4?dl=0
I've been playing a lot with Juice the last day or so, and it's really nice - I was wondering what the current status is (the original gist was never updated with the new features like juice.screen), and if it could be included in 2.1 (even if just undocumented and hidden).
Would be a really nice addition to 2.1 if it is in a completed state.
Thanks @JakAttak, maybe I'll put it on github for now to let it evolve a bit before being included.
@Simeon, sounds good. Wouldn't want you to include it if you don't feel it is ready.
It's up here now https://github.com/TwoLivesLeft/Juice
The screen portion was actually from another project that used Juice. I'll put it in properly later on.
Edit: added the juice.screen class, it's not very documented. I'll try to add an example to the Main file.
@Simeon - @JakAttak has made enhancements to allow animations to be interrupted, which I think will make it much easier to build Juice into a game engine. I'm planning to test them in the next day or so.
@JakAttak @Ignatz feel free to make a pull request with any changes you think should be in the library. I will happily review and merge them if you do.
I'll also try put my zombie game up which uses the library.
@Ignatz @Simeon, I loaded up the latest version of Juice, and rewrote my changes to work with the new code (variable name changes among other things broke my modifications). Currently testing it to make sure that it works correctly and supports all the new changes.
How do you make a pull request?
@JakAttak - Click on "Pull Requests" in the side bar and click "New Pull Request." Or do it from the command line, but I won't get into that.
@JakAttak - let me know when you're done, and I'll try it out
@JakAttak the best way would be to fork the Juice project on Github (make a Github account if you don't have one).
Then clone your version of the project, e.g:
git clone (your-forked-project-url)
Then make a new branch:
git checkout -b jakattak
Then make all the code changes you want and commit:
git commit -am "description of changes"
Then push the changes back upstream:
git push -u origin jakattak
Then on the original Juice repository (
https://github.com/TwoLivesLeft/Juice
) you can click on "Pull Requests" then "New Pull Request" and choose the branch from your fork and submit it as a pull request.Edit: alternatively I can just make you a member of the project on TwoLivesLeft Github, you could then make your changes in a branch and push them upstream, then I could merge them.
OK, I think I properly created the pull request. Just in-case, here is my version: https://github.com/JakAttak/Juice
Thanks @JakAttak I merged your pull request. I've modified it a bit to remove some of your comments — it's not necessary to note that you've added the code, the commit logs in git will keep track of that.
Also if you plan to keep making changes you might want to make your master branch reflect the TwoLivesLeft one, and then each time you work on changes do them in a feature branch and submit the pull request using the branch — it keeps things neater and ensures that you can merge any changes I make back into your version.
Sorry about the comments - put them there so itd be easy to see what I changed to make it work - didn't realize git did it for me.
@JakAttak that's perfectly fine — thank you for adding the features you did.
2 types of people who use GIT in the world: The ones who use the command line and the ones who use the GUI.
Is anyone on an iPad mini Wi-Fi getting crashes when they try to run a project?
I'm trying to isolate a crash report in TestFlight, and it seems to happen to one person.
Already mentioned by @JakAttak, run / reload a project take more time than before. Seem it happen only when there is dependency linked to the project, even if there is 0 tab in the dependency.
Button overlap label in the sprite picker, (but not in assets browser) see https://www.dropbox.com/s/375hgg38makqkia/Photo 08-09-2014 14 45 36.png?dl=0
@toffer I noticed this, I think it's on purpose as it no longer freezes when running a big project like it did before. I think it might be because it is the threaded renderer by Dylan Sale, that's a guess though.
@toffer @Luatee there is more overhead in running projects now because the entire project has to be copied prior to running so that the threaded renderer can interact with it.
@toffer thanks for the overlap bug, I'll need to account for that
But is anyone getting a crash when they try to run a project?
@Simeon, I am getting crashes when I try to run a project. Fairly often. A lot of times the close button stops working and I push it a couple times, and then the only way I can get out is to push run which crashes Codea
i still have the keyboard run button sometimes not working. The non keyboard run button always works.
It is random: happens sometimes on one project, then when i kill codea and restart, it works again.
@JakAttak are you on an iPad mini Wi-Fi? Is it a particular project that is crashing for you?
@Jmv38 that is odd, they are both linked up to the same piece of code to run projects. I haven't been able to reproduce that yet — does it happen in particular projects? If you press it quickly after editing text?
@Simeon, yup iPad Mini 1 Wifi. And no, it happens in just about all projects, after I run them a couple of times. (It just happens more in the ones I'm actively working on)
the keyboard pb seems to happen more on projects where i write into a tab. At some moment i run the project but the tab contains stupid code, like html, and it doesnt run. Then i suppress the tab, and it wont run. Then i wont run from the keyboard any more.
@JakAttak thanks for the info, I'll give it a try.
@Jmv38 will also give that a try, thank you.
Creating a text/shader asset from the asset picker within a project crash Codea 4/5 times.
Tap the create text asset button, enter asset's name, close the asset picker > does not crash, but the asset is not here when I re-open the picker.
Tap the create text asset button, enter asset's name, tap edit asset button > crash often, if not I can enter text and close the picker, I can see the asset when re-opening the picker, but crash when I try to edit. The asset is not created when I came back.
Dropbox folder don't work for me. Even after the steps described by @Luatee to reset the sync. The folder is empty and the synchronize button does not react.
Same problem as @toffer with Dropbox. Couldn't see the "sync" button so am in the process of "Sync and Unlink" from the Settings menu (with a view to relinking again afterwards).
(Did have quite a lot in there to sync it must be said.)
Bug?
camera() and perspective() are effective only if put in the draw(). Putting them in setup and touched does nothing. Is this on purpose? It feels as a bug to me.
See the example below: if you comment the setCam(0) in the draw(), then you are back to standard drawing, whatever you do.
another one: when setting camera(...), then perspective() MUST be used too, otherwise you get a black screen. Why is it so? There could be a default value, making it easier to start with 3d.
@Jmv38 I believe that is the correct behaviour (I'll have to check) but my recollection is that the transform matrix is reset at the beginning of
draw()
@Simeon - quick one. The Forum link at bottom left of the main page of Codea is pointing at the old link (and therefore doesn't work).
@Ignatz thank you — that really needs to be updated.
@toffer I'm hoping build 11 fixes the crash issues you encountered
@toffer @JakAttak @Jmv38 I think running projects should be quicker now, and hopefully the play-button-not-working issue should be fixed.
@Simeon I updated to ios8 and now Testflight isn't working anymore. The old version went through a webpage and I get to the "Testflight wants to install Codea" but after that nothing happens. There's a new Testflight app, but I don't know how to get to Codea with that as there doesn't appear to be a place to login. Do you know anything about it?
I found a bug I'm pretty sure has to do with the threaded renderer: sometimes if you change a parameter like the integer, a frame draws in between when the value of the parameter is changed and when the callback is called, i.e. parameter X is changed, frame is drawn, parameter X's callback is ran (before, the callback was called after parameter X was changed and before the frame was drawn). Doesn't happen 100% of the time, but it caused some errors in my old metaball project when you moved the metaball count's parameter too fast.
I managed to update via iTunes (I clicked on the "download .ipa" link in the email).
The "search" icon on the project browser crashes Codea for me.
@Andrew_Stacey which version are you on? (Press the two lives left logo in the bottom right of the main screen)
@SkyTheCoder I can see how that could happen. Do you think it should be a necessary condition that the callback is called in the same frame?
@Simeon I think it might be necessary to prevent some confusing crashes. Here's the code that gives the error: http://codea.io/talk/discussion/2266/meta-balls-shader/p1#Item_23 Just turn on Animated, and drag the Number_of_Balls parameter.
Edit: Something that's been bugging me for a long time is that when you long press to paste a new project, the keyboard to enter the project's name doesn't come up immediately, you have to press the text box first.
@Simeon regarding bugging, something that bugs me is when using the search sidebar in the code editor, if I go back to my code and edit something it will wipe the search. Not sure if this has already been mentioned.
@Luatee yes sorry about that — it happens because changing the text necessitates a the code be searched again (in case you changed a search result). At the moment the options are to either re-perform the search on every edit, or wipe the results. The former would be much slower for older devices, but maybe it's okay for newer iPads.
@Andrew_Stacey sorry about the project search crash, is fixed next version.
@Luatee @Simeon Another problem with searching in the code editor is that the buttons to hide the reference/search disappear when you open a text box, and you need to press the code editor to get the special keyboard to hide the menu.
@SkyTheCoder true, that's a little tricky to support. Note that you can also dismiss search by pressing the back arrow in the upper left (it won't close the project if the sidebar is open, rather it will dismiss that first).
@Simeon - Create asset from within a project no longer crash, but the asset in not saved if I create it in the current project assets folder.
Same as Andrew_Stacey, search in projects drawer crash the app.
I've noticed that clearing output in the main loop slow down the framerate a lot.
Projects starts faster for me, nice
@toffer great to hear — thank you for reporting back. Will look into the Project assets issue. The search in projects is fixed in the next build.
@toffer so far when I create assets in the current project asset folder they are saved (tested Shaders and Text) do you have a more detailed set of steps to reproduce?
@Simeon - For me it never save when the asset is create within the current project folder.
Those steps for ex :
create a project A, edit it, put readText() inside setup, open asset picker, create a new text asset inside A project folder, edit the asset, type some text, close the text editor, close the current project, re-open the project, open the asset picker, go to project folder > nothing inside.