animation - How can I smooth out movement transition in my Java RPG game? -
i created rpg scratch, motion choppy, expected, because moving terrain around character in 15x15 grid, each section beingness 50 pixels big , holding single texture. motion facilitated alter in coordinates followed rearranging terrain , refreshing frame. illustration of here:
for(int = 0; i<15; i++) { for(int j = 0; j<15; j++) { g.drawimage(imageofgrass, i*50, j*50, 50, 50, this); } } obviously, switch between grids not @ smooth because moving image across 50 pixels. create similarity game, pre-nintendo ds pokemon , zelda games come mind.
my question, then, this, followed minor question (if allow that): 1. there (somewhat) simple solution in java can slide image?
i have thought of creating animated gif show character moving, while in reality (or virtual reality, rather -- har har) avatar still on grid until gif finishes animation. expect choppiness this, though, refreshes.
if want create functional rpg game, should start?while researching, have found articles either simple ("here framework, knock out" sort of thing), or complex ("prerequisites ...."). while understand creating game of scope not simple , take time, much learn. in sense, objective not create completed project, larn code , programming associated it. ideally, want larn language existing framework, can go on build upon create own, unique game. junior , have reduced number of classes next year result of grades, hope, if not ambitious, can utilize time , have own running (not complete) game end of summer next year.
i apologize length of text, , give thanks time.
increment index, 'slide' image.
be warned:
computer programming realistic objects physics based. should considered function of time. if takes 500 ms go 1 grid tile another, , 200 ms have gone by, should 40% of way.
second half of question:
i start widgets. easy work, sets of functionality of game , going used often. there, work on sprites , behaviour models. after that, start working on hard-coded parts such quests, dialogue , cinematic. after create sound files. sort out legalities , create site , should go.
java animation movement
No comments:
Post a Comment