Delphi eBook | Submit site :: Download Tutorial |
|
|
|
|
Create Project as Delphi5 Project1.pas and Form1, its size being 343õ302. A GroupBox1: TGroupBox, StaticText1 – StaticText55 element is to be placed at the Form1. Where StaticText1 – StaticText6 is a Level column, StaticText7 – StaticText46 are nominal playing area cells, StaticText47-48 present control footing information. A lower color indicator is formed by StaticText49-StaticText55. Number arrays correspond to a Level element column and a playing area. - StaticText1 – StaticText6 is a Level column Create another StaticText56 to temporarily store a generated cell nominal and its colour attributes (highlighted at the figure). - temporarily store a generated cell nominal and its colour attributes On the start of the game fill in playing area cells with random-number generator values. Random-number generator code: Randomize; StaticText7.Caption :=IntToStr(Random(20)); //Generates a random number = from 0 to 20 A complete Delphi project of this game development stage is in the file dlp1.zip (in Delphi-guide.zip) - Set lower color indicator size: StaticText49.Height :=8; StaticText50.Height :=8; StaticText51.Height :=8; StaticText52.Height :=8; StaticText53.Height :=8; StaticText54.Height :=8; StaticText55.Height :=8; StaticText49.Width :=32; StaticText50.Width :=32; StaticText51.Width :=32; StaticText52.Width :=32; StaticText53.Width :=32; StaticText54.Width :=32; StaticText55.Width :=32; Use field array and i,j variable: var Form1: TForm1; St: systemtime; field: array[0..20, 0..20] of Integer; // Array for the playing area i: byte; j: byte; Let us fill in game array cells field[0..20, 0..20] with values from the generator of random numbers: function FieldFill : integer; begin {Let us fill cell array Field with random number generator values } Randomize; for i := 0 to 8 do for j := 0 to 6 do field[i, j] :=Random(20); end; Now, procedure function Color_Chars of calculation of the nominal value of game area cell and its color attributes (cell background color and font color) shall be calculated basing on array element value. Example for processing of elements of the array field[0..20, 0..20] corresponding to cells of the bottom line of the game area (write them down to StaticText56): Android Studio Open Source |
As a result there appears a nominal copying function GameField_Fill from a responsible cell StaticText56, while a function Color_Chars is changed in the following way: Such variant of filling a playing area with START values (at the start of the game) cannot be considered as an optimal one. However it is very demonstrable for algorithm understanding. To see how it works add another TForm1.StaticText56Click procedure procedure TForm1.StaticText56Click(Sender: TObject); begi k := 0; FieldFill(); GameField_Fill(); end; Now, clicking the mouse to StaticText56 you can see if the cell nominals values and their colour attributes are changed correctly. A complete Delphi project of this game development stage is in the file dlp3.zip (in Delphi-guide.zip) Now develop Num_Move() procedure to overwrite playing area cells’ values and color attributes in a row-wise top-down way and to fill a playing area top row with new values (i.e., new cell values are input in the game from the top row). The procedure contains copying operators. You can develop a more optimal copying algorithm. function Num_Move : integer; begin k := 0; for j := 0 to 5 do for i := 0 to 7 do begin field[i, j] := field[i, j + 1]; end; GameField_Fill(); end; To see how top-down copying values and cell attributes works, create a temporary click handling procedure at StaticText6 (cell Level 1): procedure TForm1.StaticText6Click(Sender: TObject); begin Num_Move(); end; A complete Delphi project of this game development stage is in the file dlp4.zip (in Delphi-guide.zip) Now it necessary to add function Up_Str_App code to fill in the playing area top row with new values. function Up_Str_App : integer; begin Randomize; for i := 0 to 7 do field[i, 5] :=Random(20); end; Call Up_Str_App from function Num_Move: function Num_Move : integer; begin Up_Str_App(); k := 0; for j := 0 to 5 do for i := 0 to 7 do begin field[i, j] := field[i, j + 1]; end; GameField_Fill(); end; Android Studio Open Source |
Now it is necessary to write a handling code for player’s placing a game marker in any bottom row cell of the playing area. Create a trigger firstset = 0 Trigger=0, if a marker has not been placed in the bottom row yet. General code fragment that handles marker placing in the bottom row: procedure TForm1.StaticText7Click(Sender: TObject); begin if firstset = 0 then Form1.StaticText7.Color := $00FD1117; //Marker color if firstset = 0 then markersave := 0; //StaticText7 cell if firstset = 0 then firstset := 1; //Trigger. No use again end; procedure TForm1.StaticText8Click(Sender: TObject); begin if firstset = 0 then Form1.StaticText8.Color := $00FD1117; if firstset = 0 then markersave := 1; //StaticText8 cell if firstset = 0 then firstset := 1; //Trigger. No use again end; procedure TForm1.StaticText9Click(Sender: TObject); begin if firstset = 0 then Form1.StaticText9.Color := $00FD1117; if firstset = 0 then markersave := 2; //StaticText9 cell if firstset = 0 then firstset := 1; //Trigger. No use again end; procedure TForm1.StaticText10Click(Sender: TObject); begin if firstset = 0 then Form1.StaticText10.Color := $00FD1117; if firstset = 0 then markersave := 3; //StaticText10 cell if firstset = 0 then firstset := 1; //Trigger. No use again end; procedure TForm1.StaticText11Click(Sender: TObject); begin if firstset = 0 then Form1.StaticText11.Color := $00FD1117; if firstset = 0 then markersave := 4; //StaticText11 cell if firstset = 0 then firstset := 1; //Trigger. No use again end; procedure TForm1.StaticText12Click(Sender: TObject); begin if firstset = 0 then Form1.StaticText12.Color := $00FD1117; if firstset = 0 then markersave := 5; //StaticText12 cell if firstset = 0 then firstset := 1; //Trigger. No use again end; procedure TForm1.StaticText13Click(Sender: TObject); begin if firstset = 0 then Form1.StaticText13.Color := $00FD1117; if firstset = 0 then markersave := 6; //StaticText13 cell if firstset = 0 then firstset := 1; //Trigger. No use again end; procedure TForm1.StaticText14Click(Sender: TObject); begin if firstset = 0 then Form1.StaticText14.Color := $00FD1117; if firstset = 0 then markersave := 7; //StaticText14 cell if firstset = 0 then firstset := 1; //Trigger. No use again end; The possibility of placing a marker on one cell only can be checked. Now it is necessary to provide a marker being saved (in terms of cell turning blue ) when shifting cells top – down. |
if markersave = 1 then Form1.StaticText8.Color := $00FD1117; if markersave = 2 then Form1.StaticText9.Color := $00FD1117; if markersave = 3 then Form1.StaticText10.Color := $00FD1117; if markersave = 4 then Form1.StaticText11.Color := $00FD1117; if markersave = 5 then Form1.StaticText12.Color := $00FD1117; if markersave = 6 then Form1.StaticText13.Color := $00FD1117; if markersave = 7 then Form1.StaticText14.Color := $00FD1117; end; Now activate Marker_Reset() procedure to operate in a top-down shift procedure. In the bottom of function Num_Move procedure insert the following code (highlighted in red): function Num_Move : integer; begin Up_Str_App(); //Fill in the top row with new nominals k := 0; //Cells counter for j := 0 to 5 do for i := 0 to 7 do begin field[i, j] := field[i, j + 1]; end; GameField_Fill(); Marker_Reset(); //Marker redraw end; A complete Delphi project of this game development stage is in the file dlp6.zip (in Delphi-guide.zip) The procedure to save color attributes of all bottom row cells before placing the marker: function Save_Color : integer; savecolor[0] :=Form1.StaticText7.Color; //Save bgcolor StaticText7 savecolor[1] :=Form1.StaticText8.Color; //Save bgcolor StaticText8 savecolor[2] :=Form1.StaticText9.Color; //Save bgcolor StaticText9 savecolor[3] :=Form1.StaticText10.Color; //Save bgcolor StaticText10 savecolor[4] :=Form1.StaticText11.Color; //Save bgcolor StaticText11 savecolor[5] :=Form1.StaticText12.Color; //Save bgcolor StaticText12 savecolor[6] :=Form1.StaticText13.Color; //Save bgcolor StaticText13 savecolor[7] :=Form1.StaticText14.Color; //Save bgcolor StaticText14 end; Write a score count function Set_Marker_Count when placing a marker in the beginning of the game. function Set_Marker_Count : integer; begin if n = 0 then begin If markersave = 0 Then et := field[0, 0]; If markersave = 1 Then et := field[1, 0]; If markersave = 2 Then et := field[2, 0]; If markersave = 3 Then et := field[3, 0]; If markersave = 4 Then et := field[4, 0]; If markersave = 5 Then et := field[5, 0]; If markersave = 6 Then et := field[6, 0]; If markersave = 7 Then et := field[7, 0]; Form1.Caption := IntToStr(markersave); end; //Print count if et = 0 then Form1.StaticText48.Caption := '+1'; if et = 1 then Form1.StaticText48.Caption := '-1'; if et = 2 then Form1.StaticText48.Caption := '+5'; if et = 3 then Form1.StaticText48.Caption := '-5'; if et = 4 then Form1.StaticText48.Caption := '+10'; if et = 5 then Form1.StaticText48.Caption := '-10'; if et = 6 then Form1.StaticText48.Caption := '+15'; if et = 7 then Form1.StaticText48.Caption := '-15'; if et = 8 then Form1.StaticText48.Caption := '+25'; if et = 9 then Form1.StaticText48.Caption := '+500'; if et = 10 then Form1.StaticText48.Caption := '+100'; if et = 11 then Form1.StaticText48.Caption := '-200'; if et = 12 then Form1.StaticText48.Caption := '0'; if et = 13 then Form1.StaticText48.Caption := '0'; if et = 14 then Form1.StaticText48.Caption := 'End'; if et = 15 then Form1.StaticText48.Caption := '-10'; if et = 16 then Form1.StaticText48.Caption := '-5'; if et = 17 then Form1.StaticText48.Caption := '-1'; if et = 18 then Form1.StaticText48.Caption := '+1'; if et = 19 then Form1.StaticText48.Caption := '+5'; if et = 20 then Form1.StaticText48.Caption := '-25'; n := 1; //No use again end; Now attach a score count function Set_Marker_Count in each of click procedures for bottom row cells: |
if firstset = 0 then firstset := 1; //No use again Set_Marker_Count(); end; procedure TForm1.StaticText8Click(Sender: TObject); begin if firstset = 0 then Form1.StaticText8.Color := $00FD1117; if firstset = 0 then markersave := 1; //markersave := 1 - for StaticText8 if firstset = 0 then firstset := 1; //No use again Set_Marker_Count(); end; procedure TForm1.StaticText9Click(Sender: TObject); begin if firstset = 0 then Form1.StaticText9.Color := $00FD1117; if firstset = 0 then markersave := 2; //markersave := 2 - for StaticText9 if firstset = 0 then firstset := 1; //No use again Set_Marker_Count(); end; procedure TForm1.StaticText10Click(Sender: TObject); begin if firstset = 0 then Form1.StaticText10.Color := $00FD1117; if firstset = 0 then markersave := 3; //markersave := 3 - for StaticText10 if firstset = 0 then firstset := 1; //No use again Set_Marker_Count(); end; procedure TForm1.StaticText11Click(Sender: TObject); begin if firstset = 0 then Form1.StaticText11.Color := $00FD1117; if firstset = 0 then markersave := 4; //markersave := 4 - for StaticText11 if firstset = 0 then firstset := 1; //No use again Set_Marker_Count(); end; procedure TForm1.StaticText12Click(Sender: TObject); begin if firstset = 0 then Form1.StaticText12.Color := $00FD1117; if firstset = 0 then markersave := 5; //markersave := 5 - for StaticText12 if firstset = 0 then firstset := 1; //No use again Set_Marker_Count(); end; procedure TForm1.StaticText13Click(Sender: TObject); begin if firstset = 0 then Form1.StaticText13.Color := $00FD1117; if firstset = 0 then markersave := 6; //markersave := 6 - for StaticText13 if firstset = 0 then firstset := 1; //No use again Set_Marker_Count(); end; procedure TForm1.StaticText14Click(Sender: TObject); begin if firstset = 0 then Form1.StaticText14.Color := $00FD1117; if firstset = 0 then markersave := 7; //markersave := 7 - for StaticText14 if firstset = 0 then firstset := 1; //No use again Set_Marker_Count(); end; A complete Delphi project of this game development stage is in the file dlp7.zip (in Delphi-guide.zip) Rewrite function Set_Marker_Count function Set_Marker_Count : integer; begin if n = 0 then begin If markersave = 0 Then et := field[0, 0]; If markersave = 1 Then et := field[1, 0]; If markersave = 2 Then et := field[2, 0]; If markersave = 3 Then et := field[3, 0]; If markersave = 4 Then et := field[4, 0]; If markersave = 5 Then et := field[5, 0]; If markersave = 6 Then et := field[6, 0]; If markersave = 7 Then et := field[7, 0]; Form1.Caption := IntToStr(markersave); end; //Print count if n = 0 then begin tk := StrToInt(Form1.StaticText48.Caption); //Count to digit See details :: //StrToInt - converts an Integer string, such as '123' into an Integer if et = 0 then tk := tk +1; //Cell nominal if et = 0 then Form1.StaticText48.Caption := IntToStr(tk); //StaticText48 - counter cell if et = 1 then tk := tk -1; //Cell nominal if et = 1 then Form1.StaticText48.Caption := IntToStr(tk); if et = 2 then tk := tk +5; // ... if et = 2 then Form1.StaticText48.Caption := IntToStr(tk); if et = 3 then tk := tk -5; if et = 3 then Form1.StaticText48.Caption := IntToStr(tk); if et = 4 then tk := tk +10; if et = 4 then Form1.StaticText48.Caption := IntToStr(tk); if et = 5 then tk := tk -10; if et = 5 then Form1.StaticText48.Caption := IntToStr(tk); if et = 6 then tk := tk +15; if et = 6 then Form1.StaticText48.Caption := IntToStr(tk); if et = 7 then tk := tk -15; if et = 7 then Form1.StaticText48.Caption := IntToStr(tk); if et = 8 then tk := tk +25; if et = 8 then Form1.StaticText48.Caption := IntToStr(tk); if et = 9 then tk := tk +500; //Nominal [T] if et = 9 then Form1.StaticText48.Caption := IntToStr(tk); if et = 10 then tk := tk +100; //Nominal [P] if et = 10 then Form1.StaticText48.Caption := IntToStr(tk); if et = 11 then tk := tk -200; //Nominal [B] if et = 11 then Form1.StaticText48.Caption := IntToStr(tk); if et = 12 then Form1.StaticText48.Caption := '0'; //Nominal [Z] if et = 13 then Form1.StaticText48.Caption := '0'; //Nominal [Z] if et = 14 then Form1.StaticText48.Caption := 'End'; //End game if et = 14 then Application.Terminate; //End game if et = 15 then tk := tk -10; if et = 15 then Form1.StaticText48.Caption := IntToStr(tk); if et = 16 then tk := tk -5; if et = 16 then Form1.StaticText48.Caption := IntToStr(tk); if et = 17 then tk := tk -1; if et = 17 then Form1.StaticText48.Caption := IntToStr(tk); if et = 18 then tk := tk +1; if et = 18 then Form1.StaticText48.Caption := IntToStr(tk); if et = 19 then tk := tk +5; if et = 19 then Form1.StaticText48.Caption := IntToStr(tk); if et = 20 then tk := tk -25; if et = 20 then Form1.StaticText48.Caption := IntToStr(tk); n := 1; //No use again. Marker already set end; end; |
Set_Marker_Count(); end; To demonstrate the procedure operation, insert the procedure call in a top-down cell row shifting procedure TForm1.StaticText6Click procedure TForm1.StaticText6Click(Sender: TObject); begin Num_Move(); Dn_Count(); end; A complete Delphi project of this game development stage is in the file dlp8.zip (in Delphi-guide.zip) Create a procedure of linear color indicator operation. Add Timer1 to the form and enable it at once. procedure TForm1.Timer1Timer(Sender: TObject); begin IndLent := IndLent + 1; if IndLent = 9 then Timer1.Interval := 500; //Timer interval recovery if IndLent = 9 then IndLent := 0; Print_Ind(); //Draw linear color indicator end; Procedure of linear color indicator operation: function Print_Ind : integer; begin if IndLent = 1 then Form1.StaticText55.Visible := False; if IndLent = 2 then Form1.StaticText54.Visible := False; if IndLent = 3 then Form1.StaticText53.Visible := False; if IndLent = 4 then Form1.StaticText52.Visible := False; if IndLent = 5 then Form1.StaticText51.Visible := False; if IndLent = 6 then Form1.StaticText50.Visible := False; if IndLent = 7 then Form1.StaticText49.Visible := False; if IndLent = 7 then Form1.Timer1.Interval := 100; if IndLent = 7 then //Draw full linear color indicator begin Form1.StaticText55.Visible := True; Form1.StaticText54.Visible := True; Form1.StaticText53.Visible := True; Form1.StaticText52.Visible := True; Form1.StaticText51.Visible := True; Form1.StaticText50.Visible := True; Form1.StaticText49.Visible := True; end; end; You can see how the indicator works. A complete Delphi project of this game development stage is in the file dlp9.zip (in Delphi-guide.zip) Now you should disable the timer and enable it after the market has been placed in a playing area bottom row. Insert timer enabling in a marker placing procedure in a playing area bottom row (to be more exact – in a score counting procedure after marker placing Set_Marker_Count(), since the procedure is common for all cells of a lower level). At the end of the procedure Set_Marker_Count() there is a line: Form1.Timer1.Enabled := True; //Timer1 is ON When a linear color indicator disappears completely, it is necessary to shift down all rows with playing area cells (TForm1.StaticText6Click procedure) to the marker, count scores and fill in a playing area top row with new nominal values. TForm1.Timer1Timer operation procedure looks like the following way: procedure TForm1.Timer1Timer(Sender: TObject); begin IndLent := IndLent + 1; if IndLent = 9 then Num_Move();//Move game levels (Rows) if IndLent = 9 then Dn_Count(); if IndLent = 9 then Timer1.Interval := 500; //Restore interval if IndLent = 9 then IndLent := 0; Print_Ind(); //Draw indicator End If end; Now it is necessary to write handling of pressing down the key and marker’s moving to the right / left along the bottom row of playing area cells. procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); //Handling of pressing right and left arrow keys begin Form1.Caption := IntToStr(Key); //Print key kode for debugging purposes end; markersave variable shows a unique playing area bottom row cell that contains a marker. Write a procedure of marker moving to the left / right along the bottom row: function Move_Point_Left : integer; //Move marker to left begin if markersave = 0 then //If the most left cell of the bottom line begin markersave := 7; //More to the left of the most left cell - the MOST RIGHT (cyclic transition) firstset := 0; //Temporarily to resolve drawing a marker Form1.StaticText7.Color := savecolor[0]; //To restore color of a background of a cell where the marker was //As in TForm1.StaticText14Click procedure. Set marker if firstset = 0 then Save_Color(); //Save color if firstset = 0 then Form1.StaticText14.Color := $00FD1117; if firstset = 0 then markersave := 7; if firstset = 0 then firstset := 1; Set_Marker_Count(); vt := markersave; //Save markersave markersave := 10; //Disable misoperation (value 10 does not correspond to any cell) end; markersave := vt; //Restore markersave n := 0; Set_Marker_Count(); end; A complete Delphi project of this game development stage is in the file dlp10.zip (in Delphi-guide.zip) |
begin markersave := 7; firstset := 0; //Temporarily to resolve drawing a marker Form1.StaticText7.Color := savecolor[0]; //Restore bgcolor if firstset = 0 then Save_Color(); //Save color if firstset = 0 then Form1.StaticText14.Color := $00FD1117; if firstset = 0 then markersave := 7; if firstset = 0 then firstset := 1; Set_Marker_Count(); vt := markersave; //Save markersave markersave := 10; //Disable misoperation (value 10 does not correspond to any cell) end; if markersave = 1 then //If the StaticText8 cell of the bottom line begin markersave := 0; firstset := 0; //Temporarily to resolve drawing a marker Form1.StaticText8.Color := savecolor[1]; //Restore bgcolor if firstset = 0 then Save_Color(); //Save color if firstset = 0 then Form1.StaticText7.Color := $00FD1117; if firstset = 0 then markersave := 0; if firstset = 0 then firstset := 1; Set_Marker_Count(); vt := markersave; //Save markersave markersave := 10; //Disable misoperation (value 10 does not correspond to any cell) end; if markersave = 2 then //If the StaticText9 cell of the bottom line begin markersave := 1; firstset := 0; //Temporarily to resolve drawing a marker Form1.StaticText9.Color := savecolor[2]; //Restore bgcolor if firstset = 0 then Save_Color(); //Save color if firstset = 0 then Form1.StaticText8.Color := $00FD1117; if firstset = 0 then markersave := 1; if firstset = 0 then firstset := 1; Set_Marker_Count(); vt := markersave; //Save markersave markersave := 10; //Disable misoperation (value 10 does not correspond to any cell) end; if markersave = 3 then //If the StaticText10 cell of the bottom line begin markersave := 2; firstset := 0; //Temporarily to resolve drawing a marker Form1.StaticText10.Color := savecolor[3]; //Restore bgcolor if firstset = 0 then Save_Color(); //Save color if firstset = 0 then Form1.StaticText9.Color := $00FD1117; if firstset = 0 then markersave := 2; if firstset = 0 then firstset := 1; Set_Marker_Count(); vt := markersave; //Save markersave markersave := 10; //Disable misoperation (value 10 does not correspond to any cell) end; if markersave = 4 then //If the StaticText11 cell of the bottom line begin markersave := 3; firstset := 0; //Temporarily to resolve drawing a marker Form1.StaticText11.Color := savecolor[4]; //Restore bgcolor if firstset = 0 then Save_Color(); //Save color if firstset = 0 then Form1.StaticText10.Color := $00FD1117; if firstset = 0 then markersave := 3; if firstset = 0 then firstset := 1; Set_Marker_Count(); vt := markersave; //Save markersave markersave := 10; //Disable misoperation (value 10 does not correspond to any cell) end; if markersave = 5 then //If the StaticText12 cell of the bottom line begin markersave := 4; firstset := 0; //Temporarily to resolve drawing a marker Form1.StaticText12.Color := savecolor[5]; //Restore bgcolor if firstset = 0 then Save_Color(); //Save color if firstset = 0 then Form1.StaticText11.Color := $00FD1117; if firstset = 0 then markersave := 4; if firstset = 0 then firstset := 1; Set_Marker_Count(); vt := markersave; //Save markersave markersave := 10; //Disable misoperation (value 10 does not correspond to any cell) end; if markersave = 6 then //If the StaticText13 cell of the bottom line begin markersave := 5; firstset := 0; //Temporarily to resolve drawing a marker Form1.StaticText13.Color := savecolor[6]; //Restore bgcolor if firstset = 0 then Save_Color(); //Save color if firstset = 0 then Form1.StaticText12.Color := $00FD1117; if firstset = 0 then markersave := 5; if firstset = 0 then firstset := 1; Set_Marker_Count(); vt := markersave; //Save markersave markersave := 10; //Disable misoperation (value 10 does not correspond to any cell) end; if markersave = 7 then //If the StaticText14 cell - most Right cell of the bottom line begin markersave := 6; firstset := 0; //Temporarily to resolve drawing a marker Form1.StaticText14.Color := savecolor[7]; //Restore bgcolor if firstset = 0 then Save_Color(); //Save color if firstset = 0 then Form1.StaticText13.Color := $00FD1117; if firstset = 0 then markersave := 6; if firstset = 0 then firstset := 1; Set_Marker_Count(); vt := markersave; //Save markersave markersave := 10; //Disable misoperation (value 10 does not correspond to any cell) end; markersave := vt; //Restore markersave n := 0; Set_Marker_Count(); end; Moving to Right is similar. |
if Key = 39 then Move_Point_Right(); //Move to Right end; A complete Delphi project of this game development stage is in the file dlp11.zip (in Delphi-guide.zip) Now it is necessary to create only one procedure – a procedure of shifting the numbering of current gaming levels: function Level_Count : integer; begin lvl := StrToInt(Form1.StaticText6.Caption); lvl := lvl + 1; Form1.StaticText6.Caption := IntToStr(lvl); lvl := StrToInt(Form1.StaticText5.Caption); lvl := lvl + 1; Form1.StaticText5.Caption := IntToStr(lvl); lvl := StrToInt(Form1.StaticText4.Caption); lvl := lvl + 1; Form1.StaticText4.Caption := IntToStr(lvl); lvl := StrToInt(Form1.StaticText3.Caption); lvl := lvl + 1; Form1.StaticText3.Caption := IntToStr(lvl); lvl := StrToInt(Form1.StaticText2.Caption); lvl := lvl + 1; Form1.StaticText2.Caption := IntToStr(lvl); end; Attach a shifting procedure to the operations, for example: function Dn_Count : integer; begin n := 0; Set_Marker_Count(); Level_Count(); //Shifting the numbering of current gaming levels end; A complete Delphi project of this game development stage is in the file dlp12.zip (in Delphi-guide.zip) Crosswalk Directory: Over 18,000 wholesome, family friendly, Christian websites. |
|
PYTHON GitHUB Code |