Jump to content
  • Advertisement

mackattac

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

109 Neutral

About mackattac

  • Rank
    Newbie

Personal Information

  • Interests
    |programmer|
  1. So something like this: for(i = 0; i < SPHERE_NUMTRIANGLES; i++){ object = CreateObject(screen,&sphere_model[i],SPHERE_NUMTRIANGLES); //save each object into the list list_addfirst(list,object); and now I just need to iterate through it and draw it?
  2. Ah I see it just runs it three times it doesn't actually go through the list.   So I guess there is something that I have to do within the iterator function then?
  3. I think I am getting close, however I have some trouble connecting it all, my plan was to: 1. Create the list. 2. add the balls to the list. 3. Run the animation once everytime the list iterates.   The code looks something like this:  list_t *list=list_create();  list_iterator_t *iter;  list_addfirst(list,ball); list_addfirst(list,ball); list_addfirst(list,ball); list_size(list); iter=list_createiterator(list); for(i=0;i<=3;i++){ list_next(iter); BouncingBalls(screen); }   Where the bouncing ball function is the animation, and the ball variable is the physics of and properties of the ball. This almost works except it only spawns a ball when I attempt to close the window of the compiler.
  4. The actual functions are given by the assignment and I need to use them, I have simply input the code into each of the functions, so I need to use the iterator unfortunately.   But yeah I think I get it, thanks for the tips.
  5. So i got this assignment which I feel i've made some progress on but I am currently stuck and hoping some kind soul could help me get unstuck.   http://imgur.com/a/XQ1vx is a picture of the assignment.   The part which I am struggling on is connecting the actual list and the bouncing ball animation and a part of the list I am pretty sure is not working correctly but not sure whats wrong.   Code is here: https://gist.github.com/anonymous/07151a2542db16a0fe9bc453351387d6   Any pointers would be appreciated!
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!