Gonna work on rewriting the touching function today in school because the coordinate system changed to be like Scratch.
Offline
veggieman001 wrote:
Gonna work on rewriting the touching function today in school because the coordinate system changed to be like Scratch.
Finally
Offline
Gonna finish the timed say/think functions. :3
Offline
puppetadventurer wrote:
veggieman001 wrote:
Gonna work on rewriting the touching function today in school because the coordinate system changed to be like Scratch.
Finally
Still not with the proper alpha though... dunno how to do that.
Offline
Hey, the timer can be done with the millis function:
int timer = 0, lastReset = 0; //stuff timer = (millis()/100f)-lastReset; //more stuff void resetTimer { lastReset = millis(); }
Oh, and alpha:
Before you display an image, use tint(255,ghost); . You can use that for the color effect too:
colorMode(HSB,100,100,100); //set color mode to hue-sat-bri //Bla bla bla bla void display() { tint(colorEffect,satEffect,briEffect,ghostEffect); image(my_image,x,y); }
Offline
scratchisthebest wrote:
Hey, the timer can be done with the millis function:
Code:
int timer = 0, lastReset = 0; //stuff timer = (millis()/100f)-lastReset; //more stuff void resetTimer { lastReset = millis(); }Oh, and alpha:
Before you display an image, use tint(255,ghost); . You can use that for the color effect too:Code:
colorMode(HSB,100,100,100); //set color mode to hue-sat-bri //Bla bla bla bla void display() { tint(colorEffect,satEffect,briEffect,ghostEffect); image(my_image,x,y); }
Thanks for the code.
Is there any specific name you'd like to be credit as.
Offline
I compiled it, but it didn't work
Offline
jji7skyline wrote:
I compiled it, but it didn't work
![]()
What's the error?
Offline
scratchisthebest wrote:
Hey, the timer can be done with the millis function:
Code:
int timer = 0, lastReset = 0; //stuff timer = (millis()/100f)-lastReset; //more stuff void resetTimer { lastReset = millis(); }Oh, and alpha:
Before you display an image, use tint(255,ghost); . You can use that for the color effect too:Code:
colorMode(HSB,100,100,100); //set color mode to hue-sat-bri //Bla bla bla bla void display() { tint(colorEffect,satEffect,briEffect,ghostEffect); image(my_image,x,y); }
Nice code.
Offline
Scratch is open source.
I know very, very, little about Processing but could you not use Scratch's sound library?
Offline
soupoftomato wrote:
Scratch is open source.
I know very, very, little about Processing but could you not use Scratch's sound library?
We're probably going to be using SoundCipher for the note blocks, which uses MIDI that is similar, if not the same as, Scratch's.
Offline
veggieman001 wrote:
scratchisthebest wrote:
Hey, the timer can be done with the millis function:
Code:
int timer = 0, lastReset = 0; //stuff timer = (millis()/100f)-lastReset; //more stuff void resetTimer { lastReset = millis(); }Oh, and alpha:
Before you display an image, use tint(255,ghost); . You can use that for the color effect too:Code:
colorMode(HSB,100,100,100); //set color mode to hue-sat-bri //Bla bla bla bla void display() { tint(colorEffect,satEffect,briEffect,ghostEffect); image(my_image,x,y); }Thanks for the code.
![]()
Is there any specific name you'd like to be credit as.
No, really just copy and paste. That code took me like five entire seconds to write.
Offline
scratchisthebest wrote:
veggieman001 wrote:
Thanks for the code.
![]()
Is there any specific name you'd like to be credit as.No, really just copy and paste. That code took me like five entire seconds to write.
![]()
I feel dumb, cause it wasn't working for me when I tried to make one. >.>
Last edited by ProgrammingFreak (2012-04-27 09:24:43)
Offline
I'll be working on it this weekend. I took a bit of a break to work on another project which randomly generates music.
Offline
What is "Processing?"
What would someone benefit from those two steps in the middle (between scratch and java)?
Offline
LiquidMetal wrote:
What is "Processing?"
What would someone benefit from those two steps in the middle (between scratch and java)?
Processing is a very visual Java-based language that is pretty much a simplified Java. Going on this path would help Scratchers learn Java, because Scratch blocks are functions in Simplicity, so it would be a natural progression. Once a user gets better at understanding these, they could move on to more advanced built-in functions of Processing. And eventually, they may want even more advanced things and move into Java, which has the same syntax as Processing.
Offline
veggieman001 wrote:
LiquidMetal wrote:
What is "Processing?"
What would someone benefit from those two steps in the middle (between scratch and java)?Processing is a very visual Java-based language that is pretty much a simplified Java. Going on this path would help Scratchers learn Java, because Scratch blocks are functions in Simplicity, so it would be a natural progression. Once a user gets better at understanding these, they could move on to more advanced built-in functions of Processing. And eventually, they may want even more advanced things and move into Java, which has the same syntax as Processing.
What constitutes "visual" because I tried Processing and all I got was colored text commands.
Offline
soupoftomato wrote:
veggieman001 wrote:
LiquidMetal wrote:
What is "Processing?"
What would someone benefit from those two steps in the middle (between scratch and java)?Processing is a very visual Java-based language that is pretty much a simplified Java. Going on this path would help Scratchers learn Java, because Scratch blocks are functions in Simplicity, so it would be a natural progression. Once a user gets better at understanding these, they could move on to more advanced built-in functions of Processing. And eventually, they may want even more advanced things and move into Java, which has the same syntax as Processing.
What constitutes "visual" because I tried Processing and all I got was colored text commands.
It's really easy to do graphics and 2D & 3D shapes compared to other languages, requiring mostly no libraries.
Offline
I'm still working on this by the way although very slowly.
Offline
Is this programmig language supposed to look like C? Because I would make graphics for the say block if you would like me too. Is there any easy way to follow threads without having to remember and check them all?
Offline
applejack wrote:
Is there any easy way to follow threads without having to remember and check them all?
You could try clicking Profile -> Show all posts, which is what I use. It only shows threads you've posted on, though.
Offline
veggieman001 wrote:
jji7skyline wrote:
I compiled it, but it didn't work
![]()
What's the error?
No error. When I run it (I've tried compiling into many different formats) I just get a window of about 20x20 or something. Greyish background.
Offline
jji7skyline wrote:
veggieman001 wrote:
jji7skyline wrote:
I compiled it, but it didn't work
![]()
What's the error?
No error. When I run it (I've tried compiling into many different formats) I just get a window of about 20x20 or something. Greyish background.
Oh. That's what's supposed to happen. You haven't written any code yet! Try this for a guide to starting out and then you can try and understand the available functions from the Simplicity source.
Offline
Wow! It looks great! 1230 lines of code! I was browsing through your source and wanted to ask a few things:
First of all, I noticed that the "Timer()" function returns an integer. You might want to change it to return a floating-point value (maybe rounded to 2 or 3 decimals).
I was looking at the "Join(String sval, String sval2)" function. Does Processing not have a string concatenation function? Can't you just do the following? It looks so much like C# that I wasn't sure.
string s1 = "Hello, "; string s2 = "world!"; string s3 = s1 + s2;
Another thing: Are you intending to start indexing strings at 0, or 1? So, does the statement
[str(val.value.charAt(loc))]return the first letter of the string when loc = 0 or loc = 1?
Offline
amcerbu wrote:
Wow! It looks great! 1230 lines of code! I was browsing through your source and wanted to ask a few things:
First of all, I noticed that the "Timer()" function returns an integer. You might want to change it to return a floating-point value (maybe rounded to 2 or 3 decimals).
I was looking at the "Join(String sval, String sval2)" function. Does Processing not have a string concatenation function? Can't you just do the following? It looks so much like C# that I wasn't sure.Code:
string s1 = "Hello, "; string s2 = "world!"; string s3 = s1 + s2;Another thing: Are you intending to start indexing strings at 0, or 1? So, does the statement
[str(val.value.charAt(loc))]return the first letter of the string when loc = 0 or loc = 1?
The "toBoolean" function seems to interpret 1, true, True, and TRUE as true, but everything else as false. Should it specifically use 0, false, False, and FALSE? Or even throw an exception if you pass an invalid argument?
Finally, are all sprites represented by rectangular areas on the screen (no transparent pixels)?
Thanks,
amcerbu
Thanks for your interest! I've been working on this for a few months now, and glad to see people like you give comments about it.
1. I will do that. I just directly copy and pasted code on here without really modifying it too much for that.
2. There is a built in string concatenation function, but I'm trying to make this as easy for beginners as possible so I'm using the function name from Scratch. It would also be difficult for someone starting out to have two different functions, + and Join(), for the different datatypes, string and Variable.
3. loc = 0
4. I personally think, based on the current casting Scratch has, that this is how it would be done if it were possible in Scratch.
5. You may have transparent pixels but I haven't finished doing the collision for such images.
Offline