Sunday, April 4, 2021

Crypto Fighters: An open source project

Have you ever did a flipbook?, you know, doodling stick fighters on your notebook corner in an each-page-sequence in order to animate them? (Boy did I do that so much in my high school days), if you ever did that for sure you wanted to give them life somehow!, maybe you wanted them to do something funny or most likely to make them fight!, in fact there are plenty of videos on youtube about this old school yet cool animation technique. Most people would find it tedious to draw a big number of frames in order to produce a decent animation, but when you really love to do something, no matter how hard it is, it turns out to be a hobby. Though it takes a lot of afford, a bunch of strokes can become a real masterpiece animation with this simple technique.

Having all this in mind I just thought: a part from animate them, what if I could implement new stunts and make them fight independently?, that is something that I actually thought a lot back in high school, how can I make them move by themselves?, how can I make them fight without human intervention?.

This might sound weird but I used to set fights on games like mortal kombat on a AI vs AI mode just to watch them fight, that was the closest thing to what I wanted back then but was not really satisfying, I wanted to create my own character and make him "think" by himself. Fortunatelly nowdays technology allows us to do all that!, there is an interesting open source project called "PyTorch" focused on artificial inteligence that might help us (just a suggestion), so we only need to tell the fighter what he supposed to do and watch him rock n' roll!, make him stronger by gaining experience and eventually make a good profit out of it!. So this is not going to be another fight videogame but more like a stick fight anime that you can sort of decide the outcome!. And as if all of this is not interesting enough, we can implement cryptocurrency to make good profits out of all this.

If you find this idea interesting, if you think this has any potential whatsoever, if you think this is something people would want to take off the ground, feel free to spread the word and keep reading and learning more about this project!.

---

-How it works?:

This is a multiplatform free app users can download to their divises (smartphones, tablets, pc's, etc...) running on every Operating System (Windows, Mac, Linux, Android, etc...), so this app is like a wallet but intead of bitcoin (for instance), users have fighters/assets and since each of them are Non-fungible tokens (NFT's) every fighter/asset is unique and can be stored in only one wallet.

Once installed in a device, users are presented with a form to create a simple Login and password account with their respectives crypto wallets addresses so then they are introduced to an enviroment where they are able to create fighters, events, virtual arenas, create artwork stunts, sound fx and even BG music (Each of these assets being turn into a unique/limited Non-Fungible Token for afterward trading purposes). Once they create a fighter now they can set fights and with each victory they earn a small amount of points that can be invested on the fighter's features right after the fight (AI, live, punch, kick and speed).

.AI: At first I thought this to be a configurable feature in order to be able to set a strategy on the previous of each fight but since the idea of this project is to create independent characters this is going to be an improvable feature. The more you invest on, the best decisions your fighter is going to take during a fight!.

.Life: If the owner decides to invest into his fighter's life, now his opponents have to land more hits in order to defeat him;

.Punch: More points on punch, means more points taken out of the opponent's live during a fight;

.Kick: More points taken out of opponent live when a kick is landed successfully (The fighter can perform differents punch/kick combos depending on the stunts his owner created/buy and implement to him, this will be explain more detailly later);

.Speed: This feature is limited, a brand new fighter is relatively slow in his moves and has desadvantage in relation to faster fighters but once they reach full points in this feature they are pretty much the same, punch and kick points its what really going to make the difference in a fight.

The owner decides which feature of his fighter is going to be increased right after his victory (which means these points have to be implemented right at that moment and cannot be stored anywhere else), this points are created as result of each fight in order to increase the winner's features ONLY, which means these points are not a currency but more like experience points (Rather this points are NFT's or not is discussable).

A fighter can be set to an autopilot mode so he fights whoever challeges him or accept any tournament he is invited to (if a fighter accepts a long term tournament he remains until the very end of it with no option to quit), it will only stops after a victory and wait for his owner set points into his features. His owner still has an option to program which feature points are going to be invested on so the fighter is fully automated (In case the fighter is not set to autopilot mode, if owner takes too long to decide where points are going during a long term tournament, points go to the last benefited feature before his next fight), since every fighter is a NFT, they can participate in only one fight at the time.

-Fight features:

The fight has 2 rounds of 2 mins each, if a fighter knocks out his opponents before time runs out, he wins the round immediately. If they still remain in a round after 2 mins, win goes to the one with more live points. In case each fighter wins a round, they fight again in a 3rd and last round for the final victory. In case they tie in live points (Hard but still a low chance to happen), they go to a 4th round and so on until we have a winner.

-Type of fights & tournaments:

.Street fight: This is the simplest type of fight, any fighter can challage other fighters and if a deal is set anyone can watch it for free. In this type of fight only the winner wins points and no crypto are involved.

.Pay per view: This type of fight has to be set by a host who offers an arena and invite 2 fighters (most of the time by public petition), host can stipulate a price in crypto each viwer has to pay (more or less like a ticket for a sport event) or can choose a donation option (anyone can pay any amount to watch). The host has also to stipulate a percentage for each part from the amount that the event has raised, Ex:

Host:10%, loser:20%, winner:70%

Both owners of invited fighters are going to be fully aware of the Pay per view configuration previously.

.Tournament bracket: This is a playoff tournament (host with arena required) with a stipulated number of competitors by the host in order to only 2 reach the very final (8, 16, 32, 64...), host can offer a price for the winner (a crypto reward, a special belt, etc...). This can be from a simple playoff competition with no price to a very important world tournament with the best fighters on the platform, only a single chance to every competitor, whoever loses once is immediately eliminated.

.League: This is a long term competition where competitors can apply to or being invited by the host. The host must have at least one arena (he may stipulate conditions to participate). In this competition the number of participants is more flexible, and the host can set the fights in any order so competitor sum up points to rise his position on the table:

Ex:

NÂș - Name - fights - win - lose - country ...

1 - Sc0rpion - 10 - 9 - 1 - USA

2 - Baraka - 10 - 8 - 2 - USA

3 - Ryu - 10 - 7 - 3 - USA

4 - Eddy - 10 - 5 - 5 - USA

5 - Jack - 10 - 4 - 6 - USA

...

Once the championship is done the fighter with more wins its declared the new Champ and the host can even set more competitions afterwards (top 4 qualify for a new special league or a higher level bracket tournament, etc...)

---

-Cryptos join the chat:

Once a fighter starts to gain points it eventually starts to stand out, even more when it wins high level competitions and titles. Since every single fighter is a NFT only one user can own it, same rule goes for stunts(owned by fighters), arenas, sound fx, clothing, championship belts, etc, they're all unique items. Users can stipulate a crypto price for each fighter/item based on their points/level value, negotiate all these items (Except belts) and eventually making a good profit.

Attention!: Points earn in fights and cryptos earn by trading items are total different things, they have nothing to do with one another. A fighter becomes "stronger" with points while a cryptocurrency stipulates his value on the market, users can stipulate his crypto value based on his earn points though. Here's a comparison table for better comprehension:

Points - Cryptocurrency

Is generated by the end of each fight - Comes from out of the platform

Is attached to every fighter - Owned by users in their wallets

Does not circulate from users to users - circulates among users

Once a fighter earns it, he keeps it permantently - each fighter fluctuate his value on the market

Makes the fighter stronger - Gives a value to the fighter on the market

Cannot buy new stunts - Can buy new stunts

Can reinforce new stunts - cannot reinforce new stunts

If a fighter lose a fight does not lose any points - a lose may result in devaluation

Punch & kick points decrease opponent's live - Stunts bought by the owner gives a nice style to the fighter but does not decrease opponent's live

Stunts make the fight look more stylish but the points of each kick/punch is what really takes the opponent's life away, two fighters can perform the same stunt but with different points features they cause different points damage.

---

A user that starts to use the platform with some cash in his wallet can purchase an already "experienced" fighter and implements more stunts (another good alternative would be to create nice stunts art and sell them for a good price), buy clothing and items then win a couple of fights increasing its value then selling it on the secondary market making a good profit.

A user willing to invest into this platform can also create arenas, organize a tournament, then offer a price in cryto for the winner or he can create a special belt (Belts have no crypto value since they are win by winning a contest and not by purchase) and charge from users to apply their fighters into the tournament.

This type of investment is more suitable for users that enter into this business later.

As you already might noticed, this multiplatform project can hugely benefit users if they enter right in the beggining, even with empty wallets. Users can create all fighters/assets they want and they are going to have low value at the beggining. The peoneers fighters and items are going to gain value as the platform grows, after some months or years, peoneers fighters are going to have a huge amount of points into their features making them top fighters really hard to defeat. Owning one of these could mean to own a fortune.

Once a user sells a top high value fighter, a really cool stunt or neat cloths, now he can purchase all assets mentioned or apply this investment however he finds the best, and like in any other NFT platform you can stipulate a porcentage value that come backs to you every time your fighter is sell in the sencondary market.

Fighters can be gifted with new stunts, styles, clothing, championship titles and earn more and more value as his owner invests on him then be negotiated on the secondary market all along.

---

Elements on the platform:

Fighters, Stunts, Arenas, Belt, Clothing, Sounds fx, Visual fx, BG music;

-Fighter:

This is the main asset on the platform, every fighter is unique and has its own features. Remember those collectable cards people use to buy back in the 90's?, this follows the same principal with the particular difference they can interact with each other in a fun way, every card has different value and can be trade. Think about every fighter as a collectable card you put on a table and can actually make them fight!, certainly exciting! (for me at least).

This is turning out to be better than cards in this aspect because fighters can define who is the best between them in a certein way. Cards have subjective value which means that it can worth a lot to a certain collector but might worth nothing to someone else. This does not happen with Crypto fighters, they have objective value, if you want to know who worth more just set a fight!.

Fighter features:

(Name and country are registered when fighter is created)

.Name: A fighter's name can include numbers and must be something short

.Country: Country is chosen by dropbox option, as the comunity grows more country options are added

Points: The only way to gain points is by winning fights, fighters earn 3 points for each victory and when they are created they start with the next punctuation list by default:

.AI : 5

.Life : 20

.Punch : 1

.Kick : 1

.Speed :1 (up to 10)

When fighters fight for the first time this is the default punctuation, whenever he land a punch or kick his opponent's life is diminished. After a victory, if the user uses all 3 points to increase the Punch feature then his punch damage is going to be 4 (1+3) in his next fight, 2 punches landed takes out 8(4+4) points from opponent's life(20) (then only 12 points of life remaining).

---

-How AI is going to define an outcome for a fight?

Features of a fighter are basically numbers that AI is going to use to turn them into blocks of action which forms an algorithm, so for this process to take place, there are some layers to be define: To define a winner we need a fight, to define a fight we need a script, to define a script we need an algorith and the algorithm is going to be set by AI based on the fighters features, so the entire process goes like this: Fight difines the outcome, script define the fight, algorithm defines the script and finally, AI uses fighters features to define the algorith;

Fighters Features ==> Algorithm ==> Script ==> Fight ==> Outcome

Lets talk about every Tecnical aspects of layers:

.Algorithm: These are blocks of actions AI loads from fighter features. If a fighter has a lot of AI/punch/kicks points and a lot of stunts bought by his owner, AI is going to load his stunts into this blocks that needs to be set in a certain order to define a script. In case two fighter of high level are set to fight, AI loads their features and stunts in order to define a choreographed fight, so every fight is going to be like a live fight anime.

.Script: This is basically a description of the entire fight, a description of every block form by the algorithm Ex:

Block 1:

A punches B

B punches A

A Kicks B

B kicks A

Block 2:

B performs a suplex to A

B makes a sequence of punches and a kick on A

A performs a double kick and a punch on B

Block3:

A makes a sequence of punches and a kick on B

A performs a suplex to B

B performs a front flip and delivers a kick on A

Blocks may change order depending on AI decisions.

.Fight: The fight is going to have a timeline of 2 minutes each round that follows the order set on the script.

.Outcome: This is the final layer where all fight is exhibit with a winner in the end.

-How AI defines a fighter behavior?

A fighter has 3 states during a fight: Attack, defense and idle.

When fighters of same punctuation are set to fight, they perform a balance fight most likely, in this case the one with more AI points has more chances to win. AI can devide a round length (120 seconds) and set at what seconds the fighter is going to attack/defend or be idle. If fighter A attacks B first, and B is not in defense mode then his attack is succeeded, if A attacks B and B is in defense mode then he manage to defend from that attack. However, if fighter A has a more AI points than fighter B but fighter B has much more Punch points then is going to be hard to defeat him. Fighter A might take the best decisions but is going to be hopeless if his opponent knock him out with only a couple of punches. Let's see a logic programming class example for this:

public class Fighter{

public string name; protected boolean attack = true; protected boolean defense = false; protected boolean idle = false; protected int life = 20; 

public Fighter(String name){

[this.name](https://this.name) = name; 

}

//---

protected boolean getAttack(){

return attack; 

}

protected boolean getDefense(){

return defense; 

}

protected boolean getIdle(){

return idle; 

}

protected int getLife(){

return life; 

}

//---

protected void setAttack(boolean attack){

this.attack = attack; this.defense = false; this.idle = false; 

}

protected void setDefense(boolean defense){

this.attack = false; this.defense = defense; this.idle = false; 

}

protected void setIdle(boolean idle){

this.attack = false; this.defense = false; this.idle = idle; 

}

private void setLive(int live){

[this.live](https://this.live) = live; 

}

}//Fighter class end

---

//Basic AI set during a fight:

Fighter A = new Fighter("A");

Fighter B = new Fighter("B");

if(A.getAttack()==true){

if(B.getIdle()==true){ B.setLive(-1); 

}

if(B.getDefend()==false){ B.setLive(-1); 

}

}

//Same goes the other way around for B:

if(B.getAttack()==true){

if(A.getIdle()==true){ A.setLive(-1); 

}

if(A.getDefend()==false){ A.setLive(-1); 

}

}

// This class is just for example purposes and it might have errors, feel free to improve it!

---

-How AI is going to devide a round length?

Before a fight starts, AI sets a strategy by dividing the length of the round which is 120 seconds as mention above. Every second is set to one of the three states of the fighter (attack, defense, idle).

Ex: 12secs-12secs-12secs-12secs-12secs-12secs-12secs-12secs-12secs-12secs = 10x12secs = 2 mins (1 round).

At - At - Df - At - Df - Df - At - At - At - Id

Every chunk of time for this example has 12 seconds but AI may set this to even less or more secs (discussable).

A fighter may earn up to 10 points for each victory depending on how strong his opponent is (discussable).

-Just like in videogames:

In the case of videogames, sprites are loaded into the RAM by "pieces", every piece loaded is basically a short clip of the sprite (in this case fighters) moves and stunts. Every time a player pushes a buttom on joystick, CPU plays that corresponding "piece" of file in the RAM and the short clip of the sprite performing an action (jump, kick, punch etc..) is exhibit on the screen. We could apply this same principal into our project and use AI instead of players and joysticks, the problem is you can tell this is pre-loaded fight. There are gaps between stunts, in videogames when a fighter kicks his opponent they move in a pre-defined way which means they not always move according to the situation, sometimes a fighter kicks on his opponent's legs and his opponent moves as if the kick had landed on his head or sometimes a fighter performs a longer action (a suplex, a backflip kick etc...) so a short clip of the fighter applying his stunt on his opponent is exhibit but once they return to the first fight scene they are in a total different position. This gaps make the fight look unreal and we want to avoid that, we need AI to "refill" this gaps in order to make it look more like an anime and less like a videogame, a logic sequence on this gaps are required in order to make the fight more realistic and less artificial. So this is the basic dilema:

-Videogame fight: pre-loaded moves, changeable outcome but not realistic

-Anime fight: pre-defined script, realistic but unchangeable outcome

Im not sure if I'm using the right words to explain this but I hope readers understand what I mean...

---

-How stunts are made?

Users can create stunts manually by moving a 3D model but they also have an option to use their smartphones to captures movements, save them and then apply them to an actual fighter. Stunts can also be turn into an asset, once is created the creator can implement them into his own fighters or sell them in the crypto market.

Since every stunt is a NFT, they are limited in number and not all fighters can implement them.

-How stunts are trade?

Users can search for new stunts being sell on the market and they can pre-view them before making the purchase. A white fighter performs the stunt as example and a gray one performs how the opponent is going to behave (if the stunt is an attack). The white fighter is shown alone if the stunt is a celebration, special move style or any other move or stunt that does not involve a second fighter.

After a user purchase and implement a new stunt to his fighter, all clothes/items previously purchased to be wear by the fighter are going to move according to the new stunt (Ex: If the fighter uses a red pair of pants then they're going to move in order to match the stunt).

Assets Users can buy with crypto:

Stunts: Presentation, attack, victory dance/move/mock

Sound FX: This can be the sound of punches, kicks, growningsa yell or a special line fighters may say, all tradeable too.

-Virtual arena:

This is a 2D space where fights take place and a user can create/buy as many as possible, virtual arenas also have several features:

.Background banners- Owners can hire them to show propaganda

.Backgound animation- A public cheering and rooting can be exhibit during a fight

-Champ Belt: Every belt is unique and fighters have to win tournaments or defeat the champ in order to obtein them (not tradeable).

-Stunts:

As strange as it might sound, stunts can also be sold and implemented to fighters. This is the only asset (along with points) that keeps attached to a fighter once he gets it (more or less like when a real life fighter learns a new stunt with the difference that the owner can buy it instead of trainning).

Stunts are created by artist users, virtual arenas are 2D eviroments, fighters are 3D sprites and the artist only has to move a 3D model, record the movements and then other user can implement them into their fighters.

-Clothing: Different color, styles, and this may include hairstyle...

-Visual fx: A special punch may create an electrical, glowing, slow mo effect. This is another tradeable asset that users can apply to their fighters special moves.

---

-Who is this project for?

Programers, 2D/3D artists, musicians, investors, translators, video/sound editors and pretty much anyone interested.

---

I know there are flaws in this project but the point is to explain what I have in mind in order to get help from the open source community, please feel free to share, copy, change, improve and get this documentation done in all necessary aspects so good programmers, translators, artists, etc get interest in and help us too. Any suggest you have for next steps please send me an e-mail to [tonypatriota77@gmail.com](mailto:tonypatriota77@gmail.com)

If this project works as I'm expecting all of us are going to be benefited as peoneers. GREETINGS ;-)

Tony Patriota

March-08-2021


No comments:

Post a Comment