How to insert an image in a GUI and have it move according to a small moving matrix's location
3 views (last 30 days)
Show older comments
I am creating a code for a class that requires a spaceship to move throughout space (a matrix). We have created randomly spawning asteroids. If the spaceship crashes into an asteroid the game is over. The user can also change the spaceship's speed and direction after every 30 iterations. Currently, our GUI is black with white blocks spawning as asteroids. The spaceship is also a white matrix. We need to input an image where the spaceship matrix moves and an another image where the asteroids appear. I'm stumped on how to do this. Thanks.
2 Comments
Jan
on 26 Apr 2018
I cannot follow your explanations after the first sentence already: "a code for a class that requires a spaceship to move throughout space (a matrix)". A class requires a spaceship? What is "a matrix"? Later on you mention, that the "matrix is white". How can a rectangular set of numbers have a color? What does "input an image where the spaceship matrix moves" mean?
The current description is far too vague to understand, what you are doing. In addition you forgot to ask a question. How can we help you based on the given information?
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!