How do I Add code inside of game, to claim a prize

Get help using Construct 2

Post » Sun Aug 14, 2016 4:57 am

Hello friends.

Query how I can create a way to add serial or codes to the game, I want to add a code inside the game and to claim a reward, some way to do that?



Hola amigos.

Consulta, como puedo crear una forma para agregar seriales o codigos al juego, quiero agregar un codigo dentro del juego y reclamar una recompensa, alguna forma para hacer eso?

Thanks you Friends :D
B
20
S
6
G
1
Posts: 51
Reputation: 1,869

Post » Mon Aug 15, 2016 8:13 am

You could write a hash function. The simplest example would be a function which writes a very long string of alphanumerics. Usually you'd build these from a much larger string, but in your case you could use random numbers and letters - even taking input from the game. Make sure they are selected in some arbitrary pattern - although one which is non-consecutive eg: 13Afg9P456GH would work, but 23Afg9P456GH would not. Everyone's used to copy-pasting large chunks of alphanumerics these days, so when it comes to length... how long is a (piece of) string? :P

To help ensure each code should only be generated once, you might want to encode the date and time into the pattern. So long as you can verify that the string was written by your algorithm (you'll want to write an app to check this for you) you're golden.
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 242
Reputation: 2,306

Post » Mon Aug 15, 2016 4:13 pm

If Textbox.Text = "Bruce Wayne"
> Function "WhateverYouWantToClaim"

@mrtumbles , Why the heck would he write a hash function
1) Making your own hash function is unpractical and will take you a lot of time to get right in a way that the user can't read easily, there are plugins for hash functions
2) Why would he even need a hash function, he wants a password system like in the old NES games (I assume)
B
42
S
17
G
17
Posts: 2,247
Reputation: 17,461

Post » Tue Aug 16, 2016 12:51 am

Ty friend :D
B
20
S
6
G
1
Posts: 51
Reputation: 1,869

Post » Wed Aug 17, 2016 2:04 pm

I was assuming OP want something that wasn't easily reproduced and so-on, given there were prizes involved. Apologies.
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 242
Reputation: 2,306


Return to How do I....?

Who is online

Users browsing this forum: dop2000, KTML5 and 36 guests