Whats that empty square on the UI sidebar you made going to be for?
Whats the memory usage of it? Its not still Java is it?
Printable View
Whats that empty square on the UI sidebar you made going to be for?
Whats the memory usage of it? Its not still Java is it?
The empty square will be for weapon power.
Memory usage is my main problem now; it varies anywhere between 30 and 120mb, with 30 being startup, ~80mb early in the game, and 120 after ~5 mins of play. I don't know where all of that is coming from, but I've been trying to find out.
And yes, it's still in Java.
Wtf 30mb? My C++ games only use 6kb.
Are you loading the images every frame or something crazy?
What can I say? I know next to nothing about how the stuff I'm loading is being stored. There probably are hundreds of copies of all the images floating around in the memory.... but then again that's what I've been trying to solve for the past week now.
I'm guessing theres a render or paint method used to display the bitmaps right? In there, does it load the physical file into a variable then renders it? That would be your problem, it keeps making new variables with the picture but doesnt clear the bitmap after use.
Unless something is going horribly, horribly wrong, the images should only be being loaded once and then stored in a map for later use. Given that the size of the collection of images isn't growing (at least according to outputting its size to the console) unless something actually needs to be added to it, I'd think that isn't the case.
Hmm, when you "render" it, are you sure you clear it first? Maybe its just increasing the size. I'm not too sure how games are dont in Java. If this was C++ I'd be sorted.
Make a unique game afterwoulds man, use your 3D models for renders, optimise, make into a sprite sheet and get the animation frames from max renders.