Java Video Tutorial 58

[ad_1]
Get all the code:

As we continue to make an asteroid Java game, I show you how to make your space ship shoot.

It sounds like a simple concept until you realize the ship is shooting while it is rotating through space at an angle that may not be equal to the direction it is moving. Don’t worry, we’ll figure it out together in this and the next tutorial.


Posted

in

by

Tags:

Comments

33 responses to “Java Video Tutorial 58”

  1. Darren Murphy Avatar

    i dont know about anyone else but the ship doesnt move quite how you would expect it to, is this because of the way we set up movement to be calculated? im very new to programming so not really sure why my ship speeds up when im pointing the opposite direction, btw thank you for the videos, i decided to give the course im studying a break and follow your asteroids project, it has really helped me to solidify understanding the basics of OOP and how to create and use objects, i couldnt put it together in my head untill your videos, so thank you very much

  2. Ilan Lakan Avatar

    Fantastic content as usual, best chanel here!

  3. joeydb1 Avatar

    Hi Derek.  Your videos make for a great refresher.  I did a lot of Java for years but not recently.

    Anyway, I had a question as to programming style.  Why do you access GameBoard.boardWidth directly as opposed to making it private and building a getGameBoardWith() accessor method?  Is there a good general rule of thumb for that difference?  Is there a performance hit for using an accessor method vs. a direct object reference?  Thanks for all of these videos.  They are excellent as always.  -Joe

  4. עמית בנאיש Avatar

    hey derek , im a trying to build a game and having trouble with the class diagrams , can i get the uml for your project ? i dont want to download the code .

  5. NubPaws Avatar

    My math teacher should thank you. I am at high school (10th grade) and we are studying trigonometry, a few weeks ago someone asked my teacher before the class ended "Why are we studying this if we will never use it?" and I say "Yeah I know I can live a full life without knowing this", of course my teacher gave an example of how people could possibly calculate a zip line length but it was still useless to me. Now after I have watched that video I will go tomorrow and tell her thanks :D. It is still funny as hell how things turned out.
    Also what book have you learned Java from?

  6. Derek Banas Avatar

    Thank you very much. Your comment made me smile. I'm glad I am able to fill in for your terrible teacher. It is a shame that bad teachers are able to keep their job. Always feel welcome to ask questions and make requests 🙂

  7. PerhapsOOTMM Avatar

    I wish I would have had you as a teacher in high school; my computer science teacher just thrust a book at us the first day and essentially told us to go through it on our own. If we had trouble, we had to ask other students for help as the teacher generally chastised us for not taking the initiative to figure it out on our own. Why I stayed in it for three years, I will never understand.
    Also, thanks for your python tutorials; I can really solidify the basics of the language with those.

  8. Derek Banas Avatar

    Java is pretty smart about collecting garbage after something is no longer of use. I haven't seen an issue for a while

  9. bagok701 Avatar

    Garbage Control. I was curious if it would have to be put into the main game loop or if an object can kill its own reference setting itself for garbage control.

  10. Derek Banas Avatar

    I'm not sure what you mean by GC?

  11. Derek Banas Avatar

    If you like making games my android tutorial will cover them in depth! It is going to be a fun couple of months 🙂

  12. arthurmee Avatar

    That's great news db. I know . . . we're all crazy about game coding LOL, but it's such a fun way of learning a programming language. Looking forward . . . 🙂

  13. bagok701 Avatar

    Can PhotonTorpedo class set itself eligible for GC when it is off screen?

  14. Derek Banas Avatar

    Thank you 🙂 Yes I will be doing both. Thank you for the request. I'll be making many video games. This is just the beginning

  15. arthurmee Avatar

    Superb tutorial once again. Thank you. I wonder if you are planning to demonstrate methods for introducing bitmap images and sound into your game?

  16. Lazic B. Avatar

    I'm not speaking about machines too. I'm just saying you can use localhost for testing, you know what localhost is? You will use thread's so you can receive a fresh input's from server and in same time to type a new message or scroll through the incoming messages.

  17. Shreyas Rane Avatar

    Thanks… ill be waiting … Please give a networing introduction before that like what is TCP/IP
    Ports server client etc …

  18. Shreyas Rane Avatar

    I am not speaking about machines … im testing on the same machine … but i want two clients to connect to the same server and exchange messages via server … Is Thread Compulsory for multiple clients ?

  19. MusicalSawMen Avatar

    Gold Medal for this video !

  20. Derek Banas Avatar

    I'll cover Java networking stuff very soon. I was planning to demonstrate exactly what you are trying to do

  21. Lazic B. Avatar

    No, just one socket. Use localhost to test client and server on one machine. Also, it would be smart if you use thread's.

  22. Shreyas Rane Avatar

    Hey ive a big problem
    I made a chat messenger using java that can communicate on client with one server.
    But suppose i want two clients to communicate with each other via a common server how will i do it ?
    Means Client A sends the message … Server Recieves it and sends it to Client B .. vice versa ..Do i need to make 2 server Sockets????

  23. Erik X Avatar

    Great video as usual 🙂

  24. Derek Banas Avatar

    Yes, making games pretty much comes down to trigonometry. Thank God for the Greeks 🙂

  25. Derek Banas Avatar

    Thank you. By the time I'm through everyone will be able to make any game they can imagine

  26. Lazic B. Avatar

    No problem. Thank you for sharing us your knowledge.

  27. Derek Banas Avatar

    I'm glad you liked it 🙂

  28. nextblain Avatar

    this guy is legit as fuck

  29. Lazic B. Avatar

    ——
    I
    I
    I
    f_ _ _ _ :))))))))

Leave a Reply

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