Page 1 of 30 12311 ... LastLast
Results 1 to 10 of 300

Thread: Writing a better 2D engine. (Phoenix 2D Game Engine)

  1. #1

    Writing a better 2D engine. (Phoenix 2D Game Engine)

    Hi

    As many of you may know, i'm the developer of GLXTreem and a huge fan of DelphiX. Even through i havn't been that visible either here or on my own page of late due to alot of things happening in real life i still have been lurking on these forums and done some thinking

    My engine started out as a 2D rendering engine that worked similar to DelphiX but it has evolved to be more or less a 3D only engine, even if it support some 2D stuff, but thats mostly to be used as gui stuff and so forth.

    There's been alot of talk latly about 2D and opengl rendering, both here and on the GLXTreem site, and DelphiX is, frankly outdated, with poor hardware support and not as fast as it could be.

    This combined with that i have for a time been considering writing a 2D only, highly optimized engine using OpenGL with all the new hardware features (VBO's Multitexturing, Pixeshalders and 32 textures) has made me considering starting this project up.

    So, i thought, what about posting a public wish-list on theese forums, to see what features the coders here likes about, for example DelphiX and whats their shortcommings.

    I have a few idea's myself, mostly conserning how the engine will work and some features
    • Thread based timer, (or standard app.idle depending on further testing)
      Higly optimized image list using VBO's (fallback to simple glBegin / end), support for tiles and automatic animations. (Freeimage probably)
      Tile engine. Using view port optimizations. Possibly lightmaps, isometric etc
      Sprite engine, quite straightforward. Per-pixel colisions etc.
      Per pixel lighting via GLSL for 2D light effects.
      Font renderer, with support for styled text, wordwrap etc.
      Xml based gui engine (probably a clone of the GLXTreem one)
      Scripting engine using lua ( to interact with the spriteengine + tileengine + gui engine)
      Package support for all components, for single file distributions.


    That is what i have thought of so far. But i really would like to hear what you people would want from an engine like this.
    Amnoxx

    Oh, and this code appears to be an approximate replacement for return(random() & 0x01);

    Phoenix Wiki
    http://www.phoenixlib.net/

    Phoenix Forum
    http://www.pascalgamedevelopment.com/viewforum.php?f=71

  2. #2

    Writing a better 2D engine. (Phoenix 2D Game Engine)

    I must say that I'm interested, very interested.

    Firstly, what I'd want from such an engine is that it wouldn't turn into something like the A5/6 engine. IE, something clunky, overscripted and has no source access.

    Personally the feature list you've put together appeals to me and really contains all I'd want for 2D work. My only suggestion would be instead of coding your own fileformat for the packages, why not use Abbrevia instead? It's zipfile archiving and has directories and can encrypt as well.

    Other than those two points I must say you've got me intrigued. If you can get most, if not all, the points on your feature list into an OpenGL 2D engine DelphiX replacement, you will probably get me as a user right off the bat.

  3. #3
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Writing a better 2D engine. (Phoenix 2D Game Engine)

    Hey Andreas!

    Sounds like a great project idea. There aren't too many OpenGL based 2D libraries for Pascal compilers these days, if any really. So I hope this one takes off!

    From a support side of things, I'd be quite happy to see this thing support Free Pascal(and/or Lazarus) aswell as Delphi. FPC and Lazarus are very quickly becoming the flagship pair of the Pascal development world, but Delphi is not gone by far either. So I think to maximize your target userbase you'd want to offer good support for both compilers and/or component models. [size=9px](Refering, of course to both VCL and LCL should you make a [non-]visual component version of this new 2D library.)[/size]

    With reguards to the modeling and structure of your library, I find that if you keep the functionality very modular and simple where we can pick and choose our level of graphics engine 'hand off' then we as developers will be moe pleased than not in it's usage. It's of course a balancing game, right? Hold our hands too much and it becomes a beginners crutch and they'll all eventually move onto something they can use with a bit more of an intuative understanding. You leave too much to the developer to do himself, he feels a bit overwealmed and moves onto something else that is more within his realm of understanding of OpenGL and graphics in general.

    As for packaging. I like simple, but I also like (LOVE actually! ) options. So why not just write an interface for yours aswell as this Abbrevia I've been hearing about so much?

    Oh and graphics formats... Must have PNG and BMP! I was a little shocked to find out that SDL did not support it by default. It's an open format for crying out loud! *sigh* oh well.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  4. #4

    Writing a better 2D engine. (Phoenix 2D Game Engine)

    Hi Andreaz,

    Welcome back!
    I like your idea a lot. I've been doing some 2d opengl programming myself, the last few months. At first it was a bit of getting used to, but it's actually fairly easy to learn, once you get 'it'.

    Some things I'd like to see is a solid 2d particle generator, and some good sound support, preferably openAL.
    Another thing might be netwerk support, but that should be a very low priority thing.

    Quote Originally Posted by WILL
    Oh and graphics formats... Must have PNG and BMP! I was a little shocked to find out that SDL did not support it by default. It's an open format for crying out loud! Surprised *sigh* oh well.
    I doubt bmp is a format you'll want to invest time into. IMO, if you want alpha support its either tga or png, for all the rest its jpg.

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

    Writing a better 2D engine. (Phoenix 2D Game Engine)

    Some things for Sprites
    :arrow: Transparency
    :arrow: Rotation
    :arrow: Scaling
    are musts

    Why use Lua for the scripting engine. I'm a Pascal programmer and would rather write my scripting in Pascal as well. There are many pascal scripting projects out there - DWS, paxScript etc etc - why not integrate one of them into the 2D libraries.

    One reason I stopped using GLXtreem (Still have it installed though) is that I found it inconsistent accross different computers. This is something that must be made more stable in the new Libraries.

    Are you considering doing this as a Andreaz only project or are you considering opening it up as an open source collaboration project? I would certainly like to be involved if you did do somethign like this.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  6. #6

    Writing a better 2D engine. (Phoenix 2D Game Engine)

    Quote Originally Posted by Robert Kosek
    I must say that I'm interested, very interested.

    Firstly, what I'd want from such an engine is that it wouldn't turn into something like the A5/6 engine. IE, something clunky, overscripted and has no source access.

    Personally the feature list you've put together appeals to me and really contains all I'd want for 2D work. My only suggestion would be instead of coding your own fileformat for the packages, why not use Abbrevia instead? It's zipfile archiving and has directories and can encrypt as well.

    Other than those two points I must say you've got me intrigued. If you can get most, if not all, the points on your feature list into an OpenGL 2D engine DelphiX replacement, you will probably get me as a user right off the bat.
    It will be open source for shure, and my intention is to make it very modular, atleast without limiting the speed and ease of use.

    As a package format i was planning on using the format me and Tokter wrote for glxtreem, (was only avaible for the v1.0 via cvs). But shure, a external lib is doable aswell.

    Quote Originally Posted by WILL
    Hey Andreas!

    Sounds like a great project idea. There aren't too many OpenGL based 2D libraries for Pascal compilers these days, if any really. So I hope this one takes off!

    From a support side of things, I'd be quite happy to see this thing support Free Pascal(and/or Lazarus) aswell as Delphi. FPC and Lazarus are very quickly becoming the flagship pair of the Pascal development world, but Delphi is not gone by far either. So I think to maximize your target userbase you'd want to offer good support for both compilers and/or component models. [size=9px](Refering, of course to both VCL and LCL should you make a [non-]visual component version of this new 2D library.)[/size]

    With reguards to the modeling and structure of your library, I find that if you keep the functionality very modular and simple where we can pick and choose our level of graphics engine 'hand off' then we as developers will be moe pleased than not in it's usage. It's of course a balancing game, right? Hold our hands too much and it becomes a beginners crutch and they'll all eventually move onto something they can use with a bit more of an intuative understanding. You leave too much to the developer to do himself, he feels a bit overwealmed and moves onto something else that is more within his realm of understanding of OpenGL and graphics in general.

    As for packaging. I like simple, but I also like (LOVE actually! ) options. So why not just write an interface for yours aswell as this Abbrevia I've been hearing about so much?

    Oh and graphics formats... Must have PNG and BMP! I was a little shocked to find out that SDL did not support it by default. It's an open format for crying out loud! *sigh* oh well.
    Yeah, support for other platforms then delphi would be nice, i have quite limited experience with lazarus and the likes myself, especially regarding the design ide, wich is a big part of making a accessable package . But this should be doable for shure

    My intention is to make it as modular as possible, so you easilly can mix parts from the package with custom components and raw opengl code. But to get the design editors to work in a easy and accessable way will requre to interconnect certain parts, package routines comes in mind.

    I feel you should be quite pleased with the format that freeimage (http://freeimage.sourceforge.net) supports:

    • BMP files [reading, writing]
      DDS files [reading]
      Dr. Halo files [reading] *
      GIF files [reading, writing] **
      ICO files [reading, writing]
      IFF files [reading]
      JBIG [reading, writing] ***
      JNG files [reading]
      JPEG/JIF files [reading, writing]
      KOALA files [reading]
      LBM files [reading]
      Kodak PhotoCD files [reading]
      MNG files [reading]
      PCX files [reading]
      PBM files [reading, writing]
      PGM files [reading, writing]
      PNG files [reading, writing]
      PPM files [reading, writing]
      PhotoShop files [reading]
      Sun RAS files [reading]
      TARGA files [reading, writing]
      TIFF files [reading, writing]
      WBMP files [reading, writing]
      XBM files [reading]
      XPM files [reading, writing]


    However the freeimage version i'm using is distributed as a dll so will be some platform issues there that will require some kind of fallback i suppose.


    Quote Originally Posted by Traveler
    Hi Andreaz,

    Welcome back!
    I like your idea a lot. I've been doing some 2d opengl programming myself, the last few months. At first it was a bit of getting used to, but it's actually fairly easy to learn, once you get 'it'.

    Some things I'd like to see is a solid 2d particle generator, and some good sound support, preferably openAL.
    Another thing might be netwerk support, but that should be a very low priority thing.

    Quote Originally Posted by WILL
    Oh and graphics formats... Must have PNG and BMP! I was a little shocked to find out that SDL did not support it by default. It's an open format for crying out loud! Surprised *sigh* oh well.
    I doubt bmp is a format you'll want to invest time into. IMO, if you want alpha support its either tga or png, for all the rest its jpg.
    Thanks

    Yeah, i've noticed, been visiting your page quite regulary

    With 2d particle generator i suppose you mean a particle system ? In that case there will propbably be one down the line, maybe not as advanced as the later versions of the glxtreem ones but nontheless.

    Sound is also a thing on the todo list, only been working with fmod myself, but nothing says it cant support multiple sound libs.


    Quote Originally Posted by cairnswm
    Some things for Sprites
    :arrow: Transparency
    :arrow: Rotation
    :arrow: Scaling
    are musts

    Why use Lua for the scripting engine. I'm a Pascal programmer and would rather write my scripting in Pascal as well. There are many pascal scripting projects out there - DWS, paxScript etc etc - why not integrate one of them into the 2D libraries.

    One reason I stopped using GLXtreem (Still have it installed though) is that I found it inconsistent accross different computers. This is something that must be made more stable in the new Libraries.

    Are you considering doing this as a Andreaz only project or are you considering opening it up as an open source collaboration project? I would certainly like to be involved if you did do somethign like this.
    Yeah, scaling and all those stuff for sprites will ofc be supported, mosy likly via texture transformations to limit the need to modify the vertex buffers to much.

    Well my idea of to use lua is mostly because of its speed and the ability to precompile scripts, shure it's c style code so that may not be optimum, but it should be possible to make this pluggable to use different languages i guess.

    The computer inconsistency in glxtreem is mosly because there's limited fallback functions for the more advanced opengl calls, ie its targeted on somwhat top of the line gpus. Another limiting thing is the testing platforms i have avaiable, wich basicly is only my own computer

    To be honest, glxtreem has mostly been my test platform for different graphical technologies that i have put together in a library that people could use of their liking. Thats why when someone has asked if they may use and modify any of the code from a component in the package for their own use I have given a all go

    Actually, the idea of making it a community project appeals me, there's alot of compentent coders here with great ideas so I think this would only be good for the project.
    Amnoxx

    Oh, and this code appears to be an approximate replacement for return(random() & 0x01);

    Phoenix Wiki
    http://www.phoenixlib.net/

    Phoenix Forum
    http://www.pascalgamedevelopment.com/viewforum.php?f=71

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

    Writing a better 2D engine. (Phoenix 2D Game Engine)

    Well with this idea and the Game Networking idea we can surely get a PGD game project going. (Whos doing the Sound project )
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  8. #8

    Writing a better 2D engine. (Phoenix 2D Game Engine)

    Tisk tisk tisk, a better graphics library would definately be GraphicEx: http://www.delphi-gems.com/GraphicEx.php. Free and written in Delphi. Plus it supports the more graphics types.

    As far as the Lua scripting goes, I'm in. I've been spending alot of my spare time working on integration of Lua into many of my projects, and have come along way from the posts on pas2lua. Soon as I get it stable again I'll be posting it. The current version still works quite well though .

    Would be nice if it were in FPC and not in Delphi, but I'd live either way. FPC would just make it more open to the world.

    On a final though, why not seperate the rendering engine from the game engine. Thus you could easily offer cross-platform and support for graphics engines that haven't even been thought up yet.

  9. #9

    Writing a better 2D engine. (Phoenix 2D Game Engine)

    Quote Originally Posted by jdarling
    Tisk tisk tisk, a better graphics library would definately be GraphicEx: http://www.delphi-gems.com/GraphicEx.php. Free and written in Delphi. Plus it supports the more graphics types.
    I actually used it before i switched to freeimage, but its built as a TGraphic desendence with all the inherit problems. Freeimage is alot faster when loading images, so it will still be the one libary i prefer, however graphicex is a good candidate for a fallback loader.

    Quote Originally Posted by jdarling
    As far as the Lua scripting goes, I'm in. I've been spending alot of my spare time working on integration of Lua into many of my projects, and have come along way from the posts on pas2lua. Soon as I get it stable again I'll be posting it. The current version still works quite well though .
    Would love to see that one

    Quote Originally Posted by jdarling
    Would be nice if it were in FPC and not in Delphi, but I'd live either way. FPC would just make it more open to the world.

    On a final though, why not seperate the rendering engine from the game engine. Thus you could easily offer cross-platform and support for graphics engines that haven't even been thought up yet.
    Hopefully it will work in both FPC and delphi . Well as i have imagined its not as much of a game engine then a rendering engine, much like the way DelphiX is, but this may change, who knows
    Amnoxx

    Oh, and this code appears to be an approximate replacement for return(random() & 0x01);

    Phoenix Wiki
    http://www.phoenixlib.net/

    Phoenix Forum
    http://www.pascalgamedevelopment.com/viewforum.php?f=71

  10. #10

    Writing a better 2D engine. (Phoenix 2D Game Engine)

    You can download Pas2Lua from: http://www.eonclash.com/pas2lua/pas2lua.zip and the source from: http://www.eonclash.com/pas2lua/pas2lua_src.zip. As I said, its not ready for main stream yet (hence why the url isn't exactly published on my site). Basicly right now you still have to tweak its output, but when complete it will have full wrapper building capibilities. No timeline on completion at this time.

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