Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33

Thread: Next3D

  1. #1

    Next3D

    Edit: Name "Next3D" is trademark of LearningSoft company, this library has nothing to do with them.
    Project name changed to nxPascal. This lib is not commercial and never will be.

    This is a set of pascal units to ease programming, especially game programming. I started the project perhaps 2007 after i realized where my GLEngine had gone to wrong direction. Everything is categorized and contain abstract classes and strictly separated OpenGL specific implementations of them. If you want to use specific feature of the library you can do just that and it should just click to everything... This was first done for Delphi, then fully converted to Lazarus (freepascal) and is now changed to compile with them both.

    Full source (26.6.2010): (Files unavailable for now)
    Demos (26.6.2010):
    UI Editor (6.5.2010):
    For nxNetwork you also need Synapse lib from http://synapse.ararat.cz/doku.php

    Units

    nxGL - OpenGL graphics engine.
    Classes: TGLTextureSet, TGLModel, TGLFont, TNXGL (Engine itself), TVertexArray, TGLUI (User interface with panels, buttons etc. is work in progress)
    TNXGL has some functions to control OpenGL rendering. For DelphiX-like ease of use 2D there is DrawRotate() which can use any size patterned textures and draw it rotated around given point in image.
    nxNetwork - High level wrapper for Synapse network library. Simple classes for TCP and UDP server and client.
    nxMath - Math functions for basic and 2D.
    nxMath3D - Math functions for 3D. Vector, matrix, (quaternion).
    nxTypes - Basic datatypes used throughout most units.
    nxGraph - Contains basic 2D graphics and texture loading from files. Used heavily by nxGL. Contains abstracts of user interface and graphics engine.
    nxModel - 3D model formats (W3D, (MS3D not much tested), (OBJ some point)). Bones not yet supported. Some level of vertex animation is done.
    nxStrings - Few advanced string functions.
    nxDX - DirectX possibility. I don't know DirectX well enough to do this yet.
    nxPath - Path finding unit for grid based maps, not yet tested with Lazarus though it compiles from older code. Doesn't look for optimal path but tries to find 1 rough and quick.

    Tools:

    Edit3D - Delphi made 3D-modelling tool. Is able to import OBJ, MS3D and save W3D.
    UIEditor - Lazarus work in progress for User interface. When it's done you would be able to design the whole game interface, save it and use in game. Later may support simple events like opening panel with button but programmer has full control of them for now. Object-tree makes the layout very similar to drawing a form in Delphi/Lazarus, but this one allows full OpenGL's graphical advances.

    I'll keep updating this post and only make new replies if something notable comes up.
    Last edited by User137; 12-05-2011 at 08:40 AM.

  2. #2

    Re: Next3D

    Sounds interesting, but we would have to see the code to play with it I understand there's no www page where we can see the code or screenshots yet? If this is open-source, I would advice creating a project hosted on https://sourceforge.net/ or http://code.google.com/hosting/ or such.

  3. #3

    Re: Next3D

    Some screenshots in other project thread using this:
    http://www.pascalgamedevelopment.com...p?topic=5597.0
    And this video is still valid as the game works exactly as good or maybe better in Lazarus:
    http://www.youtube.com/watch?v=kzDrqhHbwKw

    Uploaded full source at: (see first post)

    And i also understand that it would need to come with some demo-programs... i will see what i can do if you have interest

    Simple texture demo:
    First you need to set library path for new project's compiler options. This is directory where i placed the lib:
    $(LazarusDir)\fpc\2.4.1\units\i386-win32\next3d
    Next add LazOpenGLContext in project's required packages. (This step i'd like to eliminate)

    [pascal]uses ... , dglOpenGL, nxGL;
    ...
    procedure TForm1.FormCreate(Sender: TObject);
    begin
    nx.CreateGlWindow(self);
    // OpenGLContext will take in mouse events from the form
    tex.AddTexture('new','test.png');
    // First texture in the list will have index 0
    end;

    procedure TForm1.Timer1Timer(Sender: TObject);
    begin
    if not nx.Initialized then exit;
    nx.Clear(true,false); // color,depth buffers
    nx.Enable2D;
    //tex.SetTex(0); // We don't now need to set it again
    nx.Draw(20,10,0);
    nx.Disable2D;
    nx.Flip;
    end;

    procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    begin
    nx.KillGLWindow;
    end;[/pascal]

  4. #4

    Re: Next3D

    Cool, video and screenshots in that thread look really impressive.

    I tested compilation under Linux: You need to remove Windows from nxPath uses (to have TPoint type defined, you better use cross-platform Types unit instead). Then everything compiles fine under Linux (including nxNetwork based on synapse). (Well, besides nxDX, but that's obviously expected ).

    Note about your nxGL.pas LazOpenGLContext notes: if you need to use OpenGLContext unit (for TOpenGLControl), then you *should* have to add LazOpenGLContext into required packages. There's no "workaround" for this (not a clean one at least), this is by design In practice, you may distribute Lazarus package (.lpk file) for your engine, and make your engine package require the LazOpenGLContext package. Then developers will be able to easily use your engine as Lazarus package, and the required LazOpenGLContext will be automatically pulled by dependencies.

    This is what I use for my engine, and it works without problems

    Yes, let us know when a demo will be available

  5. #5

    Re: Next3D

    Wow... so this is the engine you are using for your RTS project. I'll have a closer look at the source soon as I am about to start working on my own engine soon.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  6. #6

    Re: Next3D

    Quote Originally Posted by michalis
    I tested compilation under Linux: You need to remove Windows from nxPath uses (to have TPoint type defined, you better use cross-platform Types unit instead). Then everything compiles fine under Linux (including nxNetwork based on synapse). (Well, besides nxDX, but that's obviously expected ).
    Demos are now available, and thx, i also updated nxPath - source zip is also updated

    4 new demos contain:
    - texture: Basic window and texture drawing in normal and rotated way. Alpha blending.
    - networkTest: Simple decrypted connection with TCP and UDP. 2 buttons for test packets, you can also open multiple instances of it to test server's client handling.
    - pathfind: Simple 2D drawing combined with pathfinding class. Included maze.bmp contain the maze and start points for paths which find way to cursor. Also shows how to change texture loading options such as forced color to alpha.
    - model: Loading and rendering a rotating 3D model. Surfacing another rotating model in cursor pointed position and click drag flamey particles.

    For now i don't have much built-in support for particles because they much depend on program you want to use them to. Some use vertex arrays etc, there are tens of ways and purposes...

    Edit: Updated demos file again.. little speed optimization for path finder app

  7. #7

    Re: Next3D

    Did you remove the source again?

    I would like to download it, but It says the file is deleted.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  8. #8

    Re: Next3D

    Works just fine for me (from first post), edited the second post's old link out. Also sorry about 60 sec wait and ads, but that was 1 easy place to make a persistent upload account to.

    Edit: Pathfinding demo should look like this:
    http://i39.tinypic.com/2z8qg6t.png

  9. #9

    Re: Next3D

    Thanks. That link seems to work.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  10. #10

    Re: Next3D

    Just giving heads-up on the UI Editor. You maybe noticed how unfinished the UI classes are in the release version, now i have however got to point where i was able to draw panels and buttons. Onwards UI Editor may take quite bit longer to finish but this was the critical step.
    http://i40.tinypic.com/nq6849.png
    Objects scale with window unless they use "absolute position" or "absolute size", i haven't seen that kind of feature used much before. On the downside it makes object width and height have 2 scaling levels depending on the mode. By default objects position and size are 0..1 and not absolute.

    In engine level also tiny change in font texture loading; instead of color-key (black) i now use AlphaColor option for smoother but pixel-perfect "antialiased" fonts. Also added nx.LastError property for handling errors on loading etc.

    Also, plan is to add list of textures and fonts in UI editor so you could define and save all graphics used in game, instead of adding them in program manually. UI needs this feature anyway if want to have at least 2 different looking buttons etc.

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