« first day (1098 days earlier)      last day (3844 days later) » 

12:00 AM
Out for today. See ya guys
 
Buying a game engine isn't something I would really recommend to someone just starting out, but it really is the best learning tool IMO speaking from experience. Now that they all sell indie licenses it doesn't cost $3000 a seat anymore unless you're a company. That's why there are all these little self-starters popping up on Valve Greenlight and the Apple app store and stuff.
later!
Jeremy, here is the youtube series I mentioned (there's 2): youtube.com/watch?v=hXImR8Wm53M and youtube.com/watch?v=9dzhgsVaiSo
I haven't watched them but they seem pretty long and in-depth.
 
I dont really want to play around with other peoples pre setup material I want to start from the ground up
 
If you skip to some of the later videos you can see what they are ending up with which is fairly impressive IMO for Java.
 
I normally use bucky roberts at thenewboston.org for video tutorials but learning from a book gives much more useful information
 
They just show you how to do it, there are basic programming paradigms that almost all games use.
Especially in Java there will be a lot of API classes you'd need to learn, like key bindings which inevitably all games in Java will use and I assume they'll show you how to use stuff like that.
And it's true a book will teach you more technical stuff.
 
12:11 AM
I already know about key bindings and listeners and such
Its just having physics and all workout is tricky
especialy when u try to do it with JPanels...
 
Well it's basically all just math. Pretty much the way all games work is they are a massive while loop that calculates all the positions, renders one frame and dispays it.
It'll work the same way in Java but you'll be using Graphics2D to do all the graphics on top of a Canvas or JPanel.
 
Is 2D java game dev actually using JPanels and wait times and such?
 
and calling repaint at the end of your loop iteration
I assume so, what I just described is the way basically all games work: en.wikipedia.org/wiki/Game_programming#Game_structure has a very abstract outline
I know one of the videos I watched the first bit of uses a Canvas which is a very abstract AWT panel that one can draw on to.
 
Thanks I see how it works now
 
actually here is a (closed) SO thread on the subject of books for game development: gamedev.stackexchange.com/questions/1265/…
StackExchange thread I should say
 
12:19 AM
I just keep repainting with the updated information of posistions and such
 
Yep
You'd find out that if you tried to do it any other way it would get very messy and complicated.
 
lol i did it other ways before, and it did not go well at all
 
The game loop keeps the whole game contained in mostly a single thread, which will be a class implementing Runnable in Java.
 
I did like Thread.sleep(1); movePosistion(x,y)
yup i think ik exactly how to do it now
although getting physiscs in is tricky
 
Yes. You'd have to be incrementing stuff and using timers and sleeping here and there. The game loop is how to really do it.
 
12:21 AM
doing the math to figure out if a panel is touching another panel
ehh
I spent hours trying to do that without any research or other sources
I almost made it but then i gave up
 
Well the truth is most games don't use real physics even if they seem like they do, real physics would take too much processing to calculate. They are simulated. You just say that such and such is moving across the screen at a rate of 5px/second, calculate the time passed since the last frame draw and set the new coordinate.
You won't be using GUI components for anything in the game unless you want UI overlaid on top, such as a HUD or inventory windows etc.
Welp that's the "official" way to program a game. Now you know. : )
Physics do get more complicated if you are doing more complex interactions, like you said collisions, but for most simple games there are not really any physics at all. You can just simulate most of it.
 
Well yes I know games are only a simulation of physics through the process of posistioning things to keep them from "going into or through" another 2D object
Just figuring out how its done is weird
Question on objects
If I have a player object but it also has a player JPanel for it
this JPanel is an object from another class
so Player extends this JPanel object class
If I make a new Player object, becaause Player extends the player JPanel class, will it also make a new unque or seperate JPanel player class
(excuse my spelling)
(hands are frozen atm so cold up here)
or does it just make a new Player Object?
if that makes any sense...
 
12:42 AM
You are saying your Player class extends a class that extends JPanel?
I mean, any time you extend a class the subclass is essentially also that class. If you extend JPanel your subclass of JPanel is essentially also a JPanel. This is usually called an "is-a" relationship: en.wikipedia.org/wiki/Is_a
So if you instantiate a new Player object (which extends JPanel) you are also creating a new JPanel, whether you add it to a GUI somewhere or not. If that's what you are asking.
But since you are extending JPanel, due to the way inheritance works, Player is also a JPanel and can be more or less 100% treated like one. Any methods that take JPanel as a parameter also can take a Player object, all methods that can be called on a JPanel can be called on a Player, etc. JPanel is itself the end of a long chain of extensions as well. If Player extends JPanel, then Player is also somewhere up the line a subclass of JComponent for example.
Does that answer the question or was there more to it?
When you create a new Player object it's also a JPanel. If you don't know about type-casting objects you can also turn a subclass object reference in to a superclass reference by saying something like Player player = new Player(); JPanel panel = (JPanel)player; And then you have a reference to a JPanel which is actually a Player.
You can also turn a superclass object reference in to the subclass reference if it is one with the same syntax. Though if the JPanel reference is not actually a Player and you say Player player = (Player)panel; you will get an exception.
If you really want to learn about OOP stuff like this I recommend just Googling it since there is a whole world out there on it: docs.oracle.com/javase/tutorial/java/concepts/inheritance.html en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)
The basic concept is relatively simple but there are just so many things you can do with it, it is ridiculous.
 
1:22 AM
HA thats plenty of information and definitely answers my question thanks so much!
and yes I understand casting and such
 
hi
anyone here?
jeremy, r u there?
 
Hello
 
How are you?
 
good
U?
do you know JDBC?
 
1:31 AM
I am doing fantastic and no I do not know JDBC what is it exactly?
 
hi radiodef
 
Java Database Connectivity?
 
haha you saved me
ya?
u do not know at all?
 
I only know what it stands for and nothing else sorry :)
 
do not be sorry , it is k
do you know whether anybody else is here?
 
1:33 AM
Well I was talking with Radlodef just a second ago
He may just be AFK for a sec idk though
 
it shows that he is online
what is AFK?
 
Away from keyboard...
Although over time its meaning has slightly changed
 
haha thanks man i learned something
oh k
so ill wait
 
So if one has a window opened instead of this one for example
 
for him , he may knows abot it
 
1:34 AM
they are afk from this window or this chat
 
oh gotta
so what was his name?
 
Radiodef
 
k
Hi Radiodef
r u there man>?
lemme post my question , i may get my answer faster
 
You probably will
I got banned from posting questions idk if its temporary or not but ya
Banned for asking a question that I could of looked up because someone reported me for that apparently...
 
1:56 AM
ok well I gtg bye guys
 
oh hi
What's up?
I don't know anything about JDBC either if that's what your question is about. Probably you should just post the question since not that many people frequent the chats.
Also see you Jeremy
 
hey radiodef
r u there?
 
yeah
 
 
1 hour later…
3:34 AM
hi..any1 here can help about easymock?
 
3:51 AM
Howdy folks
 
4:11 AM
@HashCoder Do you have any experience with unit testing?
How many instances of Eclipse does everybody have?
 
I use Netbeans. Should I switch? : (
 
I dunno.
I've tried Netbeans and I'm always impressed by how simple and easy to use it is. But then I love Eclipse because it's like a ridiculously gigantic Swiss army knife with tons of context menus and things. It pisses me off a lot though
 
There are some features I really hate about Netbeans, though the main one that bugs me is stupid.
 
I almost switched to Netbeans just because it has easier skinning for a dark theme.
 
The "clean and build" button is right next to the "run" button. So what happens is I put files in the build directory I am using to test the application since that is the default directory for file dialogs. Clean and build deletes them all. So sometimes I accidentally hit clean and build instead of run and I have to go copy all my files again.
 
4:25 AM
Visual Studio 2012 is the best for skinning
hehe
 
I learned that the hard way too. The first time I did it I had my resources in that directory only and I had to go back in Mac's Time Machine to retrieve them.
if I'd been on windows they might as well have been gone forever
 
They were just some cursors but I totally freaked out.
I was doing it wrong though so now when I clean and build by accident it just deletes stuff I don't need
But that actually annoys me enough I've thought about switching.
They seem like logic buttons to be placed next to each other but fact is one deletes files and the other doesn't.
 
The thing I like about Eclipse is that I'll be working on some code and think "I wish there was a shortcut for this". Lo and behold, it was right behind a submenu the whole time.
 
logical*
I read it can automatically insert imports and that sounds pretty tasty already.
 
4:31 AM
Yea the content assist is pretty slick.
Anyway, I always seem to end up with several instances of Eclipse because some projects are so finicky with the settings. I try setting stuff by workspace, but it seems like I end up needing a global setting at some point. So then I end up with multiple installs of Eclipse. Not tasty
Probably just a personal problem tho
 
Yeah wow.
Though sometimes I end up with so many source files up that I can see myself totally doing that. I discovered Netbeans can do a split panel but I haven't used it a lot yet.
My monitor is too small.
Wait you are doing that just for configurations?
That does seem kind of extreme. What settings are you wanting to change that it's important enough to have multiple installs?
 
1) for Android dev, so it doesn't really count, because it's totally different framework
2) for OOTB eclipse without any plugins so I can test little prototypes or bash out a quick utility or something
3) Spring Tool Suite for Java Spring MVC webs (it's Eclipse with Spring plugins and packaged with a different name)
4) Spring Tool Suite for hybris e-commerce platform - which I have to disable tons of validation so it actually builds correctly
I guess it's not that bad - only ~450 MB per install
still
 
Actually come to think of it. Netbeans lets you set the "main project" so that it's inconvenient to run any other project without using a side menu or something. Multiple installs would let me have multiple main projects.
I wonder if that is inconvenient to do on a Mac, I've never tried it.
Oh that was easy. You can just copy and paste the application.
Since OS X doesn't have all the registry stuff you can just make a copy.
 
4:52 AM
You can with Eclipse on Windows. It's all self-contained.
 
Ah but my new copies share a preferences file so it doesn't work on Mac.
 
 
1 hour later…
6:25 AM
I just spent way too much time browsing the source code for healthcare.gov...
 
Haha, how's it looking?
I feel like if I go try to log on there I am clogging the tubes and keeping others from being healthy.
I'm eating an apple.
 
Some guy got the code and put it on GitHub
 
Whoa
 
If you look at the first commit you can see the code before he had a chance to optimize it.
/app/js/ee/ is where most of the code is
for the lastest commit
anyway I'm going to bed
night
 
see you
What a mess. : /
That whole thing is crazy. Probably the first time in human history a country's new laws have been brought down on their knees due to bad software.
5
 
7:22 AM
@Omar If you want to help out, I'm all ears. Thanks.
Good morning everyone. I need help with Struts 2
 
Not something I know anything about, sorry. : (
Unless your problem is purely Java-related in which case perhaps I can but I've never used Struts 2.
 
@Radiodef, thanks for the response.
 
Ah no problem. Felt it was worth it to say I can't help over the case of it looking like nobody's actually here.
I hope somebody is able to help.
 
Well, hope so too.
 
 
5 hours later…
12:07 PM
@ItachiUchiha abhi ping me when you come online.
 
 
1 hour later…
1:22 PM
Good morning.
 
 
2 hours later…
3:02 PM
Good morning, Java
 
3:14 PM
Alright. Ima take the plunge and learn Maven.
 
user1125394
3:40 PM
should I
List<Point> r1 = new LinkedList<Point>(prefix);
or
List<Point> r1 = prefix.clone();
 
6
Q: Cloning vs. Instantiating a new class

OneWorldIs cloning good practice in this case? How to do it better? public ModelCollection startParsing() { return parseFeed(new ModelSpecialEntry); } public ModelCollection parseFeed(ModelEntry pattern) { ModelCollection modelCollection = new ModelCollection(); while( condition ) { ...

 
user1125394
hmm thx but more
 
user1125394
41
Q: How do I clone a generic List in Java?

Bill the LizardI have an ArrayList<String> that I'd like to return a copy of. ArrayList has a clone method has the following signature: public Object clone() After I call this method, how do I cast the returned Object back to ArrayList<String>?

 
prefix is not a List<Point>, so you're second example would fail anyway... ?:-|
prefix is a Point, right?
Oh never mind. I see
 
 
4 hours later…
8:02 PM
I see your Point
 

« first day (1098 days earlier)      last day (3844 days later) »