Merci
J'en ferai d'autres mais pour le moment je suis un peu pris.
A la limite je peut essayer de mettre à disposition à éditeur au pire. Un Super Mario Maker 3D . Mais après on aura pas toute la flexibilité qu'avec le code de base.
Faire les niveaux c'est pas compliqué mais c'est très long.
Par exemple le niveau 1 a cette tête là :
void Level_1(){
CreateWorld(101,90, 25, 4);
//world->background = PC_LoadTexture("assets/Images/Backgrounds/sky_bg.jpg");
if (MainCamera != NULL)
Camera_delete(MainCamera);
MainCamera = Camera_new(0,250,0);
MainCamera->angle = -100;
Player* p = CreatePlayer(AllSprites[Sprite_Player], 2*BLOCK_SIZE, 4*BLOCK_SIZE, 1*BLOCK_SIZE);
//Player* p = CreatePlayer(CreateSprite(AllTextures[0], (PC_Rect){BLOCK_SIZE, 0, BLOCK_SIZE, BLOCK_SIZE}), 2, 3, 1);
PlaceEntity(p->entity, 2, 4, 1);
world->player = p;
world->DrawWorldUI = DrawWorldUI;
//Entities Control
//PlaceEntity(CreateEntity(AllSprites[Sprite_Entities+11], 2, 4, 1), 4, 5, 1);//SHIFT
//PlaceEntity(CreateEntity(AllSprites[Sprite_Entities+12], 2, 4, 1), 6, 4, 1);//ALPHA
//PlaceEntity(CreateEntity(AllSprites[Sprite_Entities+13], 2, 4, 1), 8, 5, 1);//F1
//PlaceEntity(CreateEntity(AllSprites[Sprite_Entities+14], 2, 4, 1), 9, 4, 1);//F2
//Entities coins
//SpawnCoin(4,3,1);
//Entities Items
//SpawnHeart(5,3,1);
/////////////////////////////////////
/////////////////////////////////////
//Level Blocks
for (size_t x = 0; x < 23; x++)
for (size_t z = 0; z < 4; z++)
PlaceBlock(CreateBlock(GRASS, 0, 0, 0), x, 2, z);
for (size_t x = 0; x < 23; x++)
for (size_t y = 0; y < 2; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), x, y, 0);
for (size_t z = 0; z < 4; z++)
for (size_t y = 0; y < 2; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), 22, y, z);
//SpawnMysteryBox( 0, 5, 0);
//SpawnBrickBreakable( 2, 5, 0);
//Entites PNJ
DialoguePack* pack = NewDialoguePack(NewDialogue(Dialogues,"Panneau",0,NULL,NULL,(lambdaFunction){Background_DrawWorld, NULL}));
SpawnPNJ(AllSprites[Sprite_Entities+5], 3, 3, 2, pack);
//Entities Control
PlaceEntity(CreateEntity(AllSprites[Sprite_Entities+10], 2, 4, 1), 3, 5, 3);//cross
for (size_t x = 7; x < 9; x++)
for (size_t z = 0; z < 3; z++)
for (size_t y = 3; y < 8; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), x, y, z);
for (size_t x = 11; x < 13; x++)
for (size_t z = 1; z < 4; z++)
for (size_t y = 3; y < 8; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), x, y, z);
//Entites PNJ
pack = NewDialoguePack(NewDialogue(Dialogues+4,"Panneau",0,NULL,NULL,(lambdaFunction){Background_DrawWorld, NULL}));
SpawnPNJ(AllSprites[Sprite_Entities+5], 16, 3, 2, pack);
SpawnCoin(19,3,1);
pack = NewDialoguePack(NewDialogue(Dialogues+8,"Panneau",0,NULL,NULL,(lambdaFunction){Background_DrawWorld, NULL}));
SpawnPNJ(AllSprites[Sprite_Entities+5], 21, 3, 2, pack);
PlaceEntity(CreateEntity(AllSprites[Sprite_Entities+11], 23, 5, 1), 23, 5, 3);//SHIFT
for (size_t x = 26; x < 28; x++)
for (size_t z = 1; z < 3; z++)
for (size_t y = 1; y < 2; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), x, y, z);
for (size_t x = 26; x < 28; x++)
for (size_t z = 1; z < 3; z++)
PlaceBlock(CreateBlock(GRASS, 0, 0, 0), x, 2, z);
for (size_t x = 23; x < 30; x++)
for (size_t z = 0; z < 4; z++)
PlaceBlock(CreateBlock(LAVA, 0, 0, 0), x, 0, z);
SpawnCoin(27,3,1)->x-=BLOCK_SIZE/2;
///P2
for (size_t x = 30; x < 52; x++)
for (size_t z = 0; z < 4; z++)
PlaceBlock(CreateBlock(GRASS, 0, 0, 0), x, 2, z);
for (size_t x = 30; x < 52; x++)
for (size_t y = 0; y < 2; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), x, y, 0);
for (size_t z = 0; z < 4; z++)
for (size_t y = 0; y < 2; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), 51, y, z);
for (size_t z = 0; z < 4; z++)
for (size_t y = 0; y < 2; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), 30, y, z);
//SpawnGoomba(32, 3, 2);
pack = NewDialoguePack(NewDialogue(Dialogues+4*3,"Panneau",0,NULL,NULL,(lambdaFunction){Background_DrawWorld, NULL}));
SpawnPNJ(AllSprites[Sprite_Entities+5], 33, 3, 2, pack);
PlaceEntity(CreateEntity(AllSprites[Sprite_Entities+13], 2, 4, 1), 34, 5, 0);//F1
PlaceEntity(CreateEntity(AllSprites[Sprite_Entities+14], 2, 4, 1), 36, 5, 0);//F2
for (size_t z = 0; z < 4; z++)
for (size_t x = 37; x < 43; x++)
{
if ((x==38 ||x==39||x==40)&& (z==4 || z==3 || z==2))
continue;
PlaceBlock(CreateBlock(BRICK, 0, 0, 0), x, 6, z);
PlaceBlock(CreateBlock(BRICK, 0, 0, 0), x, 7, z);
}
SpawnKey(39, 6, 3)->y-=BLOCK_SIZE/2;
pack = NewDialoguePack(NewDialogue(Dialogues+4*4,"Panneau",0,NULL,NULL,(lambdaFunction){Background_DrawWorld, NULL}));
SpawnPNJ(AllSprites[Sprite_Entities+5], 45, 3, 2, pack);
SpawnCheckpoint(48, 3, 2);
for (size_t x = 52; x < 66; x++)
for (size_t z = 0; z < 4; z++)
PlaceBlock(CreateBlock(LAVA, 0, 0, 0), x, 0, z);
//////
for (size_t x = 54; x < 56; x++)
for (size_t z = 3; z < 4; z++)
{
for (size_t y = 1; y < 2; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), x, y, z);
PlaceBlock(CreateBlock(GRASS, 0, 0, 0), x, 2, z);
}
SpawnCoin(55,3,3)->x-=BLOCK_SIZE/2;
for (size_t x = 58; x < 60; x++)
for (size_t z = 3; z < 4; z++)
{
for (size_t y = 1; y < 2; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), x, y, z);
PlaceBlock(CreateBlock(GRASS, 0, 0, 0), x, 2, z);
}
SpawnCoin(59,3,3)->x-=BLOCK_SIZE/2;
for (size_t x = 58; x < 60; x++)
for (size_t z = 0; z < 1; z++)
{
for (size_t y = 1; y < 2; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), x, y, z);
PlaceBlock(CreateBlock(GRASS, 0, 0, 0), x, 2, z);
}
SpawnCoin(59,3,0)->x-=BLOCK_SIZE/2;
for (size_t x = 62; x < 64; x++)
for (size_t z = 0; z < 1; z++)
{
for (size_t y = 1; y < 2; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), x, y, z);
PlaceBlock(CreateBlock(GRASS, 0, 0, 0), x, 2, z);
}
SpawnCoin(63,3,0)->x-=BLOCK_SIZE/2;
//////
///P2
for (size_t x = 66; x < 90; x++)
for (size_t z = 0; z < 4; z++)
PlaceBlock(CreateBlock(GRASS, 0, 0, 0), x, 2, z);
for (size_t x = 66; x < 90; x++)
for (size_t y = 0; y < 2; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), x, y, 0);
for (size_t z = 0; z < 4; z++)
for (size_t y = 0; y < 2; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), 89, y, z);
for (size_t z = 0; z < 4; z++)
for (size_t y = 0; y < 2; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), 66, y, z);
pack = NewDialoguePack(NewDialogue(Dialogues+4*5,"Panneau",0,NULL,NULL,(lambdaFunction){Background_DrawWorld, NULL}));
SpawnPNJ(AllSprites[Sprite_Entities+5], 67, 3, 2, pack);
for (size_t x = 72; x < 77; x++)
for (size_t z = 0; z < 4; z++)
{
for (size_t y = 0; y < 6; y++)
PlaceBlock(CreateBlock(DIRT, 0, 0, 0), x, y, z);
PlaceBlock(CreateBlock(GRASS, 0, 0, 0), x, 6, z);
}
for (size_t i = 0; i < 4; i++)
{
for (size_t x = 73+i; x < 78; x++)
RemoveBlock(x, 6-i, 0);
PlaceBlock(CreateBlock(GRASS, 0, 0, 0), 73+i, 5-i, 0);
}
PlaceBlock(CreateBlock(BRICK, 0, 0, 0), 71, 3, 3);
PlaceBlock(CreateBlock(BRICK, 0, 0, 0), 70, 3, 3);
PlaceBlock(CreateBlock(BRICK, 0, 0, 0), 69, 4, 3);
PlaceBlock(CreateBlock(BRICK, 0, 0, 0), 68, 5, 3);
PlaceBlock(CreateBlock(BRICK, 0, 0, 0), 68, 6, 2);
SpawnBrickBreakable(71, 5, 2);
SpawnBrickBreakable(70, 5, 2);
for (size_t x = 68; x < 72; x++)
for (size_t z = 0; z < 2; z++)
PlaceBlock(CreateBlock(BRICK, 0, 0, 0), x, 6, z);
//FENCE
Block* block = CreateBlock(FENCE, 0, 0, 0);
PlaceBlock(block, 67, 7, 0);
ShowSideBlock(block,0,0,1,0,0,0,0);
PlaceBlock(CreateBlock(BARRIER_INVISIBLE, 0, 0, 0), 67, 8, 0);
PlaceBlock(CreateBlock(BARRIER_INVISIBLE, 0, 0, 0), 67, 9, 0);
block = CreateBlock(FENCE, 0, 0, 0);
PlaceBlock(block, 68, 7, 0);
ShowSideBlock(block,1,1,0,0,0,0,0);
block = CreateBlock(FENCE, 0, 0, 0);
PlaceBlock(block, 67, 7, 1);
ShowSideBlock(block,0,0,1,0,0,0,0);
PlaceBlock(CreateBlock(BARRIER_INVISIBLE, 0, 0, 0), 67, 8, 1);
PlaceBlock(CreateBlock(BARRIER_INVISIBLE, 0, 0, 0), 67, 9, 1);
block = CreateBlock(FENCE, 0, 0, 0);
PlaceBlock(block, 68, 7, 1);
ShowSideBlock(block,0,1,0,0,0,0,0);
block = CreateBlock(FENCE, 0, 0, 0);
PlaceBlock(block, 69, 7, 0);
ShowSideBlock(block,1,0,0,0,0,0,0);
block = CreateBlock(FENCE, 0, 0, 0);
PlaceBlock(block, 70, 7, 0);
ShowSideBlock(block,1,0,0,0,0,0,0);
block = CreateBlock(FENCE, 0, 0, 0);
PlaceBlock(block, 71, 7, 0);
ShowSideBlock(block,1,0,0,0,0,0,0);
pack = NewDialoguePack(NewDialogue(Dialogues+4*6,"Panneau",0,NULL,NULL,(lambdaFunction){Background_DrawWorld, NULL}));
SpawnPNJ(AllSprites[Sprite_Entities+5], 85, 3, 2, pack);
SpawnEndDoor(87, 4, 3,LeveL1_End);
SpawnMysteryBox( 79, 5, 0);
SpawnBrickBreakable( 80, 5, 0);
SpawnMysteryBox( 81, 5, 0);
SpawnBrickBreakable( 82, 5, 0);
SpawnMysteryBox( 83, 5, 0);
SpawnCoin( 83, 6, 0);
/////////////////////////////////////
/////////////////////////////////////
CullingShadowWorld();
ResetCameraPosition(p);
UpdateWorld();
FadeOut((lambdaFunction){Background_DrawWorld, NULL});
}
Après si tu veux m'aider à en faire il n'y a pas de soucis @Slyvtt |