Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 42

Thread: Cyber Crisis [Canceled]

  1. #11
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Cyber Crisis [Canceled]

    You could also cut one big bitmap it onto pieces. But tiles are better (faster) with large areas.

    EDIT:

    About explosions: We used around 6-10 particles wich rotate, scale and fade away. I don't know what SDL can do, but I think you can manage that.

    Here is a totorial of how you can make an explosion texture.
    http://www.lunacore.com/photoshop/tutorials/tut008.htm
    here's some more
    http://www.tutorialguide.net/explosion_tutorial.html
    NecroSOFT - End of line -

  2. #12
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Cyber Crisis [Canceled]

    oow... I like the effects the first technique produces.

    But can you give me maybe a little diagram and/or explaination of how you rotate or combine them yourself? Is it an 'animated' rotation or just a single still rotated version of one of the frames?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  3. #13
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Cyber Crisis [Canceled]

    I'll try...

    I put 6-10 particles with a random rotaion and random size (about 20-60 i think). The color is 255, 255, 255 (or FFFFFF or white)...

    Then the loop:
    I rotate each particle with a fixed velocity
    I scale each particle with a fixed scale
    (you could also slighly change the position)

    I other words:
    [pascal] with Particles[Index] do
    begin
    // gravity
    Velocity.x := Velocity.x + (Gravity.x *LagCount);
    Velocity.y := Velocity.y + (Gravity.y *LagCount);
    Velocity.z := Velocity.z + (Gravity.z *LagCount);

    // Position
    Position.x := Position.x + (Velocity.x *LagCount);
    Position.y := Position.y + (Velocity.y *LagCount);
    Position.z := Position.z + (Velocity.z *LagCount);

    // Rotation
    Rotation.x := Rotation.x + (RotVelocity.x *LagCount);
    Rotation.y := Rotation.y + (RotVelocity.y *LagCount);
    Rotation.z := Rotation.z + (RotVelocity.z *LagCount);

    // Scaling
    Scale.x := Scale.x + (ScaleVelocity.x *LagCount);
    Scale.y := Scale.y + (ScaleVelocity.y *LagCount);
    Scale.z := Scale.z + (ScaleVelocity.z *LagCount);

    // Color and alpha
    Frames := Particles[Index].LifeTime / LagCount;
    BeginColor.r := BeginColor.r - ((BeginColor.r - EndColor.r) / Frames);
    BeginColor.g := BeginColor.g - ((BeginColor.g - EndColor.g) / Frames);
    BeginColor.b := BeginColor.b - ((BeginColor.b - EndColor.b) / Frames);
    end;[/pascal]

    LagCount is the the timers speed. (1000 / FPS).
    NecroSOFT - End of line -

  4. #14
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Cyber Crisis [Canceled]

    Ah ok.. so it scales, spins and falls all at once in one big sequence... neat.

    Do the explosions just fall or do they rise up a bit before gravity takes them back downward?

    And how slow/fast of a spin are we talking... fairly noticeable or barely noticeable?


    Maybe a small animation video would clear up whatever tiny questions I have.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  5. #15
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Cyber Crisis [Canceled]

    Movie:

    http://necrodome.homeftp.net/zooi/Particles.wmv 2.11 MB
    (We need [movie]tags[/movie])

    So in the video you see 4 particle emitter.

    1. Particle emitter with grey texture, particles move up (50 particles)
    2. Particle emitter with grey texture, this texture is made orange within the engine. Partciles don't move up, only scale a bit.(8 particles)
    3. Particles rotate and scale.(10 particles)
    4. Same as 3, but different texture...(10 particles)
    NecroSOFT - End of line -

  6. #16

    Cyber Crisis [Canceled]

    I for one would love to see this project revived .

    I'd be happy to dig through the old art work and models, and continue to create some graphics for this game. From what I remember we kinda got a little too bogged down in the fine details while still in the concept stage .

    I could do a post later, after I've gone through everything, and do an update on what's been done, and what things need to be done.

  7. #17
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Cyber Crisis [Canceled]

    Right on! Thanks, I understand the effect much better now.

    However it seems that JEDI-SDL's sdlutils.pas is somewhat ill equiped to do the full effect.

    There is a SDL_AddSurface(); function, but it seems that it does not scale, rotate nor allow you to alpha in or out either.

    There are functions to rotate, scale and alpha, but they all appear to be seperate save for my own little addition in 'sdlutils.pas' that should show up in the final 1.0 release. But it only does rotation and alpha. :?

    Anyone think they could help me add 'ADD' and 'scale' to it?

    [pascal]procedure SDL_RotateDeg_Alpha(DstSurface, SrcSurface: PSDL_Surface; SrcRect: PSDL_Rect;
    DestX, DestY, OffsetX, OffsetY: Integer; Angle: Integer;
    Alpha: UInt;
    var
    aSin, aCos: Single;
    MX, MY, DX, DY, NX, NY, SX, SY, OX, OY, Width, Height, TX, TY, RX, RY, ROX, ROY: Integer;
    SrcColor, DstColor: UInt32;
    srcRR, srcGG, srcBB, dstRR, dstGG, dstBB: UInt8;
    TempTransparentColour: UInt32;
    MAXX, MAXY: Integer;
    begin
    // Rotate the surface to the target surface.
    TempTransparentColour := SrcSurface.format.colorkey;

    maxx := DstSurface.w;
    maxy := DstSurface.h;
    aCos := degCOS[Angle];
    aSin := degSIN[Angle];

    Width := round(abs(srcrect.h * acos) + abs(srcrect.w * asin));
    Height := round(abs(srcrect.h * asin) + abs(srcrect.w * acos));

    OX := Width shr 1;
    OY := Height shr 1;
    MX := (srcRect.x + (srcRect.x + srcRect.w)) shr 1;
    MY := (srcRect.y + (srcRect.y + srcRect.h)) shr 1;
    ROX := (-(srcRect.w shr 1)) + Offsetx;
    ROY := (-(srcRect.h shr 1)) + OffsetY;
    Tx := ox + round(ROX * aSin - ROY * aCos);
    Ty := oy + round(ROY * aSin + ROX * aCos);
    SX := 0;
    for DX := DestX - TX to DestX - TX + (width) do
    begin
    inc(SX);
    SY := 0;
    for DY := DestY - TY to DestY - TY + (Height) do
    begin
    if ((DX > 0) and (DX < MAXX)) and
    ((DY > 0) and (DY < MAXY)) then
    begin
    RX := SX - OX;
    RY := SY - OY;
    NX := mx + Round(RX * aSin + RY * aCos); //
    NY := my + Round(RY * aSin - RX * aCos); //

    if (NX >= srcRect.x) and (NX <= srcRect.x + srcRect.w) then
    begin
    if (NY >= srcRect.y) and (NY <= srcRect.y + srcRect.h) then
    begin
    SrcColor := SDL_GetPixel(SrcSurface, NX, NY);
    if (SrcColor <> TempTransparentColour) then
    begin
    SDL_GetRGB(SrcColor, SrcSurface.format, @srcRR, @srcGG, @srcBB);

    DstColor := SDL_GetPixel(DstSurface, DX, DY);
    SDL_GetRGB(DstColor, DstSurface.format, @dstRR, @dstGG, @dstBB);

    SDL_PutPixel(DstSurface, DX, DY,
    SDL_MapRGB(DstSurface.format,
    (Alpha * (srcRR - dstRR)) shr 8 + dstRR,
    (Alpha * (srcGG - dstGG)) shr 8 + dstGG,
    (Alpha * (srcBB - dstBB)) shr 8 + dstBB));
    end;
    end;
    end;
    end;
    inc(SY);
    end;
    end;
    end;[/pascal]
    Jason McMillen
    Pascal Game Development
    Co-Founder





  8. #18
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Cyber Crisis [Canceled]

    That'd be great Kas!

    I think what I needed next for graphics was some frames for the first few states of the main character, basic tiles and backgrounds for the tropical swamp map and small flying drone enemies to add in. They dive and chase after your character in the first stage. (No weapons or 'hand' modules so you have to jump duck and dodge them)


    The list of what I need for now:

    1) Complete 6 full animation sets one per 'state' (48x64 sized frames, dying can be double width)
    i) Incomplete -- Without the hands.
    ii) Complete/Basic -- Same as before but with hands.
    iii) 1st Weapon + Firing animaition frames -- Complete version, but with either a hand or arm weapon. Maybe holding the weapon with his hand(s)? We can experiment I guess. Weapon will fire bullets not energy-based yet.
    iv) Same as Incomplete but damaged
    v) Same as Complete/Basic but damaged
    vi) Same as 1st Weapon but damaged

    Animations for each set are:
    - Standing *
    - Running *
    - Jumpping *
    - Falling *
    - Climbing *
    - Shooting
    - Ducking
    - Looking up
    - Looking down
    - Dying
    - Pushing(things like walls or big bolders)
    - Dashing
    [size=9px](* ones we have in part right now)[/size]

    2) Basic tileset 32x32 that we can use for the swamp. Engine has two layers of tiles both same size dimentions, both layers are capable of animations, but tiles must be in sequence in the BMP. Each FG/BG layer will load it's own tileset texture so seperate them into two BMP files. All tileset textures, like with the sprite frames have a single row and each frame is determined by it's column. [size=9px](Easier to calculate the rect for the frame!)[/size] I'll need the following types of things included in these tilesets.
    i) The ground dirt, mud, grass, rocks, etc...
    ii) water and typical ambient effects
    iii) trees and plants and roots
    iv) cave walls and insides (when you start out... and maybe a little nook to hide in or find the hand upgrade in.)
    v) basic 'test arena' or playground room stuff for experimnting with boss fights, etc...
    vi) anything else that comes to mind

    3) Flying drone sprite that contains the following type of animations
    i) basic moving around
    ii) attacking dive / swooping down

    Basically I'll leave the creativity of the 'flying' drone robot up to you. Just keep it looking as believable as our main character and what concept art I've shown before. I put this in now for some bit of fun. But a big swarm of these things should at least 'scare' the player.

    If you have any questions or need more info on something that I left out or was forgotten, just PM me.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  9. #19
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Cyber Crisis [Canceled]

    Ok here is my first attept at creating a function or JEDI-SDL that will support rotation, add and fading in/out by alpha.



    On the left is the SDL_AddSurface() results and on the right side is my own function. (Rotated 45 degrees + Alpha = 133.)

    I used the above function, but with SDL_PutPixel() changed to SDL_AddPixel() instead. Obviously not what I'm after though... :?


    EDIT: Nevermind, I'm just being an idiot. :lol: It works now.



    The Alpha value is taken from the dst and then I mix that color with the src to make the new R, G and B... well I didn't think of this... the dst values have to be BLACK to calculate it's transparency level properly.

    Oopsie!

    Well I'm sort of half way there at least now. Problem is that this function is way to CPU hungry... :?

    I comment it out I get about 51-53 FPS uncomment it and it's down to about 36-38 FPS... I'd really like to speed this function up a bit if anyone is willing to help.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  10. #20
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Cyber Crisis [Canceled]

    Render it with yhardwour GPU...
    NecroSOFT - End of line -

Page 2 of 5 FirstFirst 1234 ... LastLast

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
  •