Jump to content

  • Log In with Google      Sign In   
  • Create Account


MatrixTan

Member Since 30 May 2013
Offline Last Active Aug 19 2013 01:24 AM

Posts I've Made

In Topic: Question Re Designing Color-based Games

24 June 2013 - 07:07 AM

biggrin.png

 

When you hire a programmer, if they say:

- "It's impossible" -> don't hire them

- "It's no problem" -> don't hire them

- "It sounds possible, but I need to ask you a bunch more questions so that it is very clear what you want", and then goes on to describe the limitations/constraints of the approach they want to take  -> hire them!


In Topic: Game loop question: how to solve this problem?

31 May 2013 - 06:35 PM

in the menu state, you can start up the embedded message loop. Like this:

showMenu:

   draw menu;

   while(true):

      input

      logic

      draw

 

break the embedded loop when the menu ended.


In Topic: How to prevent cheating in html5 game?

31 May 2013 - 07:04 AM

The fact is that you can't do networking 100% safely.

However you can do some tricks to make it more safe.

 

The most secure way, which is also used by desktop games, is too let the server simulate. So the client only handles inputs and rendering. Unfortunately, this technique would require a lot of CPU power from the server, so that you can handle the amount of clients.

 

The second approach is to have some factors which are hard to find/hack, and which also determines if you have succeeded or not. Like in your example it is the position when the heart hits the princess. So you send the position of the heart, and lets the server validate it. This can easily be hacked, so to make this even better, you may create a random coordinate space to use when sending the position, and only use the local space to render the scene.

So, in other words you can't be safe, but you can try to prevent the most obvious attacks.

 

Tanks for reply.

I thought about server simulation, but it's cost too much cpu for physics simulation as you‘v said. 

the second approach is a good idea. I'll try it. thank you.


In Topic: The Algorithm Design of Candy Crush

31 May 2013 - 03:54 AM

You could use a flood fill to find and count the objects http://en.wikipedia.org/wiki/Flood_fill

Hi @Hedman, Great answer! It's helpful... biggrin.png

learning...


In Topic: The Algorithm Design of Candy Crush

31 May 2013 - 03:05 AM

you can use a bit map to store the types of candy. the player can change only two of them each time. so you just scan and check the ranks of them.


PARTNERS