Adblock breaks this site

rate my first delphi game!

Discussion in 'Web Programming' started by Ronaldotjuh, Jun 19, 2007.

  1. Ronaldotjuh

    Ronaldotjuh Apprentice

    Joined:
    May 15, 2005
    Posts:
    706
    Referrals:
    1
    Sythe Gold:
    0
    rate my first delphi game!

    Heya I made this for school. It's a sort of camel race with Bush and Saddam racing against eachother. Have a look at it and rate it.

    A few translation you can use with picture:
    Snelheid = speed
    nieuw spel = new game

    here's picture from game in action:
    [​IMG]

    Here's code I made myself:
    Code:
    unit race1;
    interface
    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, ExtCtrls, StdCtrls, jpeg, math;
    type
      TForm1 = class(TForm)
        Panel1: TPanel;
        Panel2: TPanel;
        Panel3: TPanel;
        Button1: TButton;
        Button2: TButton;
        Button3: TButton;
        edBush: TEdit;
        edSaddam: TEdit;
        Panel4: TPanel;
        Panel5: TPanel;
        Timer1: TTimer;
        Timer2: TTimer;
        bush: TImage;
        saddam: TImage;
        procedure Button2Click(Sender: TObject);
        procedure Timer1Timer(Sender: TObject);
        procedure Timer2Timer(Sender: TObject);
        procedure Button1Click(Sender: TObject);
        procedure FormCreate(Sender: TObject);
        procedure Button3Click(Sender: TObject);
      private
        { Private declarations }
      public
      Snelheid: integer;
      snelheid1: integer;
      saddamscore, bushscore: integer;
      end;
    var
      Form1: TForm1;
    implementation
    {$R *.dfm}
    procedure TForm1.Button2Click(Sender: TObject);
    begin
    Randomize;
      Snelheid := RandomRange(10,100);
      panel1.Caption := 'Snelheid bush=  ' + IntToStr(Snelheid);
      Timer2.enabled:=true;
      Timer2.interval:= Snelheid;
      Snelheid1 := RandomRange(10,100);
      panel3.Caption := 'Snelheid saddam=  ' + IntToStr(Snelheid1);
      Timer1.enabled:=true;
      Timer1.interval:= Snelheid1;
    
    end;
     
    
    procedure TForm1.Timer1Timer(Sender: TObject);
    begin
       bush.left:=bush.Left+6;
    If bush.left>=472  Then
    begin
    Timer1.interval :=0;
    Timer2.interval :=0;
    Bushscore:= bushscore +1;
    edbush.Text:= IntToStr(bushscore);
    end;
    end;
    
    procedure TForm1.Timer2Timer(Sender: TObject);
    begin
       saddam.left:=saddam.Left+6;
    If saddam.left >= 472 then
    begin
    timer2.interval :=0;
    Timer1.interval :=0;
    saddamscore:= saddamscore +1;
    edSaddam.text:= IntToStr(saddamscore);
    end;
    end;
    procedure TForm1.Button1Click(Sender: TObject);
    begin
    timer1.interval := 0;
    bush.left    := 0;
    timer2.Interval := 0;
    saddam.Left   := 0;
    end;
    procedure TForm1.FormCreate(Sender: TObject);
    begin
    saddamscore:= 0;
    bushscore:= 0;
    end;
    procedure TForm1.Button3Click(Sender: TObject);
    begin
    saddamscore:= 0;
    bushscore:= 0;
    edSaddam.Text:= IntToStr(Saddamscore);
    edBush.Text:= IntToStr(bushscore);
    end;
    end.
    
     
  2. pljay03

    pljay03 Member

    Joined:
    Nov 19, 2005
    Posts:
    69
    Referrals:
    0
    Sythe Gold:
    0
    rate my first delphi game!

    Looks nice, good job mate.
     
  3. chooby tiger

    chooby tiger Forum Addict
    Banned

    Joined:
    Feb 9, 2007
    Posts:
    309
    Referrals:
    0
    Sythe Gold:
    0
    rate my first delphi game!

    cool, I hope George wins!
     
  4. Ronaldotjuh

    Ronaldotjuh Apprentice

    Joined:
    May 15, 2005
    Posts:
    706
    Referrals:
    1
    Sythe Gold:
    0
    rate my first delphi game!

    If you change this:
    Code:
    Randomize;
      Snelheid := RandomRange(10,100);
      panel1.Caption := 'Snelheid bush=  ' + IntToStr(Snelheid);
      Timer2.enabled:=true;
      Timer2.interval:= Snelheid;
      Snelheid1 := RandomRange(10,100);
      panel3.Caption := 'Snelheid saddam=  ' + IntToStr(Snelheid1);
      Timer1.enabled:=true;
      Timer1.interval:= Snelheid1;
    
    To this:
    Code:
    Randomize;
      Snelheid := RandomRange(50,100);
      panel1.Caption := 'Snelheid bush=  ' + IntToStr(Snelheid);
      Timer2.enabled:=true;
      Timer2.interval:= Snelheid;
      Snelheid1 := RandomRange(10,49);
      panel3.Caption := 'Snelheid saddam=  ' + IntToStr(Snelheid1);
      Timer1.enabled:=true;
      Timer1.interval:= Snelheid1;
    
    Bush wins always coz randomrange is higher :d
    Now bush goes between 50 -100 and Saddam goes between 10 - 49. This is where saddam got pwnd lawl.

    Thx for saying it's a cool game, really happy about that.
     
  5. peanuts

    peanuts Guru
    Banned

    Joined:
    May 29, 2007
    Posts:
    1,492
    Referrals:
    1
    Sythe Gold:
    0
    rate my first delphi game!

    upload it somewhere so we can play it. You fun stealing bastard =).
     
  6. Xzsz33

    Xzsz33 Active Member

    Joined:
    Jun 13, 2007
    Posts:
    195
    Referrals:
    0
    Sythe Gold:
    0
    rate my first delphi game!

    looks cool
     
  7. De_GH

    De_GH Guest

    Referrals:
    0
    rate my first delphi game!

    Nice Job ;)
     
  8. Ronaldotjuh

    Ronaldotjuh Apprentice

    Joined:
    May 15, 2005
    Posts:
    706
    Referrals:
    1
    Sythe Gold:
    0
    rate my first delphi game!

    WTF? I didn't steal this. All made by me. (and my teacher who helped me :p)

    I can upload it somewhere, but I need a .exe converter for that. Any suggestions?

    thx
     
  9. X Zero

    X Zero Forum Addict

    Joined:
    Jan 21, 2007
    Posts:
    577
    Referrals:
    0
    Sythe Gold:
    0
    rate my first delphi game!

    Lol, he said fun stealing. What u mean exe converter, what are u converting from?
     
  10. d34dlyalliance

    d34dlyalliance Guest

    Referrals:
    0
    rate my first delphi game!

    nice job looks awesome
     
  11. Ronaldotjuh

    Ronaldotjuh Apprentice

    Joined:
    May 15, 2005
    Posts:
    706
    Referrals:
    1
    Sythe Gold:
    0
    rate my first delphi game!

    Well, I need to convert my delphi game into a .exe file so I can upload it somewhere. Coz most pll doesn't have Delphi installed onto their computer.

    I already made it working :D.

    Here's link, without virusses:
    http://rapidshare.com/files/53737814/race.exe
     
  12. Xbit

    Xbit And I'm talkin to myself at night.. because I can't forget
    Banned

    Joined:
    Aug 26, 2005
    Posts:
    432
    Referrals:
    1
    Sythe Gold:
    0
    rate my first delphi game!

    I used it and got a spyware... Luckily I have Norton so it removed it -..-
     
  13. Ronaldotjuh

    Ronaldotjuh Apprentice

    Joined:
    May 15, 2005
    Posts:
    706
    Referrals:
    1
    Sythe Gold:
    0
    rate my first delphi game!

    it's all clean dude... Maybe downloaded something else too?
     
  14. iJamie

    iJamie Forum Addict
    Banned

    Joined:
    Jul 22, 2007
    Posts:
    263
    Referrals:
    0
    Sythe Gold:
    0
    rate my first delphi game!

    hmm i dno :S
     
< How To Create Great Looking Html Mails To Market My Products? | Making Runescape Sites For RS Cash >


 
 
Adblock breaks this site