Results 1 to 10 of 103

Thread: PGDmC: Vectored!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    I have managed to get my tunnel to move now - it was quite easy too!

    http://fpc4gp2x.eonclash.com/downloa...ng_tunnel.html

    I just stored an array of tunnel segement Z positions, and decreased those over time.
    When the first segment goes past the near clipping plane I move all the segments in the array down one position and make the last one equal the second last one + a segment distance

    Code:
    procedure TVectored.ScrollTunnel(const aTimeSlice: Single);
    var
      i: Integer;
    begin
      for i := cMaxTunnelRings - 1 downto 0 do
        FTunnelRingsZ[i] := FTunnelRingsZ[i] - cTunnelSpeed * aTimeSlice;
    
      if FTunnelRingsZ[0] < FGraphics3d.NearZ then
      // move tunnel rings forward and put 1st one in back
      begin
        for i := 1 to cMaxTunnelRings - 1 do
          FTunnelRingsZ[i - 1] := FTUnnelRingsZ[i];
    
        FTunnelRingsZ[cMaxTunnelRings - 1] := FTunnelRingsZ[cMaxTunnelRings - 2] + cTunnelRingSpacing;
      end;
    end;
    PS. hey guys, when are we getting Pascal code tags?!?!

    cheers,
    Paul

  2. #2
    simvector
    Guest
    Whoa. NICE!

  3. #3
    Quote Originally Posted by simvector View Post
    Whoa. NICE!
    Thanks mate I'm trying to get some simple 3d models into the game now (wire-frame only)...

    cheers,
    Paul

  4. #4
    Have you thought about adding some lines to improve the feeling of depth like in Tempest?

    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  5. #5
    Thanks for the ideas pstudio

    cheers,
    Paul

  6. #6
    simvector
    Guest
    +1 for lines.

  7. #7
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Can SVEngine pull off the particle effects etc found in cap #2? It'd be quite nice to see something that polished - mind you, if your THAT good you might just land a job replacing Ted Carson (Red dead redemption for non-followers)

    Looking good so far though. Might try get a few dozen lines in this evening on my entry - only spent a handful of hours so far on everything. Game kernel is uncommented - you have to be in the zone to grasp it fully. Mortals....
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

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
  •