View Poll Results: What kind of game project are you working on?

Voters
33. You may not vote on this poll
  • Nothing at all. Too busy.

    1 3.03%
  • None, just game engines or tools.

    3 9.09%
  • I make simple free stuff for fun.

    6 18.18%
  • I'm working on a commercial project and can talk about it much. (NDA, etc)

    4 12.12%
  • I'm working on my own creator-owned project.

    12 36.36%
  • I have a lot of prototypes/ideas, but I don't really have any concrete plans.

    7 21.21%
Page 4 of 6 FirstFirst ... 23456 LastLast
Results 31 to 40 of 52

Thread: Who is writing a game?

  1. #31
    Quote Originally Posted by hwnd View Post
    With blocks there is a thing: each block could have a animation with his own FPS, (how fast tiles are animating). I once tried it with another TTimer, but it was ugly.
    Using standard timers (TTimer) for any precise timing is bad idea. The rason of this is the fact that TTimer heavily relies on Windows messages meaning that during high system loads it can become quite inacurate. Using multiple timers is even worse idea since they afect each other.
    So using TThreadedTimer is much better idea.

    Quote Originally Posted by hwnd View Post
    but at the same time, i don't like that the editor will take 100% CPU

    But it should redraw fast, i tried TThreadedTimer and set it interval to 1ms. It was good, because user can just "paint" tiles on blocks and editor should draw them immediately without any delay. That's why 1ms timer. Although i know that TTimer is limited to >16ms
    Using timer with 1ms for contoling renderning is pointles. Why? By doing so you are forcing your computer to do more redraws (1000 redraws per second) that hardware is capable of. This will in the end consume all the CPU power.
    Since you are only making editor I think that having 30 redraws per second would be more than enough. So you could simply use 33ms timer delay which makes aprox 30 FPS.

    As for animations you do have to use some global counter (integer variable) which is increased everytime you redraw your screen. Then you calculate which frame is needed to be drawn at specific time. Below is the code example.
    Code:
    TAni = record //Record defining animation information
      FPS: Integer; //Defines how many animation frames are being drawn per second
      FramesCount: Integer; //Defines how many total frames is in animation
      Frame: Integer; //Defines current animation frame
    end;
    
    ... //some code
    
    //Global unit declarations
    var FrameCounter: Integer; //Framecounter is being used to count the number of frames which has already been drawn 
                               //since its last reset
        FPS: Integer; //Variable defining desired application FPS.
        Ani: TAni; //Ani is of type TAni
    
    ...//some code
    
    procedure OnDraw; //your renderning procedure
    begin
    //code used to calculate which animation frame needs to be drawn.
    //this code can be put on the beggining off your rendering procedure
      Ani.Frame := (FrameCounter div (FPS div Ani.FPS)) mod Ani1.FramesCount;
    
    ...//some code
    
      //Code used to count how many frames have been drawns since last FrameCounters reset.
      FrameCounter := FrameCounter + 1; 
      //Below code is used to reset FrameCount back to 0 after reaching AniResetFrame. Without this code FrameCounter 
      //will eventually exceed maximum integer value which could lead t many problems. 
      //AnimationsResetFrame is constand number representing frame number on which all animations would reach Frame 0
      //at the same time.
      //It is imperitive to reset FrameCounter at the right time to avouid jumpy animation.
      if FrameCounter = AnimationsResetFrame then FrameCounter := 0;
    end;
    And one final suggestion:
    Do implement some keyboard shourtcuts for various controls. Especially for rotatng objects so you don't have to do half dozen clicks just to find the right orientation for certain objects.

    EDIT: Go and make you own thread in MyProjects section so we can continue discusion there and thus keep our forum nice and clean. I can then move relavent posts there.
    Last edited by SilverWarior; 28-08-2012 at 10:02 PM.

  2. #32
    Quote Originally Posted by hwnd View Post
    OK, i have few videos on YT, im posting the latest and better ones:

    http://www.youtube.com/watch?v=tO3hsePugF4
    http://www.youtube.com/watch?v=PSubaCJXp_A
    http://www.youtube.com/watch?v=4yWoD55tSYE

    Any questions, comments?
    Looks like you've done a good job
    BTW, I really love that music in the second video...I will have to look at getting some of Astral Projection's music!!

  3. #33
    I have some ideas for something new (a 2d puzzle game) but I don't have enough courage to start it and currently my brain is in .... COBOL programming mode due to needs of my job (I have to make the living ).

  4. #34
    Quote Originally Posted by Jimmy Valavanis View Post
    I have some ideas for something new (a 2d puzzle game) but I don't have enough courage to start it and currently my brain is in .... COBOL programming mode due to needs of my job (I have to make the living ).
    COBOL?!?! Wow...I didn't know that was being used still
    So what do you do for your job that needs COBOL?

  5. #35
    Tada!
    Quote Originally Posted by Jimmy Valavanis View Post
    I have some ideas for something new (a 2d puzzle game) but I don't have enough courage to start it and currently my brain is in .... COBOL programming mode due to needs of my job (I have to make the living ).
    I'm curious too about COBOL. I liked the language when I learned it a lot of time ago.
    No signature provided yet.

  6. #36
    Quote Originally Posted by hwnd View Post
    Ok, but is it possible to take some constant and use the nxPascal "tick" to generate different animations with different framerate?
    Slower / faster.

    In my case, every block could have tile animation with his own frame rate. Some anims need slower FR, some bigger FR and still be same on any PC?
    I mean animation that has slower framerate, will be actually faster in my friends computer, who has more faster pc.
    This is demonstrated in the nxPascal demos many times. You have:
    - nx.GetTick <= Returns multiplatform GetTickCount. It is a millisecond timer running onwards, each 1000 being 1 second.
    - nx.GetTick2(range: integer; scale: single) <= Same as above, but you can limit it to certain range and scale
    - nx.FrameTick <= FPS counter called GetTick in the Flip and stored it here. You don't need to ask it from system so it could be marginally faster, but this is 1 frame late.

    What i prefer to use is the GetTick2(). For example:
    Code:
    nx.SetColor(1, 0, 0, 0.8+0.2*sin(toRad*nx.GetTick2(360, 0.5)));
    It makes a red color with alpha being in range 0.6..1.0, smoothly going by sine-wave. With range 360 it always returns value from 0.0 .. 359.5. You can use different ranges and speeds for each animation. If you want it to loop animation patterns from end to start way, you can use modulus math:

    Code:
    trunc(nx.GetTick2(4, 0.001)) mod 4
    This would return values from 0..3, like 0,1,2,3,0,1,... And being so slow that it only changes once per second.
    (actually this is going so theoretic i might have to test to verify It's how it's supposed to work though.)

    edit: Verified, returns single though.

    But naturally you can animate your stuff with like:
    Code:
    AnimPos:=AnimPos+AnimSpeed; // Where AnimSpeed is any floating point number
    With the default fixed FPS, it works same speed on every computer.
    Last edited by User137; 29-08-2012 at 07:28 PM.

  7. #37
    Quote Originally Posted by paul_nicholls View Post
    COBOL?!?! Wow...I didn't know that was being used still
    So what do you do for your job that needs COBOL?
    Quote Originally Posted by Ñuño Martínez View Post

    I'm curious too about COBOL. I liked the language when I learned it a lot of time ago.
    Huge, boring, old, compicated social seq/pension system. Neither a game, nor Pascal
    Last edited by Jimmy Valavanis; 30-08-2012 at 07:09 PM. Reason: Correct very bad English

  8. #38
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Hmm... so have any of these games surfaced anywhere?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  9. #39
    Unfortunately I must admit that you guys will probably have to wait quite some time for my game to get finished (the one I started for 2nd PGD mini competition). While I managed to build some realy cumerstone UI (with a few bugs and memory leaks) overal progress hasn't moved a lot from the status at which it was on end of 2nd Mini PGD competition. Main reason for this is the fact that I'm having some programing motivational problems lately (havent done almost any work in past few months).

    Also I decided to focus most of my atention to another project which would in the end alow me to quicky and eficiently buid a nice UI for my game using similar approach as used when working with VCL or LCL in lazarus. It will alow me to simply say I want some controll at X,Y position with W,H dimensions using certain pictures to represent each parts of the it(client part and borders part).
    In the end my goal is to make this Library which would provide me with this functionality to be designed in such way so that it can be used with almost any graphic engine.
    Frankly there is still a lot of work to be done.

    And after I finish work on my library I will probably focus my atention to another project of mine which would hopefully alow me to easily make necessary graphics for my game. I also belive that this Tool might also come in handy for other programes so I intend to put a lot of work into it.
    Currently I have some parts of this tool already made but they still aren't conected int whole so for now I have verry limited functionality.
    Also since I'm actually thinking of making whole UI with my Library that I mentioned before I'll have to develop my library at least to certain point where it would be stable enough to be used.

    Anywhay when each of theese projects of mine comes to a point where they could actually be usable I will post more information in My Projects section.

    BTW Do you guys have any good tip for increasing motivation for programing. I could surely use one.

  10. #40
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    More people should be posting in the My Projects section.

    We need to see more games being made!
    Jason McMillen
    Pascal Game Development
    Co-Founder





Page 4 of 6 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
  •