Page 11 of 30 FirstFirst ... 91011121321 ... LastLast
Results 101 to 110 of 300

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

  1. #101

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

    Dont see why your strechdraw functions don't work, should only be as simple as this:

    [pascal]
    procedure TPHXImage.StrechDraw(X, Y, W, H: Integer);
    begin
    glPushAttrib(GL_ENABLE_BIT or GL_COLOR_BUFFER_BIT or GL_CURRENT_BIT );
    glEnable (GL_TEXTURE_2D);
    glEnable (GL_BLEND);
    glDisable (GL_DEPTH_TEST);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    glBindTexture(GL_TEXTURE_2D, FTexture);

    glPushMatrix();
    glScalef(W / Width, H / Height, 1);
    glTranslated(X,Y,0);
    glCallList(FDisplayList);
    glPopMatrix();


    glPopAttrib();
    end;

    procedure TPHXImage.StrechDraw(X, Y, W, H: Integer; PatternIndex: Cardinal);
    begin
    glPushAttrib(GL_ENABLE_BIT or GL_COLOR_BUFFER_BIT or GL_CURRENT_BIT );
    glEnable (GL_TEXTURE_2D);
    glEnable (GL_BLEND);
    glDisable (GL_DEPTH_TEST);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    glBindTexture(GL_TEXTURE_2D, FTexture);

    glPushMatrix();
    glScalef(W / PatternWidth, H / PatternHeight, 1);
    glTranslated(X,Y,0);
    glCallList(FDisplayList+PatternIndex+1);
    glPopMatrix();


    glPopAttrib();
    end;
    [/pascal]

    And yeah, custom frame support would be good, probably just need to look something like this ?

    [pascal]
    TPHXFrame = class
    DisplayList: glUint;
    Image : TPHXImage
    PatternX : Integer;
    PatternY: Integer
    PatternWidth : Integer;
    PatternHeight: Integer
    end
    [/pascal]

    And btw, dont mess with the DisplayList property of the image class, you will break alot of code if you do so

    Nice to hear about the tuts
    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. #102
    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)

    The stretch draw is working fine now. Rotate still has some problems - I dont think its really rotating properly.

    I have made all the changes I wanted onto the phxImage class.

    I started trying to make a small game last night. I could not get FullScreen working properly - are there any issues with it?
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  3. #103

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

    Quote Originally Posted by cairnswm
    The stretch draw is working fine now. Rotate still has some problems - I dont think its really rotating properly.

    I have made all the changes I wanted onto the phxImage class.

    I started trying to make a small game last night. I could not get FullScreen working properly - are there any issues with it?
    Sounds good !

    There's no fullscreen issues that i'm aware of, just set fullscreen to true in the window constructor.

    A few days late but here's the latest release:

    http://www.glxtreem.net/Phoenix2006-08-03.rar

    The sprite engine is included, as well as a early version of the sound engine, no need to initialize OpenGL yourself anymore and setOrthoMode is done by default. And some fixes and tweaks as usuall!
    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

  4. #104

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

    Well, as you can see from the front page, I finally got the importer working properly. Once I get Indexed Property code generation working I'm going to start wraping up all of the classes in the game and engine. Once thats complete full scripting support should be availalble.

    I have ran the wrapper generator on everything thus far, and with the exception of the indexed properties, everything generated properly. Also have to fix Records, but those don't seem to be in use right now .

    I can even wrap the OpenGL calls so that you can make use of them inside of the scripts

  5. #105

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

    Quote Originally Posted by jdarling
    Well, as you can see from the front page, I finally got the importer working properly. Once I get Indexed Property code generation working I'm going to start wraping up all of the classes in the game and engine. Once thats complete full scripting support should be availalble.

    I have ran the wrapper generator on everything thus far, and with the exception of the indexed properties, everything generated properly. Also have to fix Records, but those don't seem to be in use right now .

    I can even wrap the OpenGL calls so that you can make use of them inside of the scripts
    Cool! nice work chief!

    Especially the OpenGL calls bit

    cheers,
    Paul.

  6. #106
    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)

    Why does it automatically set VSync on?

    Do you want the image drawing functions I've done - I notice they are not included.

    I am starting to work on my tutorial set - can we have a release 1 sometime soon. My deadline is actually friday. In addition I want to start using this for a project of mine - I need some stability.

    I have started creating a state manager. Needs a bit more work - making it more extendible - will release soon.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  7. #107

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

    Quote Originally Posted by cairnswm
    Why does it automatically set VSync on?
    Because i noticed some screen flickering with vsync off, so i opted for having it on by default

    Quote Originally Posted by cairnswm
    Do you want the image drawing functions I've done - I notice they are not included.
    Maybe you also noticed that you sent me the file after the last release I gonna include it with some modifications, for example speeding up the tiledraw and such. Need to fix the state changes as we discussed before aswell (ie no glColor4f( 1.0, 1.0, 1.0, 1.0).

    Quote Originally Posted by cairnswm
    I am starting to work on my tutorial set - can we have a release 1 sometime soon. My deadline is actually friday. In addition I want to start using this for a project of mine - I need some stability.
    A release 1 wont make it more stable But if you experience stability problems we just have to fix em, simple as that I have caught a nasty cold so it will probably not be that much coding done over the next few days.
    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

  8. #108
    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)

    A release 1 wont make it more stable
    But it will fix the unit and class names Each version so far has had unit name chnage - and class name changes.

    I just want something to start working with
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  9. #109
    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)

    Wow, this project is coming along quite a bit, no?

    How many people have been working on it and/or contributing?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  10. #110

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

    Well, I've been working on it, but haven't yet put my stuff up as a contribution due to issues that are almost completely resolved. Soon, very soon, my precious... Err... Soon, the scripting wrappers will be complete. I have a running version now that lets you create, load, and display all just fine. Overloaded methods and events arn't working (and it will be quite some time till the events work) but other then that I'm just awaiting the next build so I can make sure that the wrappers all still work. If they do, I'll post them to be included in the package.

Page 11 of 30 FirstFirst ... 91011121321 ... 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
  •