Page 1 of 7 123 ... LastLast
Results 1 to 10 of 62

Thread: 4E4 Contest Entry - Unnamed RTS

  1. #1
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    4E4 Contest Entry - Unnamed RTS

    If you dont know what E4E is

    http://www.gamedev.net/community/for...assCookie=true

    Its the GameDev.Net Four Elements Contest.

    I have decided I will be making a full RTS game. Not sure exactly of the units yet but there will be three Races - Robot, Zombie and Human - the Humans will have Ninjas and Pirates as special units.

    Anyway - I have started working on the entry and thought it would be nice to show my progress as I work along.

    Last night I got the Map Class started. It allows scrolling, a minimap, stops at map limits, centering on a location - clicking on the minimap centers the main map on the clicked point. Press End to move to near the bottom right of map - press A centers on a brown block just below the opening view.



    The exe can be downloaded from

    http://www.cairnsgames.co.za/downloa...es/RTS0-01.zip

    (Please let me know if you would like me to continue adding to this thread as I work on my entry)
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  2. #2

    4E4 Contest Entry - Unnamed RTS

    A bold undertaking! I wish you good luck.

    I tried the sample and I must say the whole thing is working quite nice! The only thing I am a bit worried about is your framerate. The pc I tried it on doesn't have a really good graphics card (radeon 7000, which is well below the given minimum) but I imagine that at this stage fps should be higher than 39 (even drops to 26 with scrolling).

    Quote Originally Posted by cairnswm
    (Please let me know if you would like me to continue adding to this thread as I work on my entry)
    Yes please!

  3. #3
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    4E4 Contest Entry - Unnamed RTS

    SDL seldom gets really high framerates. A blank SDL project on my notebook gives me about 25-30 FPs and with the code in it I get just over 20.

    How does Run-A-War run on that PC - its using the same calls and should be similar. This is actually slightly more optimised than run-a-0war.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  4. #4

    4E4 Contest Entry - Unnamed RTS

    I cant tell exactly as Run-A-War doesn't display fps but it does appear to be running at pretty much the same speed judging by the scrolling.

  5. #5

    4E4 Contest Entry - Unnamed RTS

    what about using opengl in 2d mode ? possibly this would greatly increase performances.
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  6. #6
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    4E4 Contest Entry - Unnamed RTS

    MSX - how do you do that with SDL - I've read up on it but can;t work it out.

    How do you initialise it?
    How do you load and display images? - The docs says its the same way but the examples show a much more complicated way of showing images.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  7. #7

    4E4 Contest Entry - Unnamed RTS

    well to initialize, you use Opengl-sdl initializations, which is just a little more than standard SDL.
    Then you set OPENGL as Orthographic 2d projection. You can disable all 3d stuff such as depth buffer etc.
    At this point you can draw sprites drawing opengl quads (2 triangles). You use UV coordinates to choose the sprite in a sprite sheet.
    It is possible to build a easy to use blitting function, with usual parameters such as destination rectangle, source, etc.

    The only problem is that the texture must be squared with power-of-2 size, a limitation that you probably don't have in SDL.
    This can possibly create some problems such arranging the sprite in a squared spritesheet.

    But there are *lots* of benefits, first of all performances (standard SDL go really slow on my pc (20-30 fps for empty project), while OPENGL runs hundreds of FPS *with* objects), but you also get:
    - performant and easy scaling
    - performant and very customizable transparency (shadows, explosions, etc)
    - rotations
    - lighting & colors (you can choose the base color when you blit, think like drawing a sprite onto a colored piece of paper).

    If you like, i can help you out with some code for this things.
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  8. #8
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    4E4 Contest Entry - Unnamed RTS

    Do you think you could write me a small example that initializes the OpenGL SDL screen, then loads a texture, and then displays a transparent sprite (Rect from original texture)? If I had this I'm sure I would be able to convert it into my S2DL library quite easily.

    If I can convery my S2DL library to use opengl through SDL like this I'd be really happy

    Thanks
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  9. #9

    4E4 Contest Entry - Unnamed RTS

    Hi William,
    I ported Nehe's tutorial 21 to JEDI-SDL a while ago, and that is a 2D game using OpenGL call Grid Crazy ( for details read http://nehe.gamedev.net/data/lessons....asp?lesson=21 ).

    The source is part of both v0.5 and v1.0 JEDI-SDL CVS.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  10. #10
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    4E4 Contest Entry - Unnamed RTS

    I stole half an hour off work and did the next changes.

    Added more brown spots so the scrolling is clearer.

    Added the first Objects to the map.



    Exe downloadable from
    http://www.cairnsgames.co.za/downloa...es/rts0-02.zip

    Trees are basically the lowest level of item. They dont move, they take up only one collision array location.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

Page 1 of 7 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
  •