Episode 21 - Texturing Walls, Fixing Clipping, and Fixing the Mouse :: 3D Game Programming in Java

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
2,853
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jan 28, 2012

Episode 20: http://www.youtube.com/watch?v=RxE2k7UjW_4

Welcome to a series of videos where we will create a 3D game (probably a first person shooter) from scratch, using just the included libraries in Java 1.6. If you have any questions or problems, leave a comment or send me a message, or tweet at me.

In this tutorial:
How to add textures to walls
How to clip correctly via the Cohen-Sutherland algorithm
How to detect mouse speed

Twitter: http://twitter.com/#!/thecherno
Facebook: http://facebook.com/thecherno
Livestream: http://www.twitch.tv/thecherno

Tags:
3D Game Programming Development in Java Texturing Walls, Fixing Clipping, and Fixing the Mouse java tutorial how to make games first person shooter fps from scratch "how to make games in java" "java game making tutorial" "java programming tutorial" java development kit jdk eclipse ide minecraft code notch "Java (programming language)" "First-person Shooter"

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (TH3CHERNO)

  • Instead of MouseSpeed *= -1 you should do MouseSpeed = -MouseSpeed

    It's a lot less cpu intensive as the second line of code only changes a single bit whereas your line of code does so much more when it's not needed.

    Love your stuff, Andy

  • @karrotsrkool That's a good point; I didn't of that at the time. I guess I just wanted to clearly show the process of converting a positive into a negative (or vice versa), i.e. multiplying it my -1. :)

  • Great vid's dude, when you sneezed by ears were RIP via HeadPhones lol

  • @ismailzd Hey, I did warn you with that annotation... :)

Top Comments

  • regarding level making: i saw i notches prelude of the chambered timelapse, he made levelmaps using rbg values. think you can do something like that?

  • *looks at description*

    *clicks like button*

see all

All Comments (48)

Sign In or Sign Up now to post a comment!
  • @Williaml9518

    The code in my last post is considered a robot. because, it actually moves the mouse pointer to a spot anywhere on the screen, even outside the jframe window. When I use this method... it actually moves the mouse back across the screen to the right.. which causes the game view to move back to the right.

  • @MrPixelatedCoder Try it yourself.

  • @stygiostergmail what robot?

  • 9:38 WAHPOOA!

  • Very good job on this video sir, wen does next part come?

  • The videos are awesome. I hope I'm learning a lot. Thanks! Does anyone have anything good for the mouse look. The robot option doesn't seem to work well. This is what I have for moving to the left. I stopped here because there must be a better way.

    public void mouseMoved(MouseEvent e) {

    MouseX = (int) e.getX();MouseY = (int) e.getY();

    if(MouseX <= 100) {try {Robot robot = new Robot(); robot.mouseMove(Display.WIDTH/­2, Display.HEIGHT/2);

    } catch (AWTException f) {f.printStackTrace();}}}

  • for an express episode you should do the prone action, i did it in about 2 minutes :D

  • Loving these Tuts, very usfull :D

  • 209 likes and 0 dislikes, congratulations!

  • Yey i gave like nr 200 :P

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more