Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

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

  1. #11
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,108
    Blog Entries
    25
    Nice GUI. Don't forget to draw yourself some simple units and building art.

    Quote Originally Posted by code_glitch View Post
    Edit: Just a thought, but whats the view on recycling code from your own codebase for use in the PGD entry?
    Go for it. Just don't take from others without permission and you're golden.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #12
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    928
    Blog Entries
    45
    Most of the work on the actual mechanics is done now, so its as you say, mainly art and scripting up some events etc... There are a few more choices to make, but overall I can say its progressing nicely. The UI, is... Well, its a bit of a botch job if I'm honest - I'm extremely surprised its as stable as it is and it only has one or two glitches at the moment. For instance, it sometimes hands over the wrong co-ordinates to build things, when moving a window, the map disappears etc...

    Though the recycle rule is a saviour Most of the code is pulled from other experiments, its a case of having a ~500 line program, ~900 lines in the backend and the rest is prometheus. Around 6,500 all in if I recall...
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  3. #13
    Me wants see units in action.
    Current projects -> KOFFE - Amateur 3D Game Engine
    Environment -> Xubuntu || Free Pascal || Allegro.pas || GVim

  4. #14
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    928
    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.

  5. #15
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    928
    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.

  6. #16
    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;

  7. #17
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    928
    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.

  8. #18
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    928
    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.

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

  10. #20
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    928
    Blog Entries
    45
    Well, it would look I have to say two things -
    1. This wont be entered into PGD challenge number 2.
    2. This will continue to be developed as an open source project... Things are working nicely and its giving some interesting results on how different approaches to code are working together...

    The simple fact is that I'm now around 2 weeks and a little bit of my final exams, and that consequently my time for code has decreased exponentially :/
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

Page 2 of 3 FirstFirst 123 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
  •