Topic closed
This is the official topic for the collab recreating scratch in the java "oop"
Our goal is to provide all the features of scratch in our own project. We also plan to have more features.
Discuss...
Offline
This belongs in the collaborations forum
Offline
jji7skyline wrote:
This belongs in the collaborations forum
It's outside of Scratch though, so it belongs here if the Unity3D one does.
Offline
collab forum is for working together on scratch projects or mods this is its own thing beyond scratch so it belongs here
Offline
I won't commit, but may add some code.
Offline
ya ill give commitment but for me this is mostly learning
Offline
JVS (Java Scratch
JScratch
Java scratch
JBlocks
JB (java blocks)
or make up our own
Last edited by slayerrobe7 (2012-03-15 12:00:20)
Offline
plz do
is their any specific compiler i should run it in
Offline
Main code:
Block block = new Block("My block", Color.blue, 30,30); public void paint(Graphics g) { Graphics2D g2D = (Graphics2D) g; g2D.setColor(gray); if (change) g2D.fillRect(0, 0, jf.getWidth(), jf.getHeight()); fm = g.getFontMetrics(g2D.getFont()); g2D.setColor(block.blockColor); g2D.fillRoundRect(block.blockX, block.blockY, 10 + fm.stringWidth(block.blockText), 25, 5, 5); g2D.fillRect(block.blockX + 10, block.blockY + 25, 20, 5); g2D.setColor(gray); g2D.fillRect(block.blockX + 10, block.blockY, 20, 5); g2D.setColor(black); g2D.drawString(block.blockText, block.blockX + 5, block.blockY + 19); UpdateBlock(fm.stringWidth(block.blockText), block); } private void UpdateBlock(int blockLength, Block block){ change = false; mouseX = MouseInfo.getPointerInfo().getLocation().x - jf.getX(); mouseY = MouseInfo.getPointerInfo().getLocation().y - jf.getY(); blockClicked(mouseX, mouseY, block.blockX,block.blockY,blockLength + 10, mouseDown); repaint(); } public void blockClicked(int mouseX, int mouseY, int blockX, int blockY, int blockLength , boolean mouseDown){ if (mouseDown){ if((blockX <= mouseX & (blockX + blockLength) >= mouseX & blockY <= mouseY & (blockY + 25) >= mouseY) || mouseDownLastTime){ mouseDownLastTime = true; x = mouseX - (blockLength / 2); y = mouseY - 42; change = true; } } else { mouseDownLastTime = false; } }
I was unsuccessful in making multiple blocks at a time but maybe you'll have more luck.
Last edited by poopo (2012-03-15 12:19:26)
Offline
what compiler do i run that in all i got from mine was errors
Offline
slayerrobe7 wrote:
what compiler do i run that in all i got from mine was errors
If you can just copy some code, without understanding anything, I don't think you are good enough to do something as complicated as a "Java Scratch".
Offline
ZeroLuck wrote:
slayerrobe7 wrote:
what compiler do i run that in all i got from mine was errors
If you can just copy some code, without understanding anything, I don't think you are good enough to do something as complicated as a "Java Scratch".
Put bluntly but I agree.
Offline
Contact MathWhiz about this. He'll help you alot. He already has one started and its really good.
EDIT: I hope this is opensource, cause I love looking at code from a language I'm learning.
Last edited by ProgrammingFreak (2012-03-15 14:03:44)
Offline
poopo wrote:
ProgrammingFreak wrote:
I hope this is opensource, cause I love looking at code from a language I'm learning.
Me too and that is why I LOVE netbeans go feature!
Netbeans is extremely slow for me.
I might switch to Eclipse cause it also has Android plugins.
Offline
ProgrammingFreak wrote:
poopo wrote:
ProgrammingFreak wrote:
I hope this is opensource, cause I love looking at code from a language I'm learning.
Me too and that is why I LOVE netbeans go feature!
Netbeans is extremely slow for me.
I might switch to Eclipse cause it also has Android plugins.
Do you have lots of plugins?
I've never tried Eclipse.
Offline
I am here mostly for learning I am not a very good java scripter but i am willing to learn i also help when i can
btw we probably need a website if you guys want i could make one in weebly
Offline
PROTIP: java NEEDS a main method. That's a short enough script you should have seen, or at least seen the "no main method" error.
Offline
Topic closed