helicopter motion game* using matlab
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 11 de Abr. de 2012
http://www.mathworks.com/matlabcentral/answers/8026-best-way-s-to-master-matlab
Respuestas (1)
Geoff
el 11 de Abr. de 2012
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 =)
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!