Jump to content
  • Advertisement

Yar

Sign in to follow this  
  • entries
    208
  • comments
    383
  • views
    66183

jInput, Actor Rendering, Music, and State changing

Sign in to follow this  
H_o_p_s

108 views

I have started on getting jInput integrated into my program as another input, and it isn't going so great... For those of you that don't know what jInput is, it is an API for connecting gamepads and the like to a java application. This means that I will be able to hook up my USB game controller and use those commands instead of keyboard and mouse. I realize that not everyone has/wants to use a USB gamepad, but it is another thing that will add to the overall quality of the game.

I've got actor rendering done. This was pretty simple, but keep in mind that the actor animation isn't done yet, so they are just stationary. The cool thing abput actor rendering now is that the size of the graphic doesn't matter, it will automagically render centered over the tile. This means that you can create a wall that spans 6 tiles, and only use one graphic for it. The other tiles would then contain the 'no-pass' actor that would block other actors walking through it. It also means you can have really fat characters. Um... yeah, isn't that neat...

I got mp3, wav, and midi playback working, I was hoping to have ogg, so maybe later down the road I can add that to it. The sound classes still need a little bit of work, so far you can only play/play-random/loop/stop the audio files... there needs to be fade in and out, volume control, and time control functions also.

The state engine can now actually change between states during gameplay. So now when I hit '4' it changes to the titlemenustate and when I hit 'new' it goes back to the teststate which currently renders my tilemap. Each state has a few functions such as update(), render(), init(), and dispose(). Init() is where you load things like graphics and internal objects, and dispose will remove those graphics/objects fromt the object caches so that it frees up memory. Without disposing of the graphics in the cache, they just stay there because they are collected, so we manually dispose of them after a state change to save memory.

Flocking is almost working now... it just won't update the screen everytime that it needs to. Some little bug hiding somewhere that it preventing it... arg!

Anyway, I'll see if I can't get a flocking test image up before tonight...
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!