Code Directory
 Visual Basic & VB.NET
New Code
Vue Injector 3.3
Spectrum Analyzer pro Live 2019
Devart Excel Add-in for HubSpot 2.1
RentALLScript - Airbnb clone 2.2
SuiteCRM Theme Customization 7.11.6
iScripts NetMenus 3.1
iScripts EasyIndex 2.2
iScripts EasySnaps 2.0
Australia MyPost shipping For Magento 2 1.0.0
Australia Post eParcel For Magento 1.1.1
Source Control for SQL Server 2.0
Answers phpSoftPro 3.12
Exlcart 2.0
School College ERP 1.3.2
White-label Grocery Delivery App Solution 2.0
Top Code
iScripts EasySnaps 1
iScripts EasyIndex 1
iScripts NetMenus 2.0
ATN Site Builder 3.0
IcrediBB Bulletin Board System 1.0
Azizi search engine script PHP 4.1.10
Simple Comments Script 0.930
Vue Injector 3.3
Guestbook PHP Script 1.1
DBForms from MSAccess to PHP+PostgreSQL 1.0.0
Devart Excel Add-in for HubSpot 2.1
White-label Grocery Delivery App Solution 2.0
EV Widget Post 0.3
Stepping stone algorithum for solving the transhipment problem
GuestBook PHP 2 Script 1.10
Top Rated
phpEnter 5.1.
Quick Maps For Dynamics CRM 3.1
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
5 Second Game 6.x-1.x-dev
File ID: 98460

5 Second Game 6.x-1.x-dev
Download 5 Second Game 6.x-1.x-devhttp://drupal.orgReport Error Link
License: Freeware
File Size: 20.5 KB
Downloads: 18
Submit Rating:
5 Second Game 6.x-1.x-dev Description
Description: The engine for 5 Second Game is built on a Rock-Scissors-Paper concept. There are three stats, corresponding to that, and everything modifies that: character classes, skills, combat, etc. It is meant to be a fast paced, easy to grasp, infinitely extensible game.

The game is designed to be fit into an embeddable widget, so that users may post the game in a blog or other page, allowing others to quickly and easily play the game. A widget may highlight that user's character, challenging all takers.

The game lends itself well to guilds and the like as well, which are also built into the system. Characters may belong to one or more guilds, which govern themselves as desired by their players. The system honors the guilds' wishes, so that characters belonging to a specific user-formed guild might gain certain bonuses (or suffer penalties) according to the guild charters.

Additionally, servers may choose to allow characters to migrate between certain other servers. The character may be "translated" during migration, so that world/genre integrity is maintained (if desired). However, the simplicity of the system lends itself easily to that, if an administrator doesn't mind a gun-toting sheriff to arrive at the scene of a medieval tournament, or conversely if the player of a high elf wizard doesn't mind being translated to a nanobotic engineer on a space station.

You can play the game at to see it in action (once it's built...)


The three stats, at their root, are Rock, Scissors, and Paper. As in the schoolyard game of that name, Rock beats Scissors beats Paper. The stats can be renamed at the administrator's pleasure; for instance, at, the stats are named Spirit, Mind, and Body. Thus, Spirit trumps Mind, which trumps Body, which trumps Spirit.

Characters will have a score in each of the stats, beginning at 1 and going infinitely beyond that (although on a practical level, the Administrator will usually top out the stats at a managable level, and/or force the retirement of overly powerful characters).

When competing, two characters will choose one of the three stats (by choosing a particular skill that uses that stat), and compare them. The stats will be modified according to their character class, skill levels of the chosen form of competition, and other effects and circumstances. If one of the stats trumps the other, it will be given a further bonus. Then the final results are compared, and a winner is chosen.

Character Classes

Each Class has Primary/Secondary ratings, and a level beginning with 1. Their level is added to the primary stat, and 1/2 their level (rounding down) is added to the secondary stat, which may or may not be the same as the primary. Additionally, each class has certain special abilities, some earned at higher levels.

Classes are further grouped by General Class. This does not generally add new abilities per se, but is useful for Guilds and the like. For instance, a Guild for Supernatural Monsters may only accept such classes, which may include Vampires, Dragons, and Werewolves.


When competing, each character will choose an "Attack" and a "Defense". The nature of the engine allows seemingly widely disparate modes of combat, such as playing cards versus a fireball. It is up to the administrator to decide the level of reality they wish to enforce for their particular game. A light-hearted environment is kept at, so that specific example would be entirely plausible.


Each attack is of a certain attack mode. The attack mode uses a certain primary stat, and the level of the attack is added to that stat. Additionally, the specific attack itself affects a secondary stat (which may be the same or different from the primary) stat, adding 1/2 its level (rounded down) to that stat. If the affected stats are the same, they are added together. Otherwise, they will count as two separate attacks when resolved. Finally, specific attacks themselves may have special abilities or modifiers, such as a fire attack being doubly effective against a Treant character.


As with attacks, each defense is of a certain defense mode. The defense mode is against a specific stat, so that attacks using that stat are reduced by the level of the defense. Additionally, the specific defense is secondarily effective against another stat, in the same manner as with attacks. Finally, defenses themselves may have special abilities, some active at higher levels.


Characters may have skills to use specific attacks and defenses. Their skill level is added when using that attack or defense. Additionally, characters may also learn general skills of a mode, which also adds its level during combat.


Characters may belong to a guild. Guilds may give bonsues when fighting other specific guild members, character classes, persons on a wanted list, etc. They may further be forbidden from using certain weapons or defenses, and may be forbidden from fighting certain other guilds or members of their own guild.


The Attack of each character is determined for the primary stat of the attack, and again for the secondary, each being potentially (and separately) modified by the defense of the other character. The stats are combined, and if one of the character's primary stats trumps the other's primary stat, it is multiplied by 1.5, and likewise for the secondary stats. If a character holds the token against the other, another bonus is also applied to their attack.

The final result is compared, ties going to the defender. A token is assigned to the winner of a competition, specific to the two characters involved. The final result is also tallied for several rankings, such as competitions between two characters, users, guilds, etc.

Relative Power
The Power of each character equals the levels/values of all classes, attacks, defenses, skills, plus the number of held tokens, and possibly modified by guild affiliations and specific situations between the two characters. The relative power level is shown before the fight, and compared after the fight. The ratio (in favor of the lower-powered character) is added to the Experience of each character, after multiplying by 1.5 for the victor and by 0.5 for the loser, rounded down in each case. If the ratio is higher than an administrator-set level, the higher-powered character may not challenge the lower-powered character, unless the character's guilds are at war.


When a character's experience equals or exceeds his base Power, it is reduced by that level, and 1 stat point is assigned to the character. When the character's cumulative stat points equals his current class level, his class level is increased by 1 and the cumulative stat point score reduced to 0.

Stat Points

Stat points may be applied to the three stats, at a cost of 1 stat point per current level of the stat to raise it to the next level.


Each time a skill is used, the character has a chance of earning 1 study point in that skill, plus possibly a smaller chance of earning 1 study point in the skill's mode. However, the character will not earn study points in the general mode of the skill unless the number of specialty skills in that mode, each with a level of at least the number, exceeds the current level of that general mode. When a skill or skill mode study points equals its current level, the skill or mode is increased by 1, and its study points are reduced to 0.

Chance of Study

If the specific skill level used by an opponent is higher than the character's current skill level of the same, then the chance of learning a single study point in that specific skill is equal to a percentage of the difference squared, times 1.5 if the character lost, or times 0.5 if the character won, rounding down in each case.

If the general skill mode of the opponent is higher than the character's general level, AND he is otherwise eligible to learn it, AND he earned a study point in the specific skill as above, then he has a chance of learning a single study point in that general skill mode equal to a percentage of the difference, times 1.5 if the character lost, or times 0.5 if he won, rounding down.

The character will also have a chance of earning a study point in a used skill, equal to 100% minus the character's current skill level times 10, with a minimum of 1%, unless the skill is maxed out. This percentage is multiplied by 1.5 if the character won the competition, or by 0.5 if he lost.

If the character is otherwise eligible to learn a general skill mode for the skill used, AND he earned a study point in the specific skill from the above paragraph, then he has a chance of learning a single study point in that general skill mode equal to 10% minus the character's current skill level, with a minimum of 1%, unless the level is maxed out. This percentage is multiplied by 1.5 if the character won the competition, or by 0.5 if he lost.


When initiating a competition, the character will always choose the attack and defense against their opponent.


The defender of a competition is generally not able to specifically control their attack or defense modes, and in fact may not control whether to appear in the competition or not (unless they have desginated their character as "on vacation", or the character has been idled).

However, users may set strategies for their characters, which will affect specific attacks or defenses chosen when the character is challenged. Each character begins with a single general strategy, and they earn a new strategy possibility with each class level the character advances. They may edit a strategy at any time.

Strategy Specificity

The first strategy slot is ALWAYS general, and the specificity for the first strategy may not be changed, even at higher levels. At level 2, they may change the specificity of the second or later slots to "Guild", so the strategy will be chosen when fighting a member of that guild. At level 3, they may choose "General Character Class", selecting that general class, so that the strategy will be chosen when competing against a character of that general class. At level 4, they may also set a specific slot to "Specific Character Class", so that strategy will be preferred when fighting a character of that specific class. Finally, at level 5, they may set a specific slot to "Specific Character", allowing for some epic battles. A more specific strategy will be selected over a more general strategy.

Strategy Slots

Each strategy may contain attacks and defense combinations of up to 9 slots. Each slot will contain an attack and defense choice, which may be selected by the user to be either "Random", "None", or a specific mode or skill known by the character. When another character initiates combat with that character, the strategy will be determined according to the specificity, and one of the available slots will be randomly selected for the character's attack/defense combo. By default, a strategy will have one slot, assigning "Random" to both attack and defense.

Guild Charter

Each guild has a charter, which is created on the guild's inception, and may be modified or revoked throughout the guild's existence. For instance, a charter may state that only dwarves may join, that all members receive a bonus when fighting elves, and a penalty is assigned when using magic. Bonuses and penalties must generally balance, although the guild may receive "experience points" in a similar manner to characters for achievements of the guild and its members, which may be used to add new bonuses or offset penalties. The charter will also determine who may join, and how approval is determined. Finally, a charter will also determine how that charter may be modified, such as by majority vote of all its members, by a 2/3 majority vote of an elected elite, by majority of a meritocratous elite, by official decree of a ruler, by unanimous vote of a governing council, anarchistrically by any member, etc. Each type of decision or modification may further be drilled down, allowing for complex forms of government within a guild.

When Can I Play?

The game doesn't exist yet except as a concept. Feedback is appreciated. Watch!

License: Freeware

Related: Character, Level, Skill, specific, Stats, General, attack, Strategy, Study, Point, Defense, Attacks, characters, guild, Class

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 20.5 KB

Downloads: 18

More Similar Code

This recipe will open a certain URL approximately every 0.5 second using your default browser. It continues to do so until a timeout occurs which has been specified (like the URL) by the user in number of minutes. The timeout starts a reminder that ends once the program has received input. The program then pauses until a key is struck or exits if ESC is pressed.

The form has name, mail, subject, message fields. E-mail validation; alert for error. Used mail $headers ,So that the email will never send to Spam folder. Nice design effect. You can change the email address where the mails should be send to in...

>> help timeidx
TIMEIDX returns numeric index given time string.
D = TIMEIDX(T) returns index value in relative days which is suitable for
DATENUM math. To work in hours multiply by 24, for seconds multiply

This a very simple function that produces a condensed, approximate version of the time-series signal y, with each group of n adjacent points in y replaced by its average. You can use this to condense over-sampled signals so that subsequent...

Computes cross- or auto-correlograms between two discrete time series, supplied as a list of timestamps.

[tsOffsets, ts1idx, ts2idx] = crosscorrelogram(ts1, ts2, window)

ts1 - a list of timestamps (in seconds) to...

Finds the children of the parents of the inputs. Can return siblings of only a given type. Useful in mass updates in figures.

% Example:
% close all
% clc
% fig1 = figure(1)
% hold on
% line1 =...

This plugin takes the images attached to a post or page and creates a looping slideshow, just like the one above. Itd-deOaos very simple right now, but Id-deOaove got some other neat ideas for it in the future.

Usage is simple:...

Tetris Game made with Flash 5 is available in Italian. This version of Tetris is fully playable but is not a definitive version. It plans to include a top-score list in the next version

And here is my second interpretation of the card game known as "WAR." If you are wondering how it works, you should look at "Version 1" of this program (it is another program that I submitted). There is no documentation...

GNU Chess lets most modern computers play a full game of chess. It has a plain terminal interface but supports visual interfaces such as X-Windows "xboard".

Version 5.07 is the current release. Version 5 shares no code with...

User Review for 5 Second Game
- required fields

Please enter text on the image