Java 2D OpenGL RPG Tutorial 4: Inventory

preview_player
Показать описание
In this video we clean up some of our code and we create the inventory system
Рекомендации по теме
Комментарии
Автор

"Actually, you know, it's gonna work, so I'm not gonna even bother testing it."

Engineer's famous last words ;)

BetterCoder
Автор

Just started watch these tutorials. So damn helpful, always wanted to make an RPG; thank you, Benny!

AlphaWolfSniper
Автор

great series so far, man. i hope to see more videos from you soon.

EatMyVariables
Автор

you might wanna give his other videos a watch before starting or going any further with this series, if you wanna know more about the openGL methods or before you start assuming any further that he doesn't "know" what they do, such as glOrthof.

EatMyVariables
Автор

Is there a better way than passing the Player to every item you add to your entity list. Because that's adding a lot of method calls and it's unnecessary if the Item itself takes in the player.

SmokeyAshesEDM
Автор

Do you think that later on you could do a tutorial on scirpted AI movement (for like cutscenes when you want an AI to follow a set path)

SergeantBalthazar
Автор

Could you make a tutorial on how to change the icon of the window? I found the method Display.setIcon() which I assume is it, but the parameter is ByteBuffer[] arg0, so I have no clue how to use that.

SergeantBalthazar
Автор

Hiya Benny for some reason when I walk over the item, now it just doesn't get affected at all and doesn't disappear or get added to the inventory. Any idea where I could have went wrong?

andrzejgieralt
Автор

Inventory.remove(Item) should call Inventory.remove(int) to reduce replication of code.

tabularasa
Автор

It would be much easier to inherit stats.

jazza
Автор

was hoping you would explain the openGL methods a bit further. you skipped important ones because you didnt know exactly what they did, such as glOrthof

es
Автор

The general convention is that size refers to the number of elements in some data storage structure, not how many elements the data structure can store. When talking about that, you probably should be referring to  the number of elements the structure can store as it's capacity.

Your "improved" addItem method is a great example of premature optimization-induced complexity AKA what not to do.

EDIT: Also, I really don't like these "let's make the code better!" videos in series. Yes, we want to have good code going forward, but my problem isn't so much with the idea as the individual videos that people make. It usually ends up being "So we're changing these things because reasons, " and then the viewer is left to understand, or not understand the reasoning behind these changes themselves. The big thinking that goes into what needs to change and why pretty much never is addressed, meaning these videos end up not really teaching people about addressing the problems in their own code so much as how to follow a series of instructions. Of course, that longer discussion is hard to have within a reasonable time frame, so maybe that's just the state of things.

seigeengine
Автор

dude you can just do item.name to get the item name

quickjab_r
Автор

java.lang.RuntimeException: Uncompilable source code - Erroneous tree type: gameobjects.Stats

Brandynka