Results 1 to 10 of 179

Thread: nxPascal

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by hwnd View Post
    You should enable Assignable typed constants in compiler options.
    Set to True.
    But yes, XE2 should have already png support, just remove the nxPascal png folder from the paths.
    If i remember correctly, i had same problem with XE(2)
    That didn't make a difference for the left side cannot be assigned too, I assume it's a recent update in XE series. I never had to deal with it because I never did it that way lol.

    I remove png though and managed to get it to compile, had to remove BASS audio references too (so no sound) due to errors but I know how to use BASS directly anyway.

    Does anyone know what, if any 3D model formats are supported?

  2. #2
    Supported formats are W3D (used in my Edit3D modelling program that comes with nxPascal), OBJ and MilkShape3D ascii format. None of them support joints or animations at the moment, and i am not 100% sure that OBJ and MS3D are bugfree.

    Also you could definitely tell me, maybe in private messages more details about these compile errors. Again i was not aware at all that there was a system where nxPascal would not work straight out of the box. I am still mainly supporting Lazarus only, and i don't have any Delphi installed on my computer.

  3. #3
    So I would assume 3D wise pretty much anything goes aside from animation (anything requiring joints etc) and probably high poly count stuff (don't know a lot about 3D).

    The only problems so far with demo's are with the included pngimage which is solved by removing that folder, PNG is support directly in Delphi for some time now (I think it's even the same guy that implemented it), and with
    the BASS implementation (the included .pas) file had quite a few errors but I just removed sound from the game so I could test it rather than mess about with it.

    I have always used Delphi as I like the IDE although I don't use a lot of it's features, never tried Lazarus or others.

  4. #4
    These different compiler related issues are often solved with IFDEF's. If you see here:
    https://code.google.com/p/nxpascal/s.../src/nxInc.inc
    there is for now only definitions for which compilers support inlining (by removing function and parameter overhead it can increase math functions performance great deal, at slightly higher memory cost). There could also be a {$DEFINE OldPng} that would only be active on older Delphi compiler versions. But again, as i don't have a Delphi it is difficult to do something like that on my own. Do the png's work then with no reference unit in uses list? I don't know where the new Delphi finds the needed PNG class, and since what version it was available.

    bass.pas or nxBass.pas? If it's bass.pas, then it should be reported to them, possibly with suggests on how to fix them.

  5. #5
    In Delphi PNG images are supported trough TPngImage class which is a subclass of TGraphic and is located in "Vcl.Imaging.pngimage" unit.
    But based on Lifepower there is/was and isue with Delphi built-in PNG support regarding alpha channels so Lifepower sugested to use "Vampyre Imaging Library" with Asphyre Sphinx 3 instead of Delphi built-in PNG support.
    Delphi's PNG implementation has an issue in alpha-channel. An alternative solution is to use Vampyre Imaging Library and add AsphyreVampyre to USES list. This solution also works for FreePascal/Lazarus. You should download the latest snapshot from the link below.
    This was at the time when Delphi XE2 was out so it is posible that the problem was already fixed by now (I haven't tested it out).

    As for BASS Audio Library:
    I don't exactly remember when but in one of the previous versions there were some serious changes made which means that it is no longer posible to simply compile old program with newest bass.pas unit.
    Not sure what changes were made but one project of mine throws almost a hundred syntax errors. All demos that come with BASS library compile just OK. And yes I tried this on Delphi XE3 and Delphi 7 with which I have developed my project in the first place. So one day I'll have to take tme and see what changes were made and update my code acordingly.

  6. #6
    Regarding PNG units...I prefer to use Be Ro (Benjamin)'s free cross-platform PNG unit:
    http://www.pascalgamedevelopment.com...loader&p=97221

    See one of the last posts for a pure Pascal version (compatible with Freepascal, Delphi XE3 & XE4):
    http://www.pascalgamedevelopment.com...ll=1#post94019

    cheers,
    Paul
    Last edited by paul_nicholls; 02-02-2014 at 02:05 AM.

  7. #7
    I was at work, had nothing to do and thinked about modern OpenGL 3.x and nxPascal.
    Its pretty difficult to setup matrices, vertex data etc with modern OpenGL and the shaders needed for matrix stuff and so on.
    So idea for the nxPascal.

    Make everything "behind the scene" and let user to use simple to understand and use commands.
    For example lets take: glTranslatef(), nice command to "move things" and position them in place.

    In modern gl you have to do alot of dirty work to implement this. At least i see it so and its just one (!) example.
    So make everything needed in modern OpenGL to get the same result. But instead calling it again glTranslatef, call it for example: nxTranslatef or something.
    So i build my mesh and want to position or move it i just use for ex: nxTranslatef(2.0, 2.0, 5.0); (XYZ) order.

    And same for other things.
    There could be some shader templates provided for matrix stuff, for cameras etc.

    With such commands and nxPascal doing all the "hard" things behind the scenes will make using modern OpenGL much easier.


    What do you guys think?


    I would like to rewrite my map editor for new OpenGL 3.x+ but the amount of writing code just for building mesh and simple camera matrix stuff scares me.
    I dont even know proper good OpenGL headers for new OpenGL versions, except dglOpenGL. Is it even updated lately?

    Share your thoughts.

  8. #8
    I test it and works awesome! Android support would be great

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
  •