Löve est un framework pour créer des jeux, c'est à dire un outil qui contient un ensemble cohérent d'instructions et modules qui facilitent la création de jeux. Pour créer un jeu avec Löve, il suffit d'un éxecutable Löve et d'un dossier qui contiendra tout le code de jeu, ainsi que le contenu (images, sons, etc...)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Décommenter la ligne suivante pour avoir un résultat différent à chaque utilisation. | |
--math.randomseed(os.time()) | |
--Génération d'une "graine", on spécifie ici des variables aléatoires qui définiront le comportement de notre générateur de bruit | |
mults = {} -- Tableau de multiplicateurs | |
adds = {} -- Tableau de sommateurs? | |
for i = 1,20 do | |
mults[i] = math.random()*1000 | |
adds[i] = math.random()*1000 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
* * | |
* Get IP * | |
* * | |
* Auteur: Kevin Gaël Bradshaw * | |
* * | |
* Récupère les noms d'hôte passés en argument et affiche des informations * | |
* obtenus depuis le DNS * | |
* * | |
* * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local sounder_table = {} | |
sounder = {} | |
function sounder.play(name, pitch, volume) | |
if not sounder_table[name] then | |
print("This is new") | |
sounder_table[name] = {} | |
table.insert(sounder_table[name],love.audio.newSource(name)) | |
else | |
local free = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <lua.h> | |
#include <lauxlib.h> | |
#include <lualib.h> | |
#include <stdio.h> | |
void maFonctionC(){ | |
printf("Cool\n"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#define go { | |
#define stop } | |
#define maybe if | |
#define sometime while | |
#define iz = | |
#define ithinkis == | |
#define county int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[pts/1]-[QED.] | |
[You have no faith]-[HaxeNME] haxelib setup /usr/lib/haxe/ | |
Called from ? line 1 | |
Called from tools/haxelib/Main.hx line 1292 | |
Called from Array.hx line 257 | |
Uncaught exception - Invalid array access |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Called from ? line 1 | |
Called from /usr/lib/haxe/std/tools/haxelib/Main.hx line 1292 | |
Called from /usr/lib/haxe/std/neko/_std/Array.hx line 257 | |
Uncaught exception - Invalid array access |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[pts/1]-[Who is John Galt?] | |
[Catalepsy approves]-[JanTest] cat Main.hx | |
class Main | |
{ | |
public static function main() | |
{ | |
var args = Sys.args(); | |
trace(args.length); | |
trace(args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function thing() | |
local t = {} | |
--[[ Local to the function "thing()" | |
but we're going to return it so it becomes directly accessible. | |
We're making this local ONLY to avoid conflicts with any global | |
variable with the same name. | |
--]] | |
local hp = 100 | |
--[[ Local to the function "thing()" |
OlderNewer