Powered By Blogger

Wednesday 13 April 2011

Changing the code to work in my favour.

Funatti's code is great but I wanted to make it my own by changing the quality of the background, as the previous background has lines and colour that I did not like.

  • I am working on using the import image process that worked so well in my previous wallpaper code. and using that as my background.
  • In doing so I ran into the problem of having to resize, I looked this up in the reference and was able to successfully resize the image to the dimensions of my application.
  • However Now I have the issue of the background flashing in the first frame of animation then completely disappearing altogether. I have a feeling this is because of the class function that I am using but it is a bit out of my depth so I am seeking help from tutors at this point.



The other aspect I am looking to change in the code is the interaction.

  • I have looked at getting rid of functions that I will not need due to the mouse function that will have this information in it already. I have deleted void draw in the class and replaced it with void mouse, which draws the shapes and also alters the shapes according to how far away the mouse is.
  • Next I was unhappy with how big the circles got when the mouse was so far away. So Luke informed me of a constrain tool, which is incredibly simple and straight forward! :) So slotted that in place.


Another observation I made was when I switch the code to P2D, the animation slows down considerably and doesn't seem to cope, I thought that in switching to P2D this would help with the background image and the general run of the code, but I am not entirely sure I have defined it in the right area(s) or I have a feeling I have two opposing definitions for what the background should be.

NEXT STEP: To add sound that links in with the interaction of the mouse.

No comments:

Post a Comment