Sign in to follow this  

Beginer question part 2

This topic is 3740 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

We're not here to help you wallhack in CSS, sorry. While I don not know what this means or what it even refers to, judging by the tone I get the feeling it is not good. Allow me to provide a more detailed explanation of what we are trying to accomplish. Through a collaborative effort, actually more on his part then mine, a friend and I have created an amatuerish yet humorously adult version of tetris with naked people in the shapes of the blocks. In our rush to have something to tinker with we seem to have left out the ability to show statistical information, which was the reason for my original post. We were wanting to count the number of blocks used as well as the instances of each block; additionally we wanted to obtain information about the number of rows completed and the average time to complete each row. We were initially thinking it might be easier to obtain this information as it was being presented rather then going back in and chopping the game apart to make the additions; unfortunately neither of us has enough experience to know which way would be easier to do. On the advise of others he has spoken to he chose to use Python to create the game and for a first attempt it does not look that bad at this point but there is still a lot of polishing that needs to be done. Parhaps I am looking in the wrong place; I just thought I would ask rather then blindly stabbing in the dark.

Share this post


Link to post
Share on other sites
Quote:
Original post by marvinpaint
We were initially thinking it might be easier to obtain this information as it was being presented rather then going back in and chopping the game apart to make the additions; unfortunately neither of us has enough experience to know which way would be easier to do.


It will be MUCH easier the other way (putting the code into the actual game). So much easier that the other approach is pretty much completely unthinkable, except when you have no choice (i.e. don't have the source code for the game).

Share this post


Link to post
Share on other sites
For the benefit of any confused responders the OP appears to be refering to this closed thread.



What you want to do will be much easier to achieve by building the functionality into the actual game - you can count the number of rows completed by simply incrementing a variable in the function which checks for and removes completed lines for example. Graphically analysing the game to figure this out would be quite a difficult task and should be avoided if possible.

If you still have plenty of polishing to do on the game you might be able to take the opportunity to clean up the code a bit as you're adding the new functionality.


As to the specific functionality you want:
Quote:
We were wanting to count the number of blocks used as well as the instances of each block
You could count both of these statistics in the function that creates blocks.

Quote:
additionally we wanted to obtain information about the number of rows completed and the average time to complete each row
and these in the code that checks for and removes completed rows.

Share this post


Link to post
Share on other sites
Curious that someone who knows how to code even a simple game like tetris doesn't know how to use an integer to count something. Are you storing the location of the bricks? Or just sticking cut out blocks to your monitor with glue then watching it slide down? What exactly are you having trouble with? jbadams can't really put it any simpler. Were you having trouble outputting the data you've collected? To a file? To the screen?

Share this post


Link to post
Share on other sites

This topic is 3740 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this