a million thanks from this poor kicked dog here, look man i can code games its just this is my first day with java. give me a break, ive read up on polymorphism and everything now, its just I have to finally do the typing in and im a little shakey, but ill get there.

Unfortunately I dont have a book to read about it, all I have is the net, so im looking for a tiny bit of help to get me started.

another thing...please can you tell me the way to write this out in java properly?

Ok I got how to use an array of classes now, you have to construct them one at a time.

But dont you think its a bit overkill to put set vector inside the vector class? because how much ram are you wasting!Is there a quick struct you can use instead of a full class... or is using classes in this way fine? (i mean for vectors, especially when theres lots of them)

But dont you think its a bit overkill to put set vector inside the vector class? because how much ram are you wasting!Is there a quick struct you can use instead of a full class... or is using classes in this way fine? (i mean for vectors, especially when theres lots of them)

No that's not very wasteful at all, in any language that I know of. It is indeed a bit faster in C to use a struct, but in Java absolutely everything except primitives are objects. That means that structs don't exist in Java at all.

Ah thankyou for clearing that up for me, both Demonpants and Roquen. There doesnt seem to be such a thing as a static array either, everything has to be references.

Heres my little demo program in full so far (if you have the time to look, if not dont worry about it), all it does is render flat 2d triangles to the screen, can you tell me anything I could do to improve it?The next thing im implementing is a rotating cube, after I get the basics of the 3d matrix and vector maths into it.

tens of things could be improved, here the two first I have seen : in your main loop you should not do a fixed pause ( like the Thread.sleep(16) you do ) dont call repaint() rather do something like draw ( this.getGraphics () )

Frankly having your own 'style' may be fine and well, until you are doing teamwork or go for a job application. Then you may have to struggle to re-adjust.. Taking an individualistic view of this issue seems shortsighted to me. These are basic things that are there for a very good reason: making code more readable to yourself and to others.

@rouncer: Seriously, naming conventions make a lot of sense, that's why they're used. A few seconds formatting and commenting code now can save you hours of trying to understand/remember what your code does in a years time (I speak from bitter experience!).

Depends on what you mean by "all there is for web..". JavaScript is becoming more and more viable (esp with HTML5) for instance, and then you can use a prototype based model instead of OO.

1

kiss_my_wammy = true;

That's the GNU coding convention. And again, in the java convention it's:

1

kissMyWammy = true;

Both of which require the same number of shift presses , but the java convention requires less characters. But seriously I think the main thing that people like to see is: capitalized first letter of type defines and lower case first letter of variables. Having variables defined using the GNU convention won't make your Java hard to read, but using lowercase class name will.

If you're asking for help, the less time it takes someone to figure out your example will result in more responses.

Alright im sorry... I dont *hate* oo, its just I know heaps of ways around it so I kinda never learnt it... I could tho, and its kinda ok... sorry sorry, i dont want to make myself unwelcome here. sorry again, oo is great...

I just never space between symbols either, and I only use spaces for tabs, cause otherwise your program reaches the other side of the screen and I hate that.

Like I appreciate the help, I really do, without your help I wouldnt be as far as I am now... besides I've got another question.

So, I've got a projected cube, no near plane clipping at this stage although my triangle rasterer is allowing outer screen triangles to draw without boundary problems.

Now, id like to add a camera that'll spin around the cube... ive got all my maths matrices set up, its just I've got one problem, the only mouse and keyboard library I've seen is really basic... I mean the keyboard is delaying to the bios setup and the mouse only activates when its over the applets window... Is there a way to get global control of the input? Because you cant really control the program very well with what I've looked at so far.

Also, its a real pain that it doesnt detect keyboard until you click the applet window... what does everybody else do here?

Alright im sorry... I dont *hate* oo, its just I know heaps of ways around it so I kinda never learnt it... I could tho, and its kinda ok... sorry sorry, i dont want to make myself unwelcome here. sorry again, oo is great...

I just never space between symbols either, and I only use spaces for tabs, cause otherwise your program reaches the other side of the screen and I hate that.

Like I appreciate the help, I really do, without your help I wouldnt be as far as I am now... besides I've got another question.

So, I've got a projected cube, no near plane clipping at this stage although my triangle rasterer is allowing outer screen triangles to draw without boundary problems.

Now, id like to add a camera that'll spin around the cube... ive got all my maths matrices set up, its just I've got one problem, the only mouse and keyboard library I've seen is really basic... I mean the keyboard is delaying to the bios setup and the mouse only activates when its over the applets window... Is there a way to get global control of the input? Because you cant really control the program very well with what I've looked at so far.

Also, its a real pain that it doesnt detect keyboard until you click the applet window... what does everybody else do here?

Don't worry, nobody thinks you're a jerk or anything. And you're not going to make yourself unwelcome by having an opinion. People here just like to debate, especially about programming. And we all love Java and OOP, so there you go.

As for good keyboard and mouse input, check out the JInput library.

PS - I know "heaps of ways around OO" too, but there's a reason to use OO. I could use lead-based paints, mashed berries, or animal blood to paint my walls, but I think I'll still stick with acrylic paint.

Comes out just as professional as any "overdeveloped" framework, you guys spend so long organizing objects nothing ever gets done.

Frameworks make code reuse easier, and they provide solutions for common problems. There is no point in writing your own form input validation for websites when 1000 better implementations already exist. There is also no point in every company writing their own linked list implementation.

You might want to read Code Complete, it contains some information on this type of programming concepts.

The problem with global mouse/keyboard input is, that you won't be able to use it without signing your applet and getting a scary security warning the user has to accept. You probably get a malware warning from antivirus software, since global keyboard input enables global keylogging...

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org