Page 4 of 7 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 62

Thread: DXDRAW options

  1. #31

    DXDRAW options

    yes x has a huge jump whenever the game is not drawn proper, or when i hold the menu....

    You may have done this yourself, whilst a timer is running, hold menu and the counter stops, then when you let go, the counter jumps to where it should be. The game itself pauses but of course the Gamecounter hasn't.

    I guess I will have to go along the lines of pausing the game as you say to stop this happening.

    What about a computer that is really slow though?

    if x>500
    then
    begin
    direction:='left'; {direction is a global variable for the row}
    end;

    if direction:='left' then x:=x-1; {obv. i am using deltatime here.... not x:=x-1 but you get the point}

    this is to make the sprite bounce of the wall, a space invaders game would be the closest idea. Unfortunately if too much time is skipped when the game gets control back, x may be 600 and will have ages to come back on itself If i say if x>500 then X:=500, the last sprite in a line will go out of sync with the rest in that line

    I can send an example if you wish?

  2. #32

    DXDRAW options

    We started making delphiX programs for Pentium I 300Mhz-400Mhzs etc. So I doubt that DelphiX cannot handle most computers available.

    Obviously we never used rotating or blending functions. However, with some simple photoshop techniques you can prepare most graphics so that your games still look excellent without using fancy blending etc.

    What you can do is switch off optional graphics/reduce number of particles that take much time on older computers.

    I never used the hardware accelarated version of DelphiX. When that came onto teh scene we had already decided to move away from DelphiX.
    The views expressed on this programme are bloody good ones. - Fred Dagg

  3. #33

    DXDRAW options

    The computer in the office is 600 MGHz 2 MB gcard. It doesn't run very well there. I sorted out application freeze by setting to DKdock rather than drag.

    I will test on slow computers and report back. Space invaders moving sprites back and forward has proven more difficult than it should be, but delphix still rocks for a novice

  4. #34

    DXDRAW options

    OK here is a conundrum for you Think of space invaders, the ships in 1 row go back and forward in 1 motion. If the far left hits the left wall the whole row proceeds to go right and vice versa.

    I have doen this by using a global variable ROW1Direction which is a string. If Row1Direction='LEFT', then x=x+1; if right X=x-1 as an example

    The line of 10 sprites (row1sprite) that are part of Tenemy. On the Domove I have code which says:

    If X<0 then Row1direction='RIGHT';
    if X>GameareaX2-Image.width then Row1Direction='LEFT';

    if (Row1Direction='LEFT')then
    X=x-1; {obviously time based in real thing}

    if (Row1Direction='RIGHT) then
    X=x+1;

    Now here comes the fun.... the row stays with equal spacing after X<0 and row turns to go RIGHT. BUT when the far right sprite hits the far right wall and turns to go LEFT it goes out of step with the other 9.

    Why is this?

  5. #35

    DXDRAW options

    Not sure if I get your problem...

    In SPace invaders all enemies move same speed and distance.

    So

    DeltaX := 200 * (FRAMETIME / 1000);

    If Going Right and
    If far right enemies + deltaX > RightSideOfScreen then ReverseDirection.

    If Going Left and
    LeftMost enemy is < LeftSideOfScreen the ReverseDirection.

    In otherwords

    all the enemies move same set amount. Apart from exceptions like mothership.
    The views expressed on this programme are bloody good ones. - Fred Dagg

  6. #36

    DXDRAW options

    I will have to send it to you, it is defying physics.

    Download RPGNINVADERS.zip from FTP server

    FTP://anyone:anyone@DLPB.kicks-ass.net

    I don't normally release source but since this game is purely for fun with a few mates I guess I will allow it this time

    It is very very early made this one...and whilsy you are there if there are any pointers you think are necessary, like hey dude thats totally not the way to do things, feel free to tell me

    Thanks.

    FTP updated.

  7. #37

    DXDRAW options

    And someone just dl from Aukland, that you? yes it is I see your details Neotrace pretty accurate. I take down ftp now

  8. #38

    DXDRAW options

    I had a look at your code.

    I found it quite difficult to follow so instead of trying to work it through (I am at work ) I have made a simple delphix program that demonstates

    -animation

    -movement

    -acceleration

    So hopefully it will give you some ideas.


    http://208.106.137.21/demo.zip
    The views expressed on this programme are bloody good ones. - Fred Dagg

  9. #39

    DXDRAW options

    thanks, but do check that program, you will find that rows will not stay in alignment and if you can suss it out that would be great but I think you too will find it a bit weird

  10. #40

    DXDRAW options

    okay...

    You know the time between two frames.
    You count the distance the invaders can go from the speed and time.

    You create a cycle to handle moving the ships, while distance is > 0.
    You check the direction (left/right)
    You move an Area of the ships the correct direction to a wall, and reduce distance accordingly. (Area of the ships - X1 = left side ship X, X2 = Right side ship X + Width). Change direction if the area has hit a wall.
    The same for the other direction.
    End of Cycle

    You Align the left side ship to the Area you've moved.
    You align all of the other ships to the left side ship.

    This could for example make an algo that'd work with whatever lag your proggy can have...
    If you wish to add hit detection to the gap, then I you probably need to move every object with a greater resolution, and checking everything... No drawing. But the same algo should be okay for moving the ships...

    Also, your FTP isn't working

Page 4 of 7 FirstFirst ... 23456 ... 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
  •