Java Game Programming: Basic Lighting Tutorial

[ad_1]
We are creating a very basic light source using the Graphics2D class that comes with the JDK. We will need no libraries for this tutorial. If you have any questions or errors in your project feel free to comment and let me know! I will try to answer everybodys questions.

Support my Patreon –

Visit CodingMadeSimple for more exclusive tutorials and get the help you need to succeed as your very own indie game developer!

Follow me on twitter for exclusive content and interaction with me!

Follow me on Google+ to keep updated with all of my tutorials


Posted

in

by

Tags:

Comments

18 responses to “Java Game Programming: Basic Lighting Tutorial”

  1. Sven Arends Avatar

    This is awesome, but how could i implement multiple light source's?

  2. Notorious Avatar

    now it doesn't render my map?

  3. StinkFox Avatar

    that's a cool effect, but it decreases my fps

  4. namegenerator Avatar

    I'm doing a 2d game, i have a menu and a player class. When i hit the Arrow Keys, the player goes up, down, left and right, but the player image remains in the same position, without rotating.
    For example, i would like to go right, the player should rotate right.
    How can i do this using a sprite sheet?

  5. Nednarb 1986 Avatar

    What version of Eclipse is this? Some of the newer ones are a bit strange.

  6. Andrija Adamovic Avatar

    Can you make mouse hover over button event ,to be highlighted not clicked.

  7. [burek] Avatar

    Are you self taught?

  8. GNOOR1S Avatar

    I have been looking for something like this for the AWT and SWING libraries forever now! Thank you! Unfortunately I have already switched to opengl but a bunch of my friend's will need this

  9. NnikoG Avatar

    how long have you learned java? 😮

  10. Emmanuel Macias Avatar

    Would there be anyway to have the light follow the mouse?

  11. amit shrestha Avatar

    can you make a tutorial on how to make blood effects on floor like in your game so much blood…i have searched on google but i couldnt found it

  12. Marco30XXX Avatar

    What's that IDE you use?

  13. Tudor Lechintan Avatar

    I've been following your Java tutorials for a couple of months and they helped me a lot. But there are some things that I didn't understand:
    Why make instances of the Handler class whenever you are creating an object rather than making the Handler class methods and variables static?
    Why even handling input you loop through a list of objects when you can have variables that change when the keys are pressed, and thus the possibility of handling player movement in the tick method the player?
    Why use swing/awt packages instead of JavaFX? I tried both, and JavaFX has higher performance due to hardware acceleration and has more features and functionality than the other two.

  14. BigBang1112tm Avatar

    Oh, so it basically fade from 0 alpha to black, and the black is filled in the whole window.
    Thanks for this video, explained a lot for me.

  15. RealTutsGML Avatar

    Java Game Programming!

Leave a Reply

Your email address will not be published. Required fields are marked *