Results 1 to 10 of 87

Thread: Space Shooter Game Editor

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Hi,

    thank you for the great tips, unfortunately this did not work

    Code:
     BackGround[i, j].ImageIndex = Images.Item[map.data[i,j+Offset]];
    but I'll probably have to spend a bit more time with it, tried it once... but since I was thinking about my water tiles, and then saving loading... , I'll return to this later.

    Also I was wondering if I could solve my sprite animation possible problems later like this ?

    Code:
    procedure TMain.LoadLevel;
    var i,j : integer;
    begin
      for j := 0 to 14 do
        begin
          for i := 0 to 19 do
            begin
                BackGround[i,j] := TBackGround.Create(SpriteEngine);
                BackGround[i,j].ImageName:= 'Empty.image';
                BackGround[i,j].X:=i*32;
                BackGround[i,j].Y:=j*32;
                BackGround[i,j].Z:=1;
                if BackGround[i,j].PatternCount > 1 then
                    begin
                       BackGround[i,j].AnimPos:=random(3);
                       BackGround[i,j].AnimCount:=3;
                       BackGround[i,j].AnimSpeed:=0.010;
                       BackGround[i,j].AnimLooped:=true;
                       BackGround[i,j].DoAnimate:=true;
                   end;
        end;
    end;
    Tried it with my current code, but did not work, nothing moved anymore, maybe it's because I've loaded my images incorrectly into my asdb file? (Will have to check later).

    Anyway here is the latest greates version, now I think my water tile looks like water....added some other tiles. The program is a mess, I know, but I will do the fine tuning later...

    In order to load my test level , you have to click generate level (no need to change 15) , then when you load my level, it will be reset to 30, the length of that level...and you can go up and down in it...change stuff , save it....

    I've found the code on the net, took out some parts I did not need....

    Unfortunately the following did not work with dynamic arrays :

    Code:
     procedure TForm2.Button2Click(Sender: TObject);
    var f:file;
    begin
      if OpenDialog1.Execute then
      begin
        assignFile(f,OpenDialog1.FileName);
        reset(f,1);
        blockread(f,map,sizeof(map)); // load map
        closeFile(f);
        // assign name again
        Edit1.Text:=map.name;
      end;
    end;
    Check out my editor, and leave a comment. The tiles are inspired (and NOT COPIED) from warcraft 2 tileset, I did them myself...

    Greetings
    Robert
    Attached Files Attached Files

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •