This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#151 2012-02-29 10:08:23

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Java Official Topic

slinger wrote:

Nice 16, that's great for a first game :3

big_smile
As I said in my Tumblr, I see Pong as the "Hello World" of game developers. It's the simplest thing you can do, so it should be a good starting point.


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#152 2012-02-29 10:09:01

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Java Official Topic

i can't score a point  sad


Posts: 20000 - Show all posts

Offline

 

#153 2012-02-29 10:09:55

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Java Official Topic

Yup :3
Good luck with opengl  smile  Btw I'm planning on learning that sooner or later xD


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#154 2012-02-29 10:12:25

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Java Official Topic

veggieman001 wrote:

i can't score a point  sad

If you want you can edit the AI speed if you want. It's in the /src folder and in the method logic(). Compile the class and replace the class in the jar and it'll be whatever you want!


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#155 2012-03-01 08:01:15

wmays
Scratcher
Registered: 2008-05-10
Posts: 500+

Re: Java Official Topic

The first game that I make that isn't Pong (not that there's anything wrong with that) will be based on this video.


http://i42.tinypic.com/2z5vcz9.gif
http://phpscripthost.comoj.com/imagescripts/ipimg.php

Offline

 

#156 2012-03-01 08:43:28

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: Java Official Topic

wmays wrote:

The first game that I make that isn't Pong (not that there's anything wrong with that) will be based on this video.

Cool.  But as a first game?  I hope to make it SOMEDAY, but I don't think that I can do it as my first.

Offline

 

#157 2012-03-02 21:34:27

ihaveamac
Scratcher
Registered: 2007-09-22
Posts: 1000+

Re: Java Official Topic

Harakou wrote:

ihaveamac wrote:

Anyone know what I could use to make a GUI in java?

Use the javax.swing toolkit. Obviously that's a lot of classes, so here're some guides to hopefully help you along:

Oracle's Swing GUI guide
Thenewboston's tutorial You'll have to watch several videos - he uses quite a few to go over the basics. However, he's very good at explaining things in the simplest way possible if that's what you need.

Actually, I found out Eclipse has a built-in window editor, using swing. Still, thanks.  smile


~ihaveamac - visit ihaveamac.net

Offline

 

#158 2012-03-02 21:54:36

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Java Official Topic

ihaveamac wrote:

Harakou wrote:

ihaveamac wrote:

Anyone know what I could use to make a GUI in java?

Use the javax.swing toolkit. Obviously that's a lot of classes, so here're some guides to hopefully help you along:

Oracle's Swing GUI guide
Thenewboston's tutorial You'll have to watch several videos - he uses quite a few to go over the basics. However, he's very good at explaining things in the simplest way possible if that's what you need.

Actually, I found out Eclipse has a built-in window editor, using swing. Still, thanks.  smile

Uh, you're welcome! cheater :P


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#159 2012-03-03 14:03:25

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: Java Official Topic

Anyone know how to write folders?


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#160 2012-03-03 14:10:55

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Java Official Topic

poopo wrote:

Anyone know how to write folders?

what? you mean like creating a folder?


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#161 2012-03-03 14:30:22

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: Java Official Topic

poopo wrote:

Anyone know how to write folders?

http://lmgtfy.com/?q=java+create+folder


http://i.imgur.com/zeIZW.png

Offline

 

#162 2012-03-03 17:04:55

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Java Official Topic

I need some help  hmm  I'm trying to make a WriteText class for my game (LWJGL with slick-util) but it's not working.  hmm

Code Removed
To explain a bit, I want to make it so that I can use in any other class WriteText.write(50,50,"Hello, World") to output "Hello, World" (or any other string). I HAVE tested this code and gotten it to work before. I believe I've found the problem as being the InputStream.  This is what I get running it on console in eclipse:
code removed
This means that the try{} threw its catch{} and the font never initialized, which explains the error. I did some on-the-fly debugging by deleting portions of the code to see when it would still make the error. If all I have is the inputstream code, I get the "a wild error appeared" message, meaning that that is the source of the problem. The NEW problem is that when I delete just that,then the system loses responsiveness. Now that I think of it, it may be an issue with another class (that has another error that I didn't realize because of the full crash) that I'll keep looking for.

Edit: What's with the censor?
Edit: oh I see, it's AWT coming before Font that caused the censor to go off lol.

Edit 2: I fixed the problem and removed the code. (Top secret, lol  tongue )

Last edited by 16Skittles (2012-03-03 17:18:57)


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#163 2012-03-05 13:45:46

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: Java Official Topic

Why isn't this collision code working?

Code:

     
public boolean Intersects(Rectangle rect)
{
    if (x + width < rect.x || x > rect.x + rect.width
            || y + height < rect.y || y > rect.x + rect.height){
        return false;
    }
    return true;
}

Edit: brainfart. XD I forgot to update the rectangles to the new positions.  tongue

Last edited by poopo (2012-03-05 14:04:03)


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#164 2012-03-12 15:49:58

ipodbiped
Scratcher
Registered: 2011-02-06
Posts: 1000+

Re: Java Official Topic

Anyone still use this topic? I am going to try and do some more Java coding soon.  smile

Offline

 

#165 2012-03-12 15:55:17

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: Java Official Topic

ipodbiped wrote:

Anyone still use this topic? I am going to try and do some more Java coding soon.  smile

Yep.

Offline

 

#166 2012-03-12 15:57:10

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Java Official Topic

For some unknown reason I can't seem to get a certain render to work. Off to debugging!
Also, a leak, the game that I'm working on is codenamed Under the Smog. Any guesses to what it'll be?  tongue


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#167 2012-03-12 16:03:29

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: Java Official Topic

the pong game gives me thing error 1
2/03/2012 20:02:20.702 [0x0-0x58058].com.apple.JarLauncher: Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#168 2012-03-12 16:05:41

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Java Official Topic

muppetds wrote:

the pong game gives me thing error 1
2/03/2012 20:02:20.702 [0x0-0x58058].com.apple.JarLauncher: Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

Did you have all of the LWJGL files and stuff? Or were you maybe on Mac or Linux? I think I only included the Windows DLLs for LWJGL.


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#169 2012-03-12 16:33:15

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: Java Official Topic

16Skittles wrote:

muppetds wrote:

the pong game gives me thing error 1
2/03/2012 20:02:20.702 [0x0-0x58058].com.apple.JarLauncher: Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

Did you have all of the LWJGL files and stuff? Or were you maybe on Mac or Linux? I think I only included the Windows DLLs for LWJGL.

mac which renders the DLLS useless


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#170 2012-03-12 16:37:54

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Java Official Topic

muppetds wrote:

16Skittles wrote:

muppetds wrote:

the pong game gives me thing error 1
2/03/2012 20:02:20.702 [0x0-0x58058].com.apple.JarLauncher: Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

Did you have all of the LWJGL files and stuff? Or were you maybe on Mac or Linux? I think I only included the Windows DLLs for LWJGL.

mac which renders the DLLS useless

maybe try downloading LWJGL, extract, go to native\mac and copy those files into the same place where the DLLs are. lwjgl.org


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#171 2012-03-12 18:12:31

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: Java Official Topic

Why can't other languages be made simple like scratch? Scratch is colorful and simply laid out nicely wih easy to learn scripts. I've looked at other languages an Im like, where's the scripts? It's all complex, so fr now I'm sticking wih scratch

Offline

 

#172 2012-03-12 19:55:42

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Java Official Topic

turkey3 wrote:

Why can't other languages be made simple like scratch? Scratch is colorful and simply laid out nicely wih easy to learn scripts. I've looked at other languages an Im like, where's the scripts? It's all complex, so fr now I'm sticking wih scratch

Other languages are more complex because while Scratch is simple to get into and very useful for your first foray into programming, it's hardly suitable for more powerful coding.

A big reason for this is that other languages have far more extensive libraries than Scratch, and having to have a block for every single one would make using it effectively impossible. This, for example, is the Java 6 SE API. That's a huge library.

There are other issues too. Consider that programs can easily consist of thousands of lines of code and you can see just how difficult it would be to work with that in block form.

Let's not forget, also, that blocks are just an abstraction on top of text. Ultimately, every language does simplify things for the sake of usability, (believe it or not, languages like Java and C++ are made to make things easier for programmers) but these changes are intended to make coding more efficient by providing powerful ways of writing instructions - otherwise we would still be flipping switches to define memory addresses to access, and I don't think anyone wants that.  tongue

I understand that I'm sort of focusing on the block aspect here and not totally addressing your entire question, but the point is that simplicity and accessibility are good to start off with, but they're like training wheels on a bike: eventually you need to take them off because they become limiting rather than helpful.

And yes, other languages can be intimidating, but anything that you don't understand can be. You're not going to know everything at once, so it's important to slowly learn the basics and add onto that knowledge as you go. Once you start learning how to use it, it stops seeming so convoluted. Trust me, I remember being baffled by languages as simple as BASIC; I just didn't know where to start. You just need to take the time to learn it.  smile


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#173 2012-03-12 20:05:18

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Java Official Topic

Harakou wrote:

*snip*
And yes, other languages can be intimidating, but anything that you don't understand can be. You're not going to know everything at once, so it's important to slowly learn the basics and add onto that knowledge as you go. Once you start learning how to use it, it stops seeming so convoluted. Trust me, I remember being baffled by languages as simple as BASIC; I just didn't know where to start. You just need to take the time to learn it.  smile

This. The thing I was honestly most intimidated by was brackets. I never watched a tutorial and I was like "wow I've never used those, those look scary" until I watched Java tutorials and realized it was just like how when you open a <html> tag you must close it with a </html> tag.


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#174 2012-03-12 20:24:40

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Java Official Topic

16Skittles wrote:

Harakou wrote:

*snip*
And yes, other languages can be intimidating, but anything that you don't understand can be. You're not going to know everything at once, so it's important to slowly learn the basics and add onto that knowledge as you go. Once you start learning how to use it, it stops seeming so convoluted. Trust me, I remember being baffled by languages as simple as BASIC; I just didn't know where to start. You just need to take the time to learn it.  smile

This. The thing I was honestly most intimidated by was brackets. I never watched a tutorial and I was like "wow I've never used those, those look scary" until I watched Java tutorials and realized it was just like how when you open a <html> tag you must close it with a </html> tag.

The funny thing is that those always confused me too. In fact, here's an old post by me expressing my frustration at them.

(I'm now reading through that thread. Oh the memories...)


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#175 2012-03-12 20:29:28

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Java Official Topic

Harakou wrote:

16Skittles wrote:

Harakou wrote:

*snip*
And yes, other languages can be intimidating, but anything that you don't understand can be. You're not going to know everything at once, so it's important to slowly learn the basics and add onto that knowledge as you go. Once you start learning how to use it, it stops seeming so convoluted. Trust me, I remember being baffled by languages as simple as BASIC; I just didn't know where to start. You just need to take the time to learn it.  smile

This. The thing I was honestly most intimidated by was brackets. I never watched a tutorial and I was like "wow I've never used those, those look scary" until I watched Java tutorials and realized it was just like how when you open a <html> tag you must close it with a </html> tag.

The funny thing is that those always confused me too. In fact, here's an old post by me expressing my frustration at them.

(I'm now reading through that thread. Oh the memories...)

Lol, don't you just love looking back at the times when (as Wickimen put it) you were a young noob?  tongue


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

Board footer