jInput, Actor Rendering, Music, and State changing

posted in Yar
Published September 24, 2005
Advertisement
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...
Previous Entry Flocking and state engine
Next Entry Main theme
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

!!!!!!!

671 views

MIDI Keyboard v1.7

1540 views

Yar.

1209 views

Orchestra Recording

1324 views

MIDI Keyboard v1.5

1459 views

Registration

1324 views

Ahhh!!!

1090 views

Um... yeah...

1076 views
Advertisement