Page 1 of 2 12 LastLast
Results 1 to 25 of 28

Thread: 3D Game (Finished!!!) + 3D drawer!

  1. #1
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default 3D Game (Finished!!!) + 3D drawer!

    With the feedback from my first post, i decided what kind of game to make and i made it!
    There will probably be much more I'll be adding on to this later, but i wanted to release it right after i finished.
    It took me so long to make this because i kept testing out a level and just didn't stop playing.
    I actually got kind of addicted to this.
    And the 3D drawer is just an idea i came up with while making the game for fun.

    Game-
    Comes with instructions.
    But the first few levels are basically just boring so you can set it to start out on a higher level.

    3D Drawer-
    This was my attempt to make things 3 dimensional without using much trigonometry, instead trying to do it like a painting using perspective and have a vanishing point.
    I can't get the "z" attribute to work exactly right like it should, it just kind of makes the object bigger or smaller.

    Go under the "Add" button to add objects.
    Click "Add Object" and it will stick it on there.
    To change where it is, the angle, etc. just check one of the circle buttons off to the right and then use the up down left right buttons to move the object.
    You'll catch on to it after a minute.

    The "Get Code" button-
    This turns your artwork into code that can be shown to other people.
    You take that code and go to the very end of the script and paste it (you will see where it says to paste it)
    Here is an example i made-
    SCAR Code:
    begin
      SetArrayLength(Boxes, 8);
      with Boxes[1] do
      begin
        cx:= 339;
        cy:= 250;
        x:= 29;
        y:= 418;
        z:= 50;
        Angle:= 90;
        Height:= 566;
        Width:= 189;
        Color:= 0;
      end;
      with Boxes[2] do
      begin
        cx:= 339;
        cy:= 250;
        x:= 29;
        y:= 119;
        z:= 50;
        Angle:= 0;
        Height:= 249;
        Width:= 187;
        Color:= 0;
      end;
      with Boxes[3] do
      begin
        cx:= 339;
        cy:= 250;
        x:= 644;
        y:= 119;
        z:= 50;
        Angle:= 0;
        Height:= 249;
        Width:= 187;
        Color:= 0;
      end;
      with Boxes[4] do
      begin
        cx:= 339;
        cy:= 250;
        x:= 644;
        y:= 119;
        z:= 50;
        Angle:= 0;
        Height:= 249;
        Width:= 187;
        Color:= 0;
      end;
      with Boxes[5] do
      begin
        cx:= 339;
        cy:= 250;
        x:= 31;
        y:= 119;
        z:= 50;
        Angle:= 90;
        Height:= 562;
        Width:= 185;
        Color:= 0;
      end;
      with Boxes[6] do
      begin
        cx:= 339;
        cy:= 250;
        x:= 644;
        y:= 119;
        z:= 50;
        Angle:= 255;
        Height:= 268;
        Width:= 182;
        Color:= 0;
      end;
      with Boxes[7] do
      begin
        cx:= 339;
        cy:= 250;
        x:= 30;
        y:= 119;
        z:= 50;
        Angle:= -255;
        Height:= 268;
        Width:= 182;
        Color:= 0;
      end;
      Objects:= 7;
      SafeInitForm;
      SafeShowFormModal;
      FreeForm(frmDesign);
    end.

    Post your codes here!

    \/ 3D is the game with a bug in it
    3D Box is the 3D drawer
    3D crash fix is the new version of the game, dl this one and PLEASE tell me if you get the bug and what happens during it.

  2. #2
    Join Date
    Jan 2007
    Location
    Kansas
    Posts
    3,760
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Nice job, the game is great.


    However I crashed SCAR doing it


  3. #3
    Join Date
    Oct 2007
    Location
    If (Online) then Loc := ('On comp') else Loc := ('Somewhere else!');
    Posts
    2,020
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    gj good game lol

    i also crashed scar

  4. #4
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Well can i get details on this and fix it?
    Because i've never crashed SCAR on this.

  5. #5
    Join Date
    Oct 2007
    Location
    If (Online) then Loc := ('On comp') else Loc := ('Somewhere else!');
    Posts
    2,020
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no its nothing wrong with the script it jus my slow laggy comp

  6. #6
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Try changing the DrawSpeed from 70 to something higher.

  7. #7
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    when died,
    the rerty button flickered so it kinda crashed because i had to restart
    ~Hermen

  8. #8
    Join Date
    Apr 2008
    Location
    Northwest england
    Posts
    1,179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wd try make more detailed pc like of a plasic ar masn that can be rotated then you realy will be onto something big

    but wfd keep up with this

    shud teach how to do so it can get developed faster
    Blank!

  9. #9
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    i also crashed. but its awesome nonetheless

    some things i dont like is that since you change your angle when you move, you should have the blocks be 3dimentional, cuz its kind of hard to hit 2d stuff. another is you cant see the stuff you're shooting, unless you hit them, when it makes the yellow circle. lastly, you should make it more visible when you get hit, cuz i think i died and didnt know it . all of those are minor things, so great job!
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  10. #10
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Good job, i got the hang of it but its too hard to make something..

  11. #11
    Join Date
    Dec 2006
    Location
    .̿̂̔͋͗̎̆ͥ̍̒ͤ͂̾̌̀̅
    Posts
    3,012
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by waddo View Post
    wd try make more detailed pc like of a plasic ar masn that can be rotated then you realy will be onto something big

    but wfd keep up with this

    shud teach how to do so it can get developed faster
    I don't think SCAR could handle ALOT of detail.. This is "less detailed" and is already crashing for people

    GJ anyhow.

  12. #12
    Join Date
    Nov 2006
    Posts
    1,103
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    if you want some detail, you can only draw triangles which are actually visable, this is fairly simple, because if you devine all the points of the triangles clockwise, they will be visable when the 2d triangle is clockwise, if it is counterclockwise, it is on the back side of the object
    SCAR Code:
    Function Det3X3(Mat : Array of Array of Integer) : integer;
    var
     v1, v2, v3, v4, v5, v6 : integer;
    begin
      v1 := Mat[0][0] * Mat[1][1] * Mat[2][2];
      v2 := Mat[0][2] * Mat[2][0] * Mat[2][1];
      v3 := Mat[0][1] * Mat[1][2] * Mat[2][0];
      v4 := Mat[0][2] * Mat[1][1] * Mat[2][0];
      v5 := Mat[0][0] * Mat[1][2] * Mat[2][1];
      v6 := Mat[0][1] * Mat[1][0] * Mat[2][2];
      Result := v1 + v2 + v3 - (v4 + v5 + v6);
    end;

    Function GetCircumCenter(Triangle : Array of TPoint) : TPoint;
    var
      a : Integer;
      b : TPoint;
      Mat : Array of Array of Integer;
    begin
      SetLength(Mat, 3);
      For a := 0 to 2 do
        SetLength(Mat[a], 3);
      Mat[0] := [Triangle[0].x,Triangle[0].y,1];
      Mat[1] := [Triangle[1].x,Triangle[1].y,1];
      Mat[2] := [Triangle[2].x,Triangle[2].y,1];
      a := Det3X3(Mat);
      Mat[0][0] := Round(sqr(Triangle[0].x) + sqr(Triangle[0].y));
      Mat[1][0] := Round(sqr(Triangle[1].x) + sqr(Triangle[1].y));
      Mat[2][0] := Round(sqr(Triangle[2].x) + sqr(Triangle[2].y));
      Mat[0][1] := Triangle[0].y;
      Mat[1][1] := Triangle[1].y;
      Mat[2][1] := Triangle[2].y;
      b.x := - Det3X3(Mat);
      Mat[0][1] := Triangle[0].x;
      Mat[1][1] := Triangle[1].x;
      Mat[2][1] := Triangle[2].x;
      b.y := Det3X3(Mat);
      result.x := - Round(b.x / (2*a));
      result.y := - Round(b.y / (2*a));
    end;

    Procedure ClockTriangle(var Triangle : Array of TPoint);
    var
      Mat : Array of Array of Integer;
      a : integer;
      P : TPoint;
    begin
      SetLength(Mat, 3);
      For a := 0 to 2 do
        SetLength(Mat[a], 3);
      p := GetCircumCenter(Triangle);
      Mat[0] := [Triangle[0].x - P.x, Triangle[0].y - P.y, (Triangle[0].x - P.x)*(Triangle[0].x - P.x) + (Triangle[0].y - P.y)*(Triangle[0].y - P.y)];
      Mat[1] := [Triangle[1].x - P.x, Triangle[1].y - P.y, (Triangle[1].x - P.x)*(Triangle[1].x - P.x) + (Triangle[1].y - P.y)*(Triangle[1].y - P.y)];
      Mat[2] := [Triangle[2].x - P.x, Triangle[2].y - P.y, (Triangle[2].x - P.x)*(Triangle[2].x - P.x) + (Triangle[2].y - P.y)*(Triangle[2].y - P.y)];
      if (Det3X3(Mat) <= 0) then
        begin
          P := Triangle[0];
          Triangle[0] := Triangle[2];
          Triangle[2] := P;
        end;
    end;
    The det3x3 is just the determinant of a 3 x 3 matrix , if it does the opposite of what it is supposed to be doing, change Det3X3(Mat) > 0 to Det3X3(Mat) =< 0, the rest of it should be alright, but can't be arsed to check it out:P Btw, it crashed on me aswell, i think it is the form part though oh and for my stuff to work you'd need to work with triangles(go figure) but that'd be something you want to do anyways, if you want detail, btw, try to make the rendering in a plugin, it will GREATLY enhance the speed, believe me lol
    Infractions, reputation, reflection, the dark side of scripting, they are.

  13. #13
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    wow great! what about making ur space ship to shoot?

  14. #14
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    It would be easy to make the meteors 3D too, but the more things i put on there the more "flashy" it gets and looks really bad.
    SCAR is pretty limited with this kind of thing.

    try to make the rendering in a plugin, it will GREATLY enhance the speed, believe me lol
    So i guess i should do that but i'm not sure how.
    Anyone know a tut or want to teach me?

    you should make it more visible when you get hit
    Well it should make a noise when you get hit.
    Also when you fire and get powerups.
    Is that part working for everyone?

  15. #15
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    wow neat great job dude

  16. #16
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    This amazes me really Good Job.
    Would be really cool if you had that Cube and used it as a gun and shot people .
    But Loving This soo much!

  17. #17
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    itd be cool if you made it like that star wars game StarWars Arcade

    google
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  18. #18
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    Wow great job, if you want I can put it in with SCAR, but you'd have to fix the bug with the retry button first though

  19. #19
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Wow great job, if you want I can put it in with SCAR, but you'd have to fix the bug with the retry button first though
    I would feel HONORED.
    But the thing is i don't get the bug, so if i could get details on what to do or just what it is i know i can fix it.

    Also if you had to change the draw speed please tell me.
    I wasn't sure if it would change from computer to computer so i put it as a const.

  20. #20
    Join Date
    Oct 2007
    Posts
    302
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Crashed scar
    When you die, the retry button flickers, a lot. And rashes
    Previously known as boxcrop.


  21. #21
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I tested out every scenario i could think of and can't get SCAR to crash, but i might have figured out what happens so i posted a new version.
    I think putting TTimer.Interval:= -1 makes it crash, so i replaced it with TTimer.Enabled:= false;
    Anyways if you still get the bug in the new version here is the part of the code that it does when you die-
    SCAR Code:
    if HealthR.Width > 149 then //if your health bar is all red then...
            begin
              //set all timers off
              Timer.Enabled:= false;
              OrbTimer.Enabled:= false;
              PowerTimer.Enabled:= false;
              ClearScreen; //clear out the screen
              //reset bars
              HealthR.Width:= 0;
              Orbs2.Width:= 0;
              PowerC.Width:= 0;
              //Turn off your powers
              Blast:= false;
              Reflect:= false;
              Dead:= true;
              //Reset the meteor positions
              for a:= 0 to Meteors do
              begin
                Meteor[a].Pos.x:= cx + 2;
                Meteor[a].Pos.y:= cy + 2;
              end;
              x:= 0;
              y:= 0;
              //Show the game over form
              SafeInitForm2;
              SafeShowFormModal2;
              FreeForm(SetUp);
              //turn timers back on
              Timer.Enabled:= true;
              OrbTimer.Enabled:= true;
              PowerTimer.Enabled:= true;
              Exit;
            end;

  22. #22
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Amazing, one of the best games I've ever seen in SCAR. (3d > 2d anyday )
    Interested in C# and Electrical Engineering? This might interest you.

  23. #23
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Thanks smartz
    So did you get the bug on the new version?

  24. #24
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Lol you can go outside the map

  25. #25
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by almost View Post
    Thanks smartz
    So did you get the bug on the new version?
    Nope. FYI, global angle and scaling tools would be pretty nice

    &if you want a real challenge, load objects from .obj files.
    Interested in C# and Electrical Engineering? This might interest you.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. just finished flashing my 360
    By slapps in forum Gaming
    Replies: 7
    Last Post: 12-14-2008, 09:31 PM
  2. Finished and needing help.
    By Torrent of Flame in forum OSR Help
    Replies: 4
    Last Post: 04-02-2008, 04:31 PM
  3. finished one tree, now another
    By Ghostx55 in forum OSR Help
    Replies: 8
    Last Post: 05-25-2007, 09:31 PM

Posting Permissions

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