Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 25 Jul 2012
Offline Last Active Aug 22 2012 06:13 PM

Topics I've Started

Resource Loading manager. Onto memory or not?

16 August 2012 - 02:36 PM

Since I don't mind reinventing the wheel for the sake of learning something I've been working on a small engine/framework as a foundation to work on some simple games. When I was working on my imageLoading manager (part of the resourceLoading bundle), at the moment I have it set up in a way that once a image is loaded, its temp. held (in memory) by the program as long as its running. If a call asks for an image that hasn't been loaded yet, it does so, else it returns the copy that was loaded and stored in a hashmap (which essentially is in memory).
I've also done pretty much the same for my audioResourceLoading manager.

Now what I'm thinking of implementing down the road is that the imageLoading manager only holds image files that are under a certain size or animations (other things like static backgrounds can be reloaded if needed).
And as for the audio, if its sound effects its pre-loaded onto a clip and therefore its held in memory. But for large audio files like background music, I'm thinking of maybe streaming it and buffering it so that its played as its loaded, with a sourceDataLine.

One thing I'm wondering is, I know when i load an image and an instance is presenting it on the screen (using it as representation), its being held in memory. Now if I'm putting a copy of it in a hashmap will that copy be in memory as well? or is it using the same memory space as the first one that was loaded? Same goes for when I create other instances that use this same image as a representation. Does anyone know?

And yes I know tools like Slick2D handle all this resource loading stuff for you (or so I've read), but I'm mostly doing it for the learning experience. For example to get that audioLoader going I learned a great deal of the sound API.
So yeah, just wanna hear some thoughts on this. ;D

can someone tell me what art style was used here?

25 July 2012 - 05:45 PM

I'm adequate with graphics, drawing and art in general But I'm no artist. I'm more of a programmer. Which is why I'm wondering if someone in this forum could tell me if they can tell what it would take to make something like this:
Posted Image
Sorry if the image is too small but its off the internet. I like this art style very much for a game I intend to make. I'm wondering what this art style would be called. And/or if for example a 3D model was made and then flattened into a 2D sprite to get this. Any input would be appreciated.