Page 5 of 18 FirstFirst ... 3456715 ... LastLast
Results 41 to 50 of 179

Thread: nxPascal

  1. #41
    Hi user137, I tried your stuff on Delphi 2007, it seems to work fine, just some fixes here and there (basicly because you use tpngobject and I have tpngimage, they are the same). The only demo that didn't compile, was the one that uses bass, something about a property channel that was not declared or something else. Didn't have enough time to trace the error' source or to fix it.

  2. #42
    Seems that i didn't try all the samples I can see compile errors in Effects1 demo. Quick fixes:
    - Change bass.channel[] references to bass.sound[]. This relates to recent change in BASS class to use more descriptive names, and sound that actually uses real channels inside it. Not all sounds use more than 1 channel, ie. streams.
    then in nxGLExtra, in class TParticleEngine, change to:
    Code:
        procedure Move2D(mps: single=1);
        procedure Move3D(mps: single=1);
    mps stands for MovementPerSecond, but actually i will change it to MovementPerTick what it actually means. If default scale is 1 it will move at speeds at which are given to it. But with this parameter you can control how much particles move if fps changes, so that actual speed remains same in all occasions.

    Updated demos and source downloads.
    Last edited by User137; 27-02-2012 at 04:16 PM.

  3. #43
    Just started a project for this in http://code.google.com/p/nxpascal/

    But i'm completely new to that site, so i'd accept some help to set it up SVN at least. Send me a private message if interested to chat or be admin. MSN and Steam are on daily basis.

    Edit: Nvm, SVN is set up and available.
    Last edited by User137; 29-02-2012 at 01:25 PM.

  4. #44
    Quote Originally Posted by User137 View Post
    I just got a weird theory to optimize texture memory... There are times when you just need textures that are not power of 2, for example odd 300x200 image. nxPascal can currently load that as either scaled to nearby size (256x256 in this case) or pixel-perfectly unaltered but fit in 512x256 "frame". However the "frame" will in this case waste alot of unused memory.
    There's no need to rescale or pad textures, most graphic cards support non power of two textures, also try adding support for DXT compressed textured formats, that will give you a slight boost in performance

  5. #45
    Last time i tried some big texture with non power of 2 it came out white. I suppose you mean reduction in memory use? Compressed image goes through algorithm when rendering, so raw texture data will always outperform it. But it's a good idea for some situations, i haven't heard of this concept before, or how to do it with OpenGL.

    Also, making 4 textures out of non-power of 2 texture is not the default way in nxPascal. It is a separate feature through TQuadTexture class. It is shown in the Effects1 demo.

  6. #46
    Quote Originally Posted by User137 View Post
    Compressed image goes through algorithm when rendering, so raw texture data will always outperform it. But it's a good idea for some situations, i haven't heard of this concept before, or how to do it with OpenGL.
    Not exactly, as the decoding is built-in into the hardware, and as they take way less space on memory, it usually rans faster (but might look worse visually).
    About the texture looking white, maybe your card does not support it?
    Here's a link about it:
    http://www.opengl.org/wiki/NPOT_Texture

  7. #47
    Oh yes, i had alot experience with compressed textures after last comment, with Skyrim. Indeed they look a little worse.

    nxPascal is now at SVN revision 15. Just today went through all the demos again that they work, and updated paths more conveniently. They should now work directly, with no modifications to project settings.

    Then, noticed the network demo crashes on exit, with Lazarus. I'm still using the old version of synapse though. Will check that when i get time. (Could be that i modified my own version of synapse when searching for its memory leak. There is one.)

    Licence is also changed, thanks to cocce here. MIT license should finally allow to use nxPascal's full source code with commercial and non-commercial projects with almost no limitations.
    http://www.opensource.org/licenses/mit-license.php

    Ah, almost forgot... Tools folder is opened too. UIEditor, UITester and edit3d-modelling software are in the SVN trunk. Edit3D conversion project for Lazarus started now, but there is zipped the old Delphi version with its source. It will not be 100% identical though, i have hopefully learned the past versions mistakes, or design inconsistencies...
    Last edited by User137; 05-05-2012 at 02:15 PM.

  8. #48
    Updated .zip files in the code.google site. SVN trunk gets updated more often though.

    New:
    - nxGame unit got a big kick-start. New "demo" is added called GameTemplate. This is a base of a game that use new game class, in compact and object oriented way. It handles framerate, input (keyboard and mouse), and modding folders. Basically you inherit your game from TGameHandler class, and override its GameLoop and Draw procedures. Even further, i'm inheriting it twice in the GameTemplate, to more clearly distinct graphics in its own unit, and game events in other.

    And for modding, you can have multiple different mod-sets in your program folder. Using game.modPath to set, and game.GetPath() you can ask the system which path you need for each texture/sound/data-file etc. If mod-folder doesn't have certain file, then original is used.

  9. #49
    Wow, this site seems quiet Thought to let you know of a new unit i added, nxData.pas. TDataStore class is made for keeping large chunks of data loaded in memory. It uses compression to units that are not used for (by default) 15 seconds. Tested in my game on FPC but also compiles with Delphi, using zlib (or fpc zstream). Multithreading was added just today too, so that it shouldn't interfere with rendering thread, if renderer simply hints it that it wants certain chunk loaded, it can render it when thread has finished loading it.

    I don't know of any issues with it at this point, at least works with 2D game, and because it's internally 1-dimensional, it doesn't care what sort of project it is used for. Minecraft-like 3D-chunks, or just as simple database? Why not! Saving my game world on disk, 45Mb millions of tiles data was shrunk under 2Mb. It is similar to what it is like loaded ingame.

  10. #50
    Sounds like a useful unit!

Page 5 of 18 FirstFirst ... 3456715 ... 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
  •