GMBR
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Entrar

Esqueci-me da senha

Últimos assuntos
» player não consegue andar
por lovn7 Qui 21 Nov 2024, 13:33

» É possível fazer istó no game maker
por William Lima Qui 21 Nov 2024, 10:56

» Rio Rise - novo launcher do Gta San Andreas SAMP Brasil
por Lua Sáb 16 Nov 2024, 20:22

» (Resolvido) Cenario longo x Texture Pages
por josuedemoraes Sáb 16 Nov 2024, 15:31

» Kids' band
por Adilson Lucindo Santos Sex 15 Nov 2024, 12:23

» (RESOLVIDO) Engasgos-Troca de Sprites/animações
por josuedemoraes Ter 12 Nov 2024, 01:49

» Block Room - DEMO
por Joton Qua 06 Nov 2024, 22:58

» Game Infinito vertical (subindo)
por macmilam Sáb 26 Out 2024, 12:36

» Retorno da GMBR!!!
por Dancity Ter 22 Out 2024, 16:36

» Máquina de estados
por aminaro Qui 10 Out 2024, 13:33

» como faço pra um objeto colidir com o outro e diminuir a vida do player ?
por josuedemoraes Qui 03 Out 2024, 16:51

» RESOLVIDO: Colisão com objetos moveis
por josuedemoraes Qua 02 Out 2024, 20:28

» Crypt of the Blood Moon
por divin sphere Qua 11 Set 2024, 18:18

» como fazer um objeto seguir?
por divin sphere Dom 18 Ago 2024, 18:08

» Procuro de alguém para Modelar/Texturizar/Animar objetos 3D
por un00brn Dom 11 Ago 2024, 11:10

» Destruição de cenário (estilo DD Tank)
por CoronelZeg Sex 09 Ago 2024, 17:16

» RESOLVIDO-Como destruir uma instancia especifica de um objeto
por josuedemoraes Ter 23 Jul 2024, 00:40

» Automatizar a coleta de id
por GabrielXavier Seg 22 Jul 2024, 18:01

» Preciso de ajuda para concluir um pequeno projeto
por lmoura Qui 27 Jun 2024, 15:45

» ANGULO ACOMPANHAR O OBJETO
por Klinton Rodrigues Qui 27 Jun 2024, 08:34

» Musica reinicia quando sala reinicia
por GabrielXavier Ter 18 Jun 2024, 07:28

» como fazer uma copia de gd
por generico_cube Sex 14 Jun 2024, 15:48

» Square Adventure
por guilherme551 Ter 11 Jun 2024, 09:54

» como posso definir limite de uma variavel
por GabrielXavier Sex 07 Jun 2024, 14:14

» [Resolvido] Dúvida, colisão única de objeto
por vdm842 Sex 24 maio 2024, 09:50


Small Ball 0.1

2 participantes

Ir para baixo

Small Ball 0.1 Empty Small Ball 0.1

Mensagem por Cainã Dom 17 Out 2010, 14:12

Antes de ir embora irei compartilhar com vocês um pequeno joguinho feito em código para se alguém quiser alguma idéia de como fazer isso. O código deve ser colocado no Creation Code de uma Room vazia.

A seguir o código:
Código:

{

/* S M A L L  B A L L  0.1  by Cainã

Este Script foi criado por Cainã para o fórum Game Maker Brasil.

Para executar este jogo é necessário o Game Maker 8.0 Pro. Coloque este código no Creation Code de uma Room vazia.

Visite:  http://www.cainasoftware.com/

          http://www.gamemakerbrasil.com/


/*CONFIGURAÇÕES DA JANELA*/

globalvar WindowWidth, WindowHeight ;

WindowWidth := 320 ;

WindowHeight := 240 ;

window_set_showicons(false) ;

window_set_cursor(true) ;

window_set_fullscreen(false) ;

window_set_position(display_get_width() / 2 - WindowWidth / 2, display_get_height() / 2 - WindowHeight / 2) ;

window_set_sizeable(false) ;

window_set_stayontop(true) ;

window_set_visible(false) ;


globalvar ProgramName, InfoFile, BckGame, RoomMenu ;

ProgramName := "Small Ball 0.1" ;

set_application_title(ProgramName) ;


/*CRIAÇÃO DO ARQUIVO DE INFO*/

InfoFile := temp_directory + "/" + "Info.htm" ;

var InfoText, InfoStr ;

InfoText := file_text_open_write(InfoFile) ;

InfoStr := '

    <html>

    <head>

    <title> Small Ball 0.1 </title>

    </head>

    <body>

    <body style="background-attachment: fixed; background-repeat: no-repeat;" background="Back.png">
   
    <body link = "gray" alink = "gray" vlink = "gray">

    <center> <b> <font face = "Arial" size = "5" color = rgb(180,255,180)> Small Ball 0.1 </font> </b> </center> <br>
   
    <font face = "Arial" size = "2" color = rgb(255,255,255)>
   
    <b>-Informações:</b><br>
   
    Este jogo foi criado por Cainã para o fórum Game Maker Brasil. A distribuição do mesmo só é permitida com a autorização
   
    do autor.<br> <br>
   
    <b>-Instruções:</b><br>
   
    Use as setas para movimentar a bolinha. O objetivo é atingir o final da fase, passando por todos os obstáculos.<br> <br>

    <b>-Créditos:</b><br>
   
    Criado por Cainã (Cainã Software).<br> <br>
   
    Visite <b><a href = "http://www.cainasoftware.com/" target = "_blank"> Cainã Software </a> </b> e <b> <a href = "http://www.gamemakerbrasil.com/" target = "_blank"> Game Maker Brasil </a> </b>
   
    </body>

    </html>

' ;

file_text_write_string(InfoText, InfoStr) ;

file_text_close(InfoText) ;


/*CRIAÇÃO DO BACKGROUND PRINCIPAL*/

BckGame := background_create_gradient(WindowWidth, WindowHeight, make_color_rgb(0, 0, 0), make_color_rgb(32, 32, 32), 1) ;

background_save(BckGame, temp_directory + "/" + "Back.png") ;


/*CRIAÇÃO DA ROOM DO MENU*/

RoomMenu := room_add() ;

room_set_width(RoomMenu, WindowWidth) ;

room_set_height(RoomMenu, WindowHeight) ;

room_set_caption(RoomMenu, "Small Ball 0.1") ;

room_set_background(RoomMenu, 0, true, false, BckGame, x, y, false, false, 0, 0, 1) ;


/*CRIAÇÃO DAS FONTES */

globalvar FntTitle, FntButton ;

FntTitle := font_add("Arial", 20, true, false, 0, 255) ;

FntButton := font_add("Arial", 12, false, false, 0, 255) ;


/*CRIAÇÃO DO OBJETO DE MENU*/

/*Textos do ítem Sair*/

globalvar ExitText, ExitButton1, ExitButton2, ExitButton3 ;
   
    ExitText := 'Deseja realmente sair?' ;
   
    ExitButton1 := 'Sim' ;
   
    ExitButton2 := '' ;
   
    ExitButton3 := 'Não' ;

globalvar ObjMenu ;

ObjMenu := object_add() ;

var ObjMenuCreate, ObjMenuStep, ObjMenuDraw ;

ObjMenuCreate := "

{

    ButtonsNumber := 3 ;

    MenuItemSelected := 0 ;

    MenuItem[0, 0] := 'Iniciar' ;

    MenuItem[0, 1] := 'room_goto(global.RoomLevel[1]) ;' ;

    MenuItem[1, 0] := 'Info' ;
   
    MenuItem[1, 1] := '
   
    splash_set_stop_key(true) ;

    splash_set_close_button(true) ;

    splash_show_web(global.InfoFile, -1) ;

        ' ;

    MenuItem[2, 0] := 'Sair' ;
   
    MenuItem[2, 1] := '
   
    var Question ;
   
    Question := show_message_ext(global.ExitText, global.ExitButton1, global.ExitButton2, global.ExitButton3) ;
   
    if (Question == 1) {
   
        game_end() ;
       
    }
   
    else {
   
        io_clear() ;
       
    }
   
    ' ;

}

" ;

object_event_add(ObjMenu, ev_create, 0, ObjMenuCreate) ;

ObjMenuStep := "

{

    if (keyboard_check_released(vk_down)) {

        if (MenuItemSelected < ButtonsNumber - 1) {

            MenuItemSelected += 1;

        }

        else{

            MenuItemSelected := 0;

        }

    }

    if (keyboard_check_released(vk_up)) {

        if (MenuItemSelected > 0) {

            MenuItemSelected -= 1;

        }

        else{

            MenuItemSelected = ButtonsNumber - 1;

        }

    }

    if (keyboard_check_pressed(vk_enter)){

        execute_string(MenuItem[MenuItemSelected,1]) ;

    }

}

" ;

object_event_add(ObjMenu, ev_step, ev_step_normal, ObjMenuStep) ;

ObjMenuDraw := "

{

    var MenuPosX, MenuPosY, ButWidth, ButHeight, ButDist, ButNotSelectedColor1, ButNotSelectedColor2, ButSelectedColor1, ButSelectedColor2, ButBorderColor, ButTextColor, ButTextFont, TitleColor1, TitleColor2 ;

    MenuPosX := global.WindowWidth / 2 - 48 ;

    MenuPosY := global.WindowHeight / 2 - 36 ;

    ButWidth := 96 ;

    ButHeight := 24 ;

    ButDist := 42 ;

    ButNotSelectedColor1 := make_color_rgb(0, 0, 0) ;

    ButNotSelectedColor2 := make_color_rgb(32, 32, 32) ;

    ButSelectedColor1 := make_color_rgb(100, 16, 16) ;

    ButSelectedColor2 := make_color_rgb(150, 48, 48) ;

    ButBorderColor := make_color_rgb(180, 180, 180) ;

    ButTextColor := make_color_rgb(255, 255, 255) ;

    TitleColor1 := make_color_rgb(180, 255, 180)

    TitleColor2 := make_color_rgb(150, 210, 150)

    draw_set_valign(fa_middle) ;

    draw_set_halign(fa_center) ;

    for (Vector = 0; Vector < ButtonsNumber; Vector += 1) {

        if (Vector = MenuItemSelected){

            draw_rectangle_color(MenuPosX, MenuPosY + Vector * ButDist, MenuPosX + ButWidth, MenuPosY + ButHeight + Vector * ButDist, ButSelectedColor1, ButSelectedColor1, ButSelectedColor2, ButSelectedColor2, false) ;

        }

        else{

            draw_rectangle_color(MenuPosX, MenuPosY + Vector * ButDist, MenuPosX + ButWidth, MenuPosY + ButHeight + Vector * ButDist, ButNotSelectedColor1, ButNotSelectedColor1, ButNotSelectedColor2, ButNotSelectedColor2, false) ;

        }

    draw_set_color(ButBorderColor) ;

    draw_rectangle(MenuPosX, MenuPosY + Vector * ButDist, MenuPosX + ButWidth, MenuPosY + ButHeight + Vector * ButDist, true) ;

    draw_set_color(ButTextColor) ;

    draw_set_font(global.FntButton) ;

    draw_text(MenuPosX + ButWidth / 2, MenuPosY + ButHeight / 2 + Vector * ButDist, MenuItem[Vector,0]) ;

    }

    draw_set_font(global.FntTitle) ;

    draw_text_color(global.WindowWidth / 2, 32, global.ProgramName, TitleColor1, TitleColor1, TitleColor2, TitleColor2, 0.8) ;

}

" ;

object_event_add(ObjMenu, ev_draw, 0, ObjMenuDraw) ;

room_instance_add(RoomMenu, 0, 0, ObjMenu) ;


/*OBJETO DE TRANSIÇÃO*/

globalvar ObjTransition ;

ObjTransition := object_add() ;

var ObjTransitionCreate, ObjTransitionStep, ObjTransitionRoomStart, ObjTransitionDraw ;

ObjTransitionCreate := "

{

    Dimin := 0.05 ;

    Blend := 0.5 ;

}

" ;

object_event_add(ObjTransition, ev_create, 0, ObjTransitionCreate) ;

ObjTransitionStep := "

{

    if (Blend > 0) {

        Blend -= Dimin ;

    }

}

" ;

object_event_add(ObjTransition, ev_step, ev_step_normal, ObjTransitionStep) ;

ObjTransitionRoomStart := "

{

    Blend := 0.5 ;

}

" ;

object_event_add(ObjTransition, ev_other, ev_room_start, ObjTransitionRoomStart) ;

ObjTransitionDraw := "

{

    draw_set_color(c_white) ;

    draw_set_alpha(Blend) ;

    draw_rectangle(0, 0, room_width, room_height, false) ;

    draw_set_alpha(1) ;

}

" ;

object_event_add(ObjTransition, ev_draw, 0, ObjTransitionDraw) ;

object_set_persistent(ObjTransition, true) ;

instance_create(0, 0, ObjTransition) ;


/*CRIAÇÃO DAS SPRITES*/

globalvar ObjSpritesCreator ;

var ObjSpritesCreatorCreate, ObjSpritesCreatorAlarm0, ObjSpritesCreatorDraw ;

ObjSpritesCreator := object_add() ;

ObjSpritesCreatorCreate := "

{

    alarm[0] := 10 ;
   
    CanDraw := true ;

}

" ;

object_event_add(ObjSpritesCreator, ev_create, 0, ObjSpritesCreatorCreate) ;

ObjSpritesCreatorAlarm0 := "

{

    globalvar SprBall, SprBlock, SprButton ;

    SprBall := sprite_create_from_screen(0, 0, 24, 24, true, true, 0, 0) ;
   
    SprBlock := sprite_create_from_screen(24, 0, 16, 16, false, false, 0, 0) ;
       
    SprButton := sprite_create_from_screen(42, 0, 64, 24, false, false, 0, 0) ;
   
    sprite_add_from_screen(SprButton, 42, 24, 64, 24, false, false) ;
   
    sprite_save(global.SprBall, 0, '123.png') ;
   
    CanDraw := false ;
   
        /*CONFIGURAÇÔES DA MENSAGEM*/

        message_alpha(1) ;

        message_background(BckGame) ;

        message_button(global.SprButton) ;

        message_button_font(global.FntButton, 11, c_white, 0) ;

        message_position(window_get_x(), window_get_y()) ;

        message_size(global.WindowWidth, global.WindowHeight) ;

        message_text_font(global.FntButton, 12, c_white, 0) ;
   
    window_set_visible(true) ;
}
       
" ;

object_event_add(ObjSpritesCreator, ev_alarm, 0, ObjSpritesCreatorAlarm0) ;

ObjSpritesCreatorDraw := "

{

    if (CanDraw == true) {
   
        //BASE DE DESENHO

        draw_set_color(c_fuchsia) ;
   
        draw_rectangle(0, 0, global.WindowWidth, global.WindowHeight, false) ;
       
       
        //BOLINHA

        draw_ellipse_color(0, 0, 23, 23, make_color_rgb(100, 100, 100), make_color_rgb(210, 210, 210), false) ;

        draw_set_color(make_color_rgb(0, 0, 0)) ;

        draw_ellipse(0, 0, 23, 23, true) ;
       
       
        //BLOCO
       
        var Color1, Color2 ;
       
        Color1 := make_color_rgb(255, 255, 255) ;
       
        Color2 := make_color_rgb(120, 120, 120) ;
       
        draw_rectangle_color(25, 1, 39, 15,  Color1, Color2, Color2, Color1, false) ;
       
        draw_set_color(make_color_rgb(0, 0, 0)) ;
       
        draw_rectangle(24, 0, 39, 15, true) ;
       
       
        //BOTÃO
       
        draw_rectangle_color(41, 0, 105, 23, c_black, c_black, c_dkgray, c_dkgray, false) ;
       
        draw_rectangle_color(41, 24, 105, 47, c_dkgray, c_dkgray, c_gray, c_gray, false) ;
       
        draw_set_color(c_gray) ;
       
        draw_rectangle(42, 0, 105, 23, true) ;
       
        draw_rectangle(42, 24, 105, 47, true) ;
   
    }       
           
}

" ;

object_event_add(ObjSpritesCreator, ev_draw, 0, ObjSpritesCreatorDraw)

object_set_persistent(ObjSpritesCreator, true) ;

room_instance_add(RoomMenu, 0, 0, ObjSpritesCreator) ;


/*CRIAÇÃO DOS OBJETOS*/

globalvar ObjObjectsCreator ;

var ObjObjectsCreatorCreate, ObjObjectsCreatorAlarm0  ;

ObjObjectsCreator := object_add() ;

ObjObjectsCreatorCreate := "

{

alarm[0] := 14 ;

}

" ;

object_event_add(ObjObjectsCreator, ev_create, 0, ObjObjectsCreatorCreate) ;

ObjObjectsCreatorAlarm0 := "

{

    globalvar ObjBall, ObjBlock ;

    ObjBall := object_add() ;

    var ObjBallCreate, ObjBallStep, ObjBallCollision ;

    object_set_sprite(ObjBall, global.SprBall) ;

    ObjBallCreate := '

    {

        Speed := 0 ;

        Direction := 0 ;

        MaxSpeed := 8 ;

      PowerAceleration := .5 ;

      Moving := false ;

        gravity := 1 ;
   
      gravity_direction := 270 ;
   
      view_object[0] := global.ObjBall ;
   
    }

    ' ;

    object_event_add(ObjBall, ev_create, 0, ObjBallCreate) ;

    ObjBallStep := '

    {

        if (keyboard_check(vk_left)) {

            if (Speed == 0) {

                Moving := true ;

                Direction := 0 ;
               
            }

        }

        if (keyboard_check(vk_right)) {

            if (Speed == 0) {

                Moving := true ;

                Direction := 1 ;

            }

        }

        if (keyboard_check_released(vk_left)) {

            Moving := false ;

        }

        if (keyboard_check_released(vk_right)) {

            Moving := false ;

        }

        if (Moving == true) {

            if (Direction == 0) {

                if (Speed < MaxSpeed) {

                    Speed += PowerAceleration ;

                }
               
                if !(place_meeting(x - Speed, y, global.ObjBlock)) {

                    x -= Speed ;
               
                }
               
                else {

                    Moving := false ;

                    Direction = 1 ;

                    y += (Speed * 2) ;

                }

            }

            else {

                if (Speed < MaxSpeed) {

                    Speed += PowerAceleration ;

                }

                if !(place_meeting(x + Speed + PowerAceleration, y, global.ObjBlock)) {
                   
                    x += Speed ;
                   
                }
               
                else {

                    Moving := false ;

                    Direction = 0 ;

                    y -= (Speed * 2) ;

                }

            }

        }

        else {

            if (Direction == 0) {

                if (Speed != 0) {

                    Speed -= PowerAceleration ;

                }

                x -= Speed ;

            }

            else {

                if (Speed != 0) {

                    Speed -= PowerAceleration ;

                }

                x += Speed ;

            }

        }
               
    }

    ' ;
   
    object_event_add(ObjBall, ev_step, ev_step_normal, ObjBallStep) ;
   
    ObjBallCollision := '
   
    {
   
        if (place_meeting(x, y + vspeed + 1, global.ObjBlock)) {
       
            vspeed := -15 ;
       
        }
       
        else {
       
            vspeed += -vspeed ;
       
        }
 
    }
   
    ' ;
   
    object_set_solid(ObjBall, true) ;
   
    ObjBlock := object_add() ;
   
    object_set_solid(ObjBlock, true) ;
   
    object_set_sprite(ObjBlock, global.SprBlock) ;
   
    object_event_add(ObjBall, ev_collision, ObjBlock, ObjBallCollision) ;
   
}

" ;

object_event_add(ObjObjectsCreator, ev_alarm, 0, ObjObjectsCreatorAlarm0) ;

room_instance_add(RoomMenu, 0, 0, ObjObjectsCreator) ;


/*CRIAÇÃO DAS FASES*/

globalvar ObjRoomsCreator ;

var ObjRoomsCreatorCreate, ObjRoomsCreatorAlarm0 ;

ObjRoomsCreator := object_add() ;

ObjRoomsCreatorCreate := "

{

    alarm[0] := 16 ;

}

" ;

object_event_add(ObjRoomsCreator, ev_create, 0, ObjRoomsCreatorCreate) ;

ObjRoomsCreatorAlarm0 := "

{

    globalvar RoomLevel ;

    /*FASE 1*/

    var Blocks ;

    Blocks := 100 ;

    RoomLevel[1] := room_add() ;

    room_set_width(RoomLevel[1], Blocks * 16) ;

    room_set_height(RoomLevel[1], WindowHeight) ;

    room_set_caption(RoomLevel[1], 'Small Ball 0.1') ;

    room_set_background(RoomLevel[1], 0, true, false, BckGame, 0, 0, true, false, 0, 0, 1) ;

    room_set_view(RoomLevel[1], 0, true, 0, 0, WindowWidth, WindowHeight, 0, 0, WindowWidth, WindowHeight, WindowWidth / 2, WindowHeight / 2, -1, -1, noone) ;

    room_set_view_enabled(RoomLevel[1], true) ;

    room_instance_add(RoomLevel[1], 64, 19, global.ObjBall) ;

    for (Vector := 1; Vector < Blocks - 1; Vector += 1) {

        room_instance_add(RoomLevel[1], Vector * 16, global.WindowHeight - 16, global.ObjBlock) ;

    }
   
    for (Vector := 1; Vector < Blocks - 1; Vector += 1) {

        room_instance_add(RoomLevel[1], Vector * 16, 0, global.ObjBlock) ;

    }
   
    for (Vector := 0; Vector < global.WindowHeight / 16; Vector += 1) {

        room_instance_add(RoomLevel[1], 0, Vector * 16, global.ObjBlock) ;

    }
   
    for (Vector := 0; Vector < global.WindowHeight / 16; Vector += 1) {

        room_instance_add(RoomLevel[1], Blocks * 16 - 16, Vector * 16, global.ObjBlock) ;

    }
   
    var LineObjString, TempObject ;
   
    LineObjString[1] := 'BVVVVVVVVVVVVVVVVBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVB' ;
    LineObjString[2] := 'BVVVVVVVVVVVVVVVVBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' ;
    LineObjString[3] := 'BVVVVVVVVVVVVVVVVBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' ;
    LineObjString[4] := 'BVVVVVVVVVVVVVVVVBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' ;
    LineObjString[5] := 'BVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' ;
    LineObjString[6] := 'BVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' ;
    LineObjString[7] := 'BVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' ;
    LineObjString[8] := 'BVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' ;
    LineObjString[9] := 'BVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' ;
  LineObjString[10] := 'BVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' ;
  LineObjString[11] := 'BVVVVVVVVVVVVVVVBBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' ;
  LineObjString[12] := 'BVVVVVVVVVVVVBBBBBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVBV' ;
  LineObjString[13] := 'BVVVVVVVVBBBBBBBBBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVB' ;
   
    for (V1 := 1; V1 <= 13; V1 += 1) {
   
        for(V2 := 0; V2 <= Blocks - 2; V2 += 1) {
       
            TempObject := string_char_at(LineObjString[V1], V2) ;
       
            switch (TempObject) {
       
                case ('V') :
           
                break ;
           
                case ('B') :
           
                    room_instance_add(RoomLevel[1], V2 * 16, V1 * 16, global.ObjBlock) ;
           
                break ;
           
            }
       
        }
   
    }
         
}

" ;

object_event_add(ObjRoomsCreator, ev_alarm, 0, ObjRoomsCreatorAlarm0) ;

room_instance_add(RoomMenu, 0, 0, ObjRoomsCreator) ;



room_goto(RoomMenu) ;

}
O código é bem complexo mas se entenderem podem usar do jeito que quiserem, não quero créditos. Flw!
Cainã
Cainã

Data de inscrição : 07/03/2010
Reputação : 1
Número de Mensagens : 1335
Prêmios : Small Ball 0.1 Empty

Medalhas x 0 Tutoriais x 0 Moedas x 0

Ouro x 0 Prata x 0 Bronze x 0

Insignia 1 x 0 Insignia 2 x 0 Insignia 3 x 0

http://cai.na.tl/

Ir para o topo Ir para baixo

Small Ball 0.1 Empty Re: Small Ball 0.1

Mensagem por correiajoao Dom 17 Out 2010, 14:36

BEM LEGAL SEU JOGO EM CODIGO!

Tem de ter muita experiencia para conseguir fazer o que fez em codigo!!



Happy
correiajoao
correiajoao

Data de inscrição : 05/06/2010
Reputação : 0
Número de Mensagens : 353
Prêmios : Small Ball 0.1 Empty

Medalhas x 0 Tutoriais x 0 Moedas x 0

Ouro x 0 Prata x 0 Bronze x 0

Insignia 1 x 0 Insignia 2 x 0 Insignia 3 x 0

Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

 
Permissões neste sub-fórum
Não podes responder a tópicos