Page 1 of 1

Troy's Code - help for Java Programmers

PostPosted: 12 Mar 2012, 21:37
by Sebastian_Troy
Troy's Code

Latest source code, updated regularly(30/03/2012): https://github.com/SebastianTroy/Troy-s-Code/zipball/master

This project is designed to help any java programmer, from beginners to code guru's.

It is a code base, a number of files on top of which you can build your own program.

It aims to be as simple as possible and to get you working on the heart of your idea as quickly as possible,
it takes care of all of the base programming for you. Once your project is running it is then easy to go through
the source code and fine tune it. All of the class files are clearly separated as to their specific function.

It is completely open source, under the MIT license.

It is completely documented, and I am more than willing to help you out wherever possible,
and to improve the documentation.

There is a detailed tutorial on how to get started.

There are no screen shots, as a JFrame running a sub routine is only so interesting on its own!

Links:

This is the project's blog, which has links to:

- a direct download of the source code,
- my email so you can contact me,
- the project's Github Repository and
- the project's wiki.

Enjoy http://troyscode.blogspot.com/

Re: Troy's Code

PostPosted: 12 Mar 2012, 22:35
by DangerOnTheRanger
Is this only intended to work for 2D games? And also, does your library support hardware-accelerated rendering?

Re: Troy's Code

PostPosted: 12 Mar 2012, 22:49
by Sebastian_Troy
It is not only intended to work with 2D games, but it currently assumes the user wants to use Java's own graphics to render everything.
I would like to keep the source simple so I am planning on copying the project and modifying the copy to render with openGL.

As for hardware accelerated rendering, I assume you either mean does it support BufferedImages - yes it does, or you want to use openGL - this version could be converted to work with openGL but it might take some tinkering on your part as I haven't done it yet!

Also note it isn't actually a library, whenever you start a new project you copy in the source code and work from it as a base!

Thanks for the interest!

Re: Troy's Code - help for Java Programmers

PostPosted: 25 Mar 2012, 08:28
by Tuxide
I'm not too sure what this is, but if this is a Java project then you need to look into using something like Maven or Gradle.

Re: Troy's Code - help for Java Programmers

PostPosted: 25 Mar 2012, 19:07
by charlie
Tuxide {l Wrote}:I'm not too sure what this is, but if this is a Java project then you need to look into using something like Maven or Gradle.


Oh-ver-kill.

Dedicated build systems are worthless until a project becomes significant.

Re: Troy's Code - help for Java Programmers

PostPosted: 26 Mar 2012, 00:30
by Tuxide
charlie {l Wrote}:Oh-ver-kill.

Dedicated build systems are worthless until a project becomes significant.


Well then how do you expect people to run it and see how it works? It looks like this is supposed to be used as a project archetype, so unless I'm missing something here, I took a few looks and this just doesn't seem very useful right now because I would have to set my project up myself.

Re: Troy's Code - help for Java Programmers

PostPosted: 26 Mar 2012, 00:45
by charlie
The author can compile it and present a .jar which people can try out.

Or you can download it and set it up in Eclipse or your favourite Java editor or compile it with javac.

My impression is this is meant to be a simple way to get a new Java project moving. No messing around. Maven *shudder* does not fit that bill.

Re: Troy's Code - help for Java Programmers

PostPosted: 26 Mar 2012, 01:42
by Tuxide
charlie {l Wrote}:set it up in Eclipse or your favourite Java editor


That's what Maven/Gradle are supposed to do, try mvn eclipse:eclipse.

charlie {l Wrote}:My impression is this is meant to be a simple way to get a new Java project moving. No messing around. Maven *shudder* does not fit that bill.


Yeah, this is an archetype, like I said. I don't know about Gradle, but Maven totally fits the bill. This is a project template, and Maven lets you generate new projects from project templates.

http://maven.apache.org/archetype/maven-archetype-plugin/

I just don't see your argument against using something like this. These aren't build tools (not like Ant anyways), these are project management solutions. Whenever I do a new Java project, especially for projects I want other people to be able to use or contribute to, I always start off by writing my project descriptor for whatever project management tool I use. Then I generate my project files so I can import it into my editor.

I'm not saying he should make a tool like Maven a requirement for his project and all its derivatives. What I'm saying is he should look into using a tool like this so he can make his archetype more accessible to Java programmers. If you don't like Maven yourself, then fine, you can still copy/paste his code into your own project. But not even telling us what dependencies you need (or if there are any) is bad enough.

Re: Troy's Code - help for Java Programmers

PostPosted: 26 Mar 2012, 19:10
by Sebastian_Troy
This project is so simple its intended that you simply copy and paste the .java files into your project directory (or workspace in eclipse). I'm not sure Maven or Gradle are, but they do sound like a bit of overkill...

Also I'm going to be uploading an updated version soon, I have simplified the inner working of the TComponents, and any projects using old versions of Trpy's Code should copy and paste the updated files over the old ones, most of the changes are to internal functionality, so there should only be a couple of compatability issues, which will be very apparent and not at all difficult to fix!

Hope this is helping people!