Van B,
first off thanks for the code, it is great to put this into an archive for future use... Once I understand it thoroughly that is... It has some of the pitfalls that so much of the other dbpro code that I have seen and tried to make sense of has.. #1.) Not documented well enough with comments.. #2.) Alot of the variables have meaningless names, which makes it extremely hard to follow what is going on.. #3.) It has bugs in it, like phantom balls, that have once been removed, but for some reason are still seen as being there, so my best guess is that they were for some reason not removed from the arrays correctly, now granted 99.9% of the time it works as it should but I did notice it acting up on like 3 balls that were no longer there.
I already have a complete working game I coded in GM 8.0 btw.. I am now trying to re-do it using Dark GDK, but the DbPro code is fine, if I can use / understand it, so I can convert it over... The main 2 Things I am trying to figure out is: #1.) I have the player arrow rotating already, and all the walls / elevator graphics displayed properly on the screen, and I already have the ball images loaded. So I need to figure out how to limit the rotation angle on the player arrow, so that it can't turn past 90 and -90, I guess the easiest method, would be to make 2 turn functions one for left and one for right, so I can then just check the angle for which key is being pressed and move if not 90/-90 if it is 90/-90 then don't move just return... Ok, so I solved that one on my own..
But, the other, is the way I am organizing the game is simply like this, when the player hits the down arrow launch the ball, starting from the player arrow tip, moving upward until it collides with another ball / wall / elevator, and when it collides with walls just reverse the horizontal direction, when it hits the elevator figure out the correct hex offset to position the ball snapped to x&y, and do the same on collision with another ball, with another function call checking for combos, which is simple I can do that, but for your info, my ball graphics are 40x40 so each grid spot Y will be Y/40*40 and the X will be based off of the Y MOD 2 to see if we are on an even row, if so, then offset the X += 20;
So I am somewhat well versed in how to do it, just not sure on some of the things... Also, I am going to try and make the main game loop as simple as I can, and put everything into functions, with local variables, only using global vars when absolutely necessary.
I don't want you to get the wrong Idea, I do greatly appreciate you taking the time to do this code for me, as there are not too many people that would basically write a complete game for you like that, I just wish I could understand it better... I am well versed in Basic / DBPro also, but you take alot of shortcuts, and variable names, and comments, shortcuts are ok, if you document them fully so that someone that doesn't understand why your are using 0.1 and 1.0 etc..
Thanks again Van, if you have time, it would be great if you could comment / change some variable names to this code, as I think it would help alot of people out..
Ken aka StOrM3
[PKE] Pain Killa Entertainment(tm) [PKE]
Pain Brings Reality...
[PKE] Pain Killa Entertainment(tm) [PKE]