• Content count

  • Joined

  • Last visited

Community Reputation

131 Neutral

About Shabadoo

  • Rank
  1. JLabel is an easy way to get an image on screen, not the best if you are trying to make a game. Which leads to the question, are you wanting to make a game or learn how to do fast 2D graphics in Java? If it is making a game, download Slick and go for it, otherwise go here for a start on speeding up your 2D rendering
  2. Had to do LDAP auth from a web app just the other day where we are also using Active Directory. I ended up using jCIFS which was amazingly simple to get up and running. If SmbSession.logon() does nothing, authorisation succeeded, if it does anything else, authorisation failed. log.debug( "attempting login - uname = " + usernameText + ", pwd = " + passwordText ); try { UniAddress dc = UniAddress.getByName( "" ); NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication( ";" + usernameText + ":" + passwordText ); SmbSession.logon( dc, auth ); log.debug( "LOGIN SUCCESS" ); passwordText = ""; authorised = true; } catch( Exception e ) { log.debug( e ); log.debug( "LOGIN FAILED" ); passwordText = ""; authorised = false; }
  3. Java problem

    Just a thought, but it might be better to learn Java programming first, then move on to Java game programming. Find a good book, or start with some of the tutorials on the Sun website.
  4. Have you looked at using synchronized methods or synchronized blocks of code?
  5. Putting the JOGL jar and libs inside your JRE/JDK is "a bad idea"(tm). This can cause things like webstarted applications to not work properly, version conflicts, etc. Its best to keep them separate and add them to whatever project you are working on using the IDEs jar import for your project. Cheers, Brett
  6. [java] Java disadvantages

    Quote:Original post by shamy ... java programs are alot slower then the programe being developed in c++ eesh... do we have to go over this again? C++ is faster in some cases, Java is faster in others. If you like Java use Java, if you don't, use C++ (or Python, C, VB, Delphi, COBOL, etc). Quote:Original post by shamy and where is java language best used? Everywhere, of course(*). Cheers, Brett (* This opinion may not be relevant to the real world)
  7. Atmospheric Scattering

    Hi all, I have also been playing around with atmospheric rendering and I think I have figured out the HUGE sun problem. I have noticed that in most sample code the in-scattering is calculated the same way for both aerial perspective and sky colour. From what I have read of Preetham's papers (including the gdmag article) the in-scattering terms are calculated differently, as follows... (apologies in advance for the ascii equations) In-scattering for aerial perspective: Lin(S,theta) = 1 --- * Esun * Bsc(theta) * (1 - e^(-BexS)) Bex In-scattering for sky colour (i.e. THE sky colour): Edit - replaced ascii with image The difference in the result of using the sky colour equation instead of the aerial perspective equation can be seen in the following screenshots: Sky using aerial perspective: Sky using sky colour: Now all I need to do is figure out why my sky is black no matter where the sun is... Cheers, Brett [Edited by - Shabadoo on April 9, 2007 3:51:32 PM]
  8. Spherical Worlds

    This site helped me when I was looking at warping a cube into a sphere: link Cheers, Brett
  9. I have a working example of GLSL & FBO shadow mapping here. Maybe it will be of some use to you in figuring out whats going on in your code. (Note: It's in Java, but you should be able to tell what's going on) Cheers, Brett
  10. Quote:GKW Member since: 6/5/2000 From: MN, United States of America - Soon to include Canada United States of Americanada? "Howdy y'all, I'm from Americanada, eh?"
  11. First of all, two things. 1. Class names should begin with a capital letter 2. Unless you REALLY have to, don't call your classes the same as ones already in the API import java.awt.*; import*; import javax.swing.*; public class ImageTest extends JFrame { private ImageIcon logo1; public ImageTest() { logo1 = new ImageIcon("player.png"); getContentPane().setPreferredSize( new Dimension( 200, 200 ) ); pack(); setVisible( true ); } public void paint( Graphics g ) { super.paint(g); g.drawImage( logo1.getImage(), 10, 50, null ); } public static void main(String args[]) { ImageTest test = new ImageTest(); } } Cheers, Brett
  12. This site should give you a good start Cheers, Brett
  13. One word... errr, acronym... JAXB Cheers, Brett [Edited by - Shabadoo on October 31, 2006 9:31:28 PM]
  14. Heightmapping a sphere

    Gotta love the internet. I spent my weekend trying to turn a cube into a sphere (with not very pleasing results) through trial and error and very little maths, then browsing Gamedev during my lunch break on Monday I find exactly what I need.
  15. Wherever you are accessing the ArrayList do this (where theList is your ArrayList): ... synchronized( theList ) { //loop through the list } ... ... synchronized( theList ) { //Add an element to the list } ... etc. That way, only one section of code will be allowed to use the ArrayList at a time. If responsiveness for adding and removing items is a priority, then you will have to clone the list in a sychronized block. After you have cloned the list, release the lock and print it out so adding & removing can continue elsewhere. Cheers, Brett