Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

aregee

Member Since 06 Oct 2009
Offline Last Active Sep 30 2012 11:29 AM
-----

Posts I've Made

In Topic: HTML5 Game Sponsors?

29 September 2012 - 08:22 AM

Hi. Congrats on finishing your first html5 game - I hope it's 100% mobile compatible, because there is where the market is right now. Get it polished as much as you can (quality still counts for a lot, regardless of platform) and when you're ready I posted up an article about HTML5 Game Sponsorship just the other day to my site, which you may find useful: http://www.photonsto...sorship-market/


OP, congrats on finishing your game. That is more than I have ever done. ;) I have tested your game and have a few suggestions on how to polish it like photonstorm suggests:

- Your hearts are discreet units, suggesting they are lives I can lose before it is "Game over". I thought they indicated the number of turtles that escaped making me wonder why clicking those bubbles gave me more lives. A solid "progress" bar to indicate oxygen would be better, possibly engraved with hearts and maybe the text "O2" in front.

- Your background is nice, but making it animate would bring much more life to your game. Maybe animate your turtles too, though maybe not necessary.

- You don't necessarily need music, but sounds would be nice. Just make sure you can turn off sound since most people play without sound on hand held devices.

- I never read instructions, I never got the reason why your turtles had different colors, except maybe they moved at different speeds.

Oh a game ide too to make it even more interesting:

- After collecting 200 turtles I started wondering where they went. Maybe you can have a set number of traps, like 20 or something before you have to send them to the surface for a bonus or more oxygen or something to free more traps to capture more turtles?

- Are there disadvantages to miss turtles at all? How are they communicated? Can it add to the excitement to implement disadvantages?

These are just my opinions, someone else might disagree.

Great game by the way.

In Topic: Need help understanding this logic....

15 July 2012 - 06:34 PM

Taking the modulus isn't simply just dividing by a number and see the result.  Well kind of it is, but you have to remove the integer part and then multiply the decimal part with the same number again.  Let us use your numbers as an exercise.

Number to operate on with modulus 6:

32747 / 6 = 5457.833333... (unlimited expansion of '3')

Remove the integer part and then multiply with 6.

0.833333... * 6 = 4.99998

Which you can see is very close to 5 but it is not exact.

All rational numbers can be written on the form m/n.  (m divided by n.)  The number 5457.833333... is rational because it can be written in a predictable way.  You know there will be all number '3' for all eternity after  the last digit.

Let us convert this number to a fraction:


x = .833333333333333… (This is the number we want on the form m/n.)
10x = 8.33333333…  (Multiply by a number 10^n so that n makes the expansion of decimals overlap.  n=1 suffices here since all the numbers are equal.)
10x - x = 9x = 8.333… - 0.8333… = 7.5   (If this is hard to see, just know that 0.333... minus 0.333... = 0, see below)

It is easier to see laid out like this:
. 8.333333333... (Had to add a dot in front to make this line align properly)
- 0.833333333...
= 7.500000000...

Then we have:

9x = 7.5
90x = 75
x= 75/90 = 5/6

Our fraction is 5/6 which makes 0.83333...

Then we can multiply our fraction by 6 to get the modulus:

5/6 * 6 = 5

Which indeed is 5.  Exactly.

(Sorry about this but I was really bored today ;) )

Final note: taking the modulus of a number can never result in either the same number as the modulus or a higher number.  The result is always lower so having 8 as a result when the modulus is 6 is not possible. (It would mean you could still divide the number further, which is not a remainder at all.)

In Topic: What's a pong in data comm?

27 November 2011 - 05:52 PM

When you send a 'ping' to another unit, you are sending a package to that unit asking it to respond if it were well received.  That reply (ping reply) is popularly called a pong.  Ping kind of works like ping...pong...  or "Are you there?" - "Yes I am!"  (Pingpong, that table tennis kind of game.)

When you get the answer you know that the destination responded to that ping request and is up and alive.  And if you get no reply, there may be no host there, or no host responding to that protocol, or even something wrong under-ways, or even the host itself having a problem.  I also suggest you to search for ICMP (echo), TTL and traceroute if you want to know more.  :)

In Topic: [C++] Calculating file size while writing to it

22 November 2011 - 10:46 PM

Hi!

If you are writing the file, perhaps you should use the put pointer rather than the get pointer? The put pointer is telling you where you are writing and the read pointer will be at 0 at all times as long as you are not reading anything, thus giving you the file size of zero.

Assuming you are done writing to the file, and that the put pointer is pointing at the end of the file, tellp() should give you the size of the file. I see that your function for finding the size of the file is using tellg(), alas the get pointer.

You could also try to search the end of the file before using tellp(), tellg().

outfileA.seekp(0, ios::end);
cout << "Filesize: " << outfileA.tellp();

I suppose that when you search the file like this, unless you are doing any more reading/writing, it doesn't matter if you are using the get or put pointers, so seekp() and tellp() may as well be changed to seekg() and tellg().

Other than that there is a great tutorial on this topic here: http://www.cplusplus...tutorial/files/

Edit: code editor formatting malfunction and oops sorry I didn't notice you already found a solution. :)

In Topic: Big integer (128 bit++)

02 November 2011 - 11:12 AM

Think about this:

It wouldn't be random if there were a difference between creating a lot of small numbers than creating one big number.

Also think about this:

You cannot represent an unlimited amount of pictures using a value between 0.0f and 1.0f simply because numbers are represented with a limited amount of digits.  Images that are represented on a computer screen are also limited, so in theory you can theoretically represent all combinations within that limited set using a number between 0.0f and 1.0f, even though it might need incredible huge numbers.  Finding the algorithm to map such numbers to all these possible combinations of images is not hard, but it certainly is to find a decent picture within the vast amount of different mappings.

Third thing to think about:

You will by no means be able to compress anything using a method like this.

It may be that I didn't get what kind of imagery you are trying to generate.  Even with the limitations I mentioned above, you may be able to get interesting results depending on your choice of algorithm.  :)

PARTNERS