Entity ArayList (Render Order Revised) - How to Make a 2D Game in Java #21

Channel:
Subscribers:
24,000
Published on ● Video Link: https://www.youtube.com/watch?v=eNlcG1v0ofY



Category:
Tutorial
Duration: 16:38
9,800 views
244


In this video, we will handle render order. We create an ArrayList and put all the entities in it. We can sort the order of the array by entities' worldY position and draw them one by one.

My previous video had a flaw in the code so this is the updated version.

Thank you Sunshine for pointing out the issue!

If you want to use my asset (images/maps/sound) that are used in this tutorial, here's the link:
https://drive.google.com/drive/folders/1OBRM8M3qCNAfJDCaldg62yFMiyFaKgYx?usp=sharing

*I'm releasing my art/music/sound effects to help your smooth learning with this series. If you wish to use them to create a public content (profitable/non-profitable), please contact me via Twitter or email. Both links are in the About section of this channel.

Thanks for watching.

Timestamps:
0:00 Why I deleted my last video
1:48 Switching from SuperObject to Entity
6:48 Creating an ArrayList of Entity
9:52 Sorting the order of the ArrayList
12:04 Drawing entities from the list
15:05 Final result

#javagamedevelopment #javagametutorial







Tags:
java
javatopdowngame
javazeldalike
javaactionrpg
javarpg
arraylist
entityarraylist
renderorder