Results 1 to 10 of 24

Thread: As Yet Unnamed Entry - RTS against 'the empire'

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Id you mean source code, thats no problem , sharing isn't either since my code is free for anyone else to use as long as you dont take it and call it your own 'course any modifications you make to my source are yours and all... Just some common sense XD

    Heres the link to the RTS so far... The UI is a quick experiment on my behalf to make a 'feel'. Any feedback would be very welcome - I would highly advise against trying this on windows of any kind so far - the windows version of PM_Window uses a botch of an SDL implementation and I don't think the mouse works (yet). X11 works well enough. The binaries are for x64 Linux Mint 11 (Katya) and should work equally well on ubuntu x64 systems also... However, I can recommend running a ./package before you start. You'll need:
    The SDL dev libraries, XLIB an X11 development libraries as well as the standard opengl stuff... If there are any issues, let me know and I'll whip up an automated script. And without further ado, heres that link:

    http://dl.dropbox.com/u/4853895/PGD ...e_MON16PM1.zip

    Note: the prometheus units in there are experimental, and may/may not be the latest in the SVN folder. Theya re just what seems to work best. The odd one out is XS_Font which is from another project and uses tilesets to load a 'font sheet' from Andrus excellent ZenFont utility with a custom define file to link characters to the tiles. NX166 units refers to a test project I made to try out handle based UIs which worked in a decent manner, and thus was thrown into my entry, the uPNG and uTGA units are from Bero and provide TGA and PNG support in very small size units (hence the u, for the mu letter that signifies micro )
    Last edited by code_glitch; 16-04-2012 at 03:06 PM.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  2. #2
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Hmm... Houston, we have a problem....

    Its called VSync I added a bit of code to flash a white screen every time a game cycle ran over its target time to get the magic 50 frames/second... Things flashed a lot... So I set no deadline and watched. In THEORY, every cycle would render later than 0ms and it would be pure white... But no difference happened. So I looked at the FPS counter. Rock solid 60FPS, 30% core utilization -_-. in other words, VSYNC is holding everything up. This is problematic indeed.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  3. #3
    You can change VSYNC with wglSwapIntervalEXT() {Windows/using dglOpengl.pas}, I don't know if this help :


    At first call Read_WGL_EXT_swap_control();

    Then you can adjust VSYNC with

    Code:
    
    type
      TVSyncMode = (vsmSync, vsmNoSync);
    
    procedure Sync(vsync: TVSyncMode);
    var
       i : Integer;
    begin
       if WGL_EXT_swap_control then
       begin
          i := wglGetSwapIntervalEXT;
          case VSync of
             vsmSync    : if i<>1 then wglSwapIntervalEXT(1);
             vsmNoSync  : if i<>0 then wglSwapIntervalEXT(0);
          else
             Assert(False);
          end;
       end;
    
    end;

  4. #4
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Hmm, thanks for that, I'll make sure to put a note in my code once I get my windows virtual machine booted and ready to compile Of course, the focus before that is getting the mouse support thrown into the SDL event code for windows and (maybe) mac OS X!

    Thanks for the find though

    Edit:

    Thanks to some free time, the scroll speed now varies based on how close to the edge of the screen the cursor is, woo
    Also, by not running upx on the binary increased performance in terms of 'feel' on a grand scale. The downside to that? Its no 896K for the exe rather than 280... Its a bit bulky, bu I'll see if I can't cut some bulk out of my units once i'm finished with the entry, although I reckon its more due to the fact I'm using OpenGl and XLib directly (from a prometheus point of view) ^^
    Last edited by code_glitch; 16-04-2012 at 06:05 PM.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  5. #5
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Well, after a good day of development, things are turning out to be much easier than I'd originally anticipated

    Now on what is virtually 600 lines of main program, a few glitches are still present, but the construction system is working (albeit immediate) and its doing everything correctly in terms of executing the 'scripts' and making stuff happen in the game... I think this next screenshot sums it up rather well

    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  6. #6
    Must...build...factory....and....rule...the...worl d...
    Looks very good...much more than what i have done

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
  •