AGen, a new 2D engine & framework

Discussion in 'Feedback Requests' started by dopeman, Dec 19, 2007.

  1. tolik

    Original Member

    Joined:
    Sep 20, 2004
    Messages:
    1,407
    Likes Received:
    0
    Isn't SVG pointless and abandoned? I've been trying to do some stuff with it, trying all libraries, converters and renderers last year - I wasn't able to convert most of my vector files to SVG and render seamlessly.

    How about replacing SVG with SWF (gnash/libming)?
     
  2. JGOware

    Indie Author

    Joined:
    Aug 22, 2007
    Messages:
    1,578
    Likes Received:
    0
    Loaded plugin Microsoft DirectX 8.1 Graphics v1.0 Agenoria
    Loaded plugin Microsoft DirectX 8.1 Input v1.0 Agenoria
    Loaded plugin Microsoft DirectX 8.1 Audio v1.0 Agenoria
    Loaded plugin Lua 5.1 Binder v1.0 Agenoria
    Initializing video
    Video device detected Intel(R) 82845G/GL/GE/PE/GV Graphics Controller
    Video initialized
    Initializing input
    Input device detected Mouse
    Input device detected Keyboard
    Input initialized
    Initializing audio
    Audio initialized
    No script file specified, loading default 'Scripts/main.lua'
    Executing script file 'Scripts/main.lua'
    Could not load script file 'Scripts/main.lua'
    Releasing video
    Video released
    Releasing input
    Input released
    Releasing audio
    Audio released
    Unloaded plugin Microsoft DirectX 8.1 Audio v1.0 Agenoria
    Unloaded plugin Microsoft DirectX 8.1 Input v1.0 Agenoria
    Unloaded plugin Microsoft DirectX 8.1 Graphics v1.0 Agenoria
    Unloaded plugin Lua 5.1 Binder v1.0 Agenoria
     
  3. Bad Sector

    Original Member

    Joined:
    May 28, 2005
    Messages:
    2,742
    Likes Received:
    5
    SVG is more developer friendly (XML and all). Also its far from pointless and abandoned since its supported by a great deal of software, including the allmighty InkScape which uses SVG as its native file format.

    What SVG is, however, is hard to implement right. Also its open to "extensions" which are only supported by those who make these extensions. Classic example is the shadow in the original Firefox logo SVG which is made using an Adobe-only filter that can be used (exported/imported) only by Adobe products while being ignored by most SVG readers. So if you try to export a vector file from some Adobe product (or any other program that extends the SVG files) you have to make sure the file does not use these extensions. How to do that, however, is beyond my knowledge since i haven't used SVG much.

    In my opinion XML formats such as SVG and COLLADA are a great thing for moving data between programs and converting data from the XML file to your custom format, but not used directly. For example in my 3D engine i convert meshes from COLLADA to an own binary format that takes much less space and by using COLLADA one can use pretty much any 3D modelling program to make models for my engine. If i wanted to produce 2D vector files, i would do the same with SVG: i would write a program that converts SVG files to an own binary format and use any SVG tool to produce these files. Of course doing this requires some restrictions to be placed about what you can do :).

     
  4. dopeman

    dopeman New Member

    Joined:
    Dec 17, 2007
    Messages:
    73
    Likes Received:
    0
    Sorry, I should have been more clear. The engine uses a custom rendering interface, similar to Cairo I just wrote a converter that transforms SVG/PS to our own format. The renderer is still far from perfect however and has errors with complex polygons and the 'stroke' command.
    But yeah, as Bad Sector said, SVG is far from dead and widely supported by many vector image editors (like Inkscape). I just wanted to be able to import vector game art into the engine. After all, this is supposed to be a game engine not a Flash interpreter.

    JGOware, the log you showed is not from the latest build of the engine. Also it says in the log that no script was specified which suggests that you are running the executable itself (without supplying a file in the command line). You should run the .bat files instead. Also, if you extracted all the files flat in the same folder, the script files would not be in the 'scripts' directory and the engine wouldn't find them
     
  5. tolik

    Original Member

    Joined:
    Sep 20, 2004
    Messages:
    1,407
    Likes Received:
    0
    Could you please give me 5 examples of games that use SVG for anything beyond 5 static pictures?
     
  6. Bad Sector

    Original Member

    Joined:
    May 28, 2005
    Messages:
    2,742
    Likes Received:
    5
    Do you read what you quote?

    Read my whole post again. You'll see that i write that SVG is not a good idea for using directly in games and i believe that it should be converted to other formats (usually as an intermediate format).

    SVG and SWF are totally different things. The only common part is that they have something to do with vectors, but beyond from that there is nothing else common.

    Now if a game uses vectors (or bitmaps) which were converted from SVG files, i don't know. But then again, you wouldn't know i my 3D models were converted from COLLADA files if i didn't mentioned that.
     
  7. tolik

    Original Member

    Joined:
    Sep 20, 2004
    Messages:
    1,407
    Likes Received:
    0
    Yeah, I read your stuff and unfortunately it doesn't make sense :(
     
  8. JGOware

    Indie Author

    Joined:
    Aug 22, 2007
    Messages:
    1,578
    Likes Received:
    0
    "space partitioning (levels can have hundreds of thousands or even millions of sprites)"

    Ok...it's time to put up or shut up. :) lol..

    Let's see a demo where it renders an 800x600x32 bitmap background and draws a bunch of 32x32 sprites. (and displays the number of sprites) Have a key press where we can add say 100 sprites at a time. And uh, key press to flip between window and full screen.
     
  9. dopeman

    dopeman New Member

    Joined:
    Dec 17, 2007
    Messages:
    73
    Likes Received:
    0
    Haha, you're right. No video card can render that many sprites at the same time. I didn't really say that right. What I meant was that you can have a scene with a lot of sprites and the ones offscreen would be culled thus not affecting the FPS.
    There's a demo in the latest build "demo_cull.bat" which shows that.
    If you open Scripts\cull.lua in the latest build, you'll see at the beginning:
    XCOUNT = 300
    YCOUNT = 200
    That script generates a scene of 60000 sprites. You can rack up these numbers and see what happens yourself. It will take a while to generate the sprites at the start, but once they are in memory, the FPS will be relatively high.

    Yeah, there's a script that shows something similar, it's called "demo_bench.bat". Depending on your system, the FPS drops at around 3000-6000 sprites.

    By the way, JGOware, were you able to run the scripts or are you still getting just a log.txt dump?
     
  10. JGOware

    Indie Author

    Joined:
    Aug 22, 2007
    Messages:
    1,578
    Likes Received:
    0
    Hi - I've been testing so many things I can't recall if I tested your latest version again or not. Sorry!!! I know I was able to run one of your demos recently, but I forget which one.

    "Yeah, there's a script that shows something similar, it's called "demo_bench.bat". Depending on your system, the FPS drops at around 3000-6000 sprites."

    Shoot me a download link here and I'll download it and test that out. :)
     
  11. dopeman

    dopeman New Member

    Joined:
    Dec 17, 2007
    Messages:
    73
    Likes Received:
    0
    Version 1.1 of the engine is out. Much more stable and easier to use than before. The documentation has also been updated and improved.
    Except for the engine, download includes a number of demos, tutorial scripts and CHM documentation.

    [​IMG]

    download

    Also, if you didn't know, the first commercial game using the engine was released a couple of weeks ago.
     
  12. dopeman

    dopeman New Member

    Joined:
    Dec 17, 2007
    Messages:
    73
    Likes Received:
    0
    Version 1.2 of the engine is out.
    Includes improvements in stability and pathfinding.

    [​IMG]

    2009_02_11.zip (1,104 kb)

    We're trying to improve stability so we really need some feedback, in particular if the demos fail to run on your machine.
    If the engine crashes on your machine, please post "devices.txt" and "log.txt" so we know where the problem might be.
     
  13. JGOware

    Indie Author

    Joined:
    Aug 22, 2007
    Messages:
    1,578
    Likes Received:
    0
    I have to go on record as stating that this thread wins the award for "Worst screen shot examples in a 2D engine showcase thread." ;)

    I realize you're just posting tech examples, but to make us click you need to get some graphic pizazz going. :)
     
  14. Dyson6

    Dyson6 New Member

    Joined:
    Sep 3, 2008
    Messages:
    3
    Likes Received:
    0
    I think I've been looking for something like this.
     
  15. Ciardhubh

    Ciardhubh New Member

    Joined:
    Oct 9, 2008
    Messages:
    131
    Likes Received:
    0
    I ran all demos and tutorials and everything seemed to work fine.

    One thing though, it appears to not support Unicode, e.g. Umlauts in device names ("Primärer Soundtreiber" turns to "Primrer Soundtreiber").
     
  16. dopeman

    dopeman New Member

    Joined:
    Dec 17, 2007
    Messages:
    73
    Likes Received:
    0
    Haha. You're probably right, but to be honest, people who are impressed by shiny graphics are not the demographic we are after. :)

    Lua doesn't support Unicode. Remember, every demo is 100% Lua scripted so naturally it can't handle umlauts.
    I'm glad the engine doesnt crash though.

    Thanks for the feedback.
     
  17. TimMensch

    TimMensch New Member

    Joined:
    Mar 11, 2007
    Messages:
    7
    Likes Received:
    0
    Can't support umlauts?

    Another look at Playground might be called for. Not sure why there's a comment above about Playground being for "commercial" developers. Sure that's what PlayFirst wants, but free is free. There are no strings--you can just use it. All PF wants is to be notified before you publish something--nominally so they can have a chance to try to give you money for it. But you're under no obligation to take our money. ;)

    And even though you specify dialogs and text screens in Lua in Playground, the strings all go through a translation file--which is UTF-8 XML (Excel XML, actually, so you can open and end the strings file in XML or OpenOffice). And the UTF-8 strings are handled beautifully by Lua, so you can even concatenate them within Lua. Playground also has its own font renderer and scalable font format, so you don't have to worry about whether fonts are installed correctly, or whether a font will render differently on Mac.

    So even if you don't want to use Playground in your project, you could potentially learn a few tricks from how we did things. :)

    Also, you might want to look at Love2d:

    http://love2d.org/

    It's a game engine that allows you to write the whole game in Lua; I've heard good things, but haven't played with it yet.

    Good luck.
     
  18. dopeman

    dopeman New Member

    Joined:
    Dec 17, 2007
    Messages:
    73
    Likes Received:
    0
    Version 1.2.5 2009.05.26
    This version is much more stable than earlier builds. Package includes:

    AGen redistributable for Win32
    Tutorial and demo scripts
    Documentation: CHM manual
    Engine plugins: DirectSound 8.1, DirectInput 8.1, DirectX 8.1, DirectX 9, OpenAL, OpenGL and SDL Input
    Lua 5.1 with extensions: MicroPather, Box2D, LuaFileSystem, LuaSocket and DevIL


    Download 1.2.5.zip (2,284 Kb)

    http://2dengine.com/bin/release/1.2.5.zip
     
  19. dopeman

    dopeman New Member

    Joined:
    Dec 17, 2007
    Messages:
    73
    Likes Received:
    0
    Version 1.3.0 2009.10.11
    New version introducing several changes to the framwork. Notice that this build contains some known issues. Package includes:

    AGen redistributable for Win32
    Tutorial and demo scripts
    Documentation: CHM manual
    Engine plugins: DirectSound 8.1, DirectInput 8.1, DirectInput 9, DirectX 8.1, DirectX 9, OpenAL, OpenGL and SDL Input
    Lua 5.1 with extensions: MicroPather, Box2D, LuaFileSystem, LuaSocket, LuaXML and DevIL

    download: http://2dengine.com/page.php?p=download
     
  20. dopeman

    dopeman New Member

    Joined:
    Dec 17, 2007
    Messages:
    73
    Likes Received:
    0
    Hi everybody. I would just like to mention that version 1.3.1 of the engine is out. A number of bugs were fixed in this release.

    Also, you can find a couple of new tutorials on scrolling and physics using Box2D:
    [​IMG][​IMG]

    Please check those out if you're a beginner programmer you might be suprised at how easy it is to start making games using AGen. Thanks for your time.
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer