helicopter motion game* using matlab

조회 수: 3 (최근 30일)
khurram
khurram 2012년 4월 11일
i am doing a project from my introductory CS course. i am to make game available online by the name of air transporter. frankly speaking i do not know all the ropes of matlab. i just want to ask that how should i get started. what functions should i make first? and an important one: i used to move a rectangle using the mouse user input during my labs. but how am i supposed to move a helicopter. i mean should i first introduce an animated image using the 'image' command, assign it a handle and then set it the same way or is there any other suitable method.
thanks for any help.
  댓글 수: 2
Walter Roberson
Walter Roberson 2012년 4월 11일
http://www.mathworks.com/matlabcentral/answers/8026-best-way-s-to-master-matlab
Jan
Jan 2012년 4월 11일
Using the standard upper/lower case makes the reading easier.

댓글을 달려면 로그인하십시오.

답변 (1개)

Geoff
Geoff 2012년 4월 11일
If your labs have had you moving a rectangle with the mouse, and if this same style of interface is required to move your helicopter, then I would say yes: you are probably supposed to replace the rectangle with a helicopter sprite and (if requested) animate it.
Supposedly, your course will teach you useful skills in your labs, which you then put together along with your lecture material and textbook readings to produce a completed assignment. You may have to do some additional research, but more likely you need to just sit down, work with what you have been taught, and figure out the rest.
It pays to just try things instead of ask if you should try. You are doing Computer Science which is inherently a discipline of patience, experimentation, innovation, stress and sleep-deprivation. Try things, be patient, and you might learn something unexpected.
Here's how I would start. Create an axis object, draw a helicopter frame to that axis (using image command). Keep hold of those two handles. Use get to look at the available members. Particularly 'Position' on the axis and 'CData' on the image. Yes, you can animate your image object.
Off you go! Have fun =)

카테고리

Help CenterFile Exchange에서 Number games에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by