Results 1 to 10 of 179

Thread: nxPascal

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Wow, that demo would be awesome.
    I think you have read my mind with this. I had a plan to do something similar.
    Actually porting one C++ fps tutorial code to nxPascal.

    Go ahead, you can do it better. Hopefully you will not use a lot of shaders.
    I personally don't like them.

    Your Edit3D allows to do frame animation?

    BTW, thanks for the tip above.

  2. #2
    With the old Edit3D it's possible to first create for example humanoid, and then copy/paste it multiple times. Then move vertices to make it seem like animation. Frame animation is much simpler than joints, and i have used that some year ago. Difficult to say its current status. Interpolated rendering functions seem to exist, and W3D loading automatically loads and fills the frame array for TTriModel, by quick glance.

    Created quick and dirty level screenshot

    And added first ingame screen. Now it's pretty safe to say that model loading could use some tweaking... Either way, moving without collision, jumping and aiming works. Laser sight on the rifle looks also pretty cool, it's large dot on close wall, and tiny dot at distant. And that gun there is rotating and floating, rendered after a glowing sprite which turns towards camera.

    edit2: Collisions finally working right. Custom made "physics simulation" sort of. Gravity is constantly affecting the character, and he is pushed away from nearest wall point, be it floor most of the time. This makes it possible to simply walk on top of that pile of rocks, or in other terms you could climb stairs with this. I can't wait to give you a video out, but there's still more things to do.
    Attached Images Attached Images
    Last edited by User137; 28-02-2013 at 08:17 AM.

  3. #3
    Interesting way for collisions. Ok gravity for floors but for walls, never heard about this. Interesting.
    Will wait for the video.

  4. #4
    Quote Originally Posted by User137 View Post
    Gravity is constantly affecting the character, and he is pushed away from nearest wall point, be it floor most of the time.
    Wouldn't this mean that when you are on the slope you would also be pushed back at the same time and not only up? Wouldn't this prevent you from standing on the slope?

  5. #5
    Yes it kind of does, player slides down slowly. Now it's good enough to publish a video. I also released it on SVN, both Lazarus and Delphi demos:

    Collisions, sounds, pickable objects (player starts without weapon), jump, crouch. Pretty happy for 1 day's work

    That texture bug still bothers though. It is not renderer's fault, it's just that my W3D format saves unique texture indices per face vertex. nxModel loader attempts to merge and group mainly based on smoothing groups. The texture coordinates are sort of right, some of them should just duplicate the vertices, to use the unique texture coords. The way these textures repeat in my world model makes it calculate them wrong. It really won't be easy to fix i think.

    edit: Well, i uncommented some older code and the texture bug was gone with it. I'll keep it that way but hope that other issues won't rise by it.
    Last edited by User137; 01-03-2013 at 05:45 AM.

  6. #6
    Nice work. You made all this just in one day?

  7. #7
    Yep, nice stuff for 1 day.
    You could use a bit better texture actually. Pretty hard to see different things.
    But these rocks on the floor and going onto them is also very nice thing to see.

    I will go download the latest from svn now.

  8. #8
    So yeah, the texture bug was fixed. I also added the texture generation on the fly now, for new forcefield and the glow texture. Bullets bounce from the forcefield, player doesn't. I guess this is enough functionality for this demo. If i was to create any more, it would be wiser to have a real level editor and propably some sort of octtree optimization (not something i have in mind to do for long while maybe). This does start to get a bit laggy on my computer when the bullets are in hundreds, and for a good reason. There is over 1200 triangles in the world model, and checking each face per each bullet per frame, does take a bit of time.
    fps_demo.jpg
    As for lighting, i could still maybe optimize it with OpenGL default lights. Without investing too much time into that, because the real intention is to have more powerful lighting arrays for GLSL later on.
    Last edited by User137; 01-03-2013 at 08:13 AM.

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
  •