Results 1 to 10 of 121

Thread: G.T.A.2 Map Editor

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    You can make the shadow transparent with alpha color: glColor4f(0,0,0, 0.6);

    Not sure if this is what you are after, but the smoothening of texture's alpha edges is done with:
    Code:
    glAlphaFunc(GL_GREATER, 0.008);
    That means that only color with alpha value greater than 0.008 is rendered.
    If you set it like (GL_ALWAYS, 0), it would draw the whole texture as smooth as it is, also fully transparent pixels with 0 alpha.

  2. #2
    I will leave that sprite rendering for a while. I get tired and bored working on one thing for long time. Instead i worked on some other things.

    With Ctrl+G shortcut it's possible to navigate to any X,Y coordinate on map.
    I use simple Delphi function: InputBox to get coords from user. Temporary thing i guess.
    Later i will use my own dialog i think.

    Instead of instantly going to X,Y location it goes there smoothly. This will be optional of course.
    First it goes fast and when arriving to specific X,Y it slows down until specified X,Y is exactly in center of the cam. And when camera is moving to that point and user clicks on minimap it stops moving.

    Because slow PC im unable to make video, it's smooth in editor but not smooth while recording video.
    Last edited by hwnd; 23-02-2013 at 04:50 PM.

  3. #3
    Found a bit of motivation to work on editor a bit again.
    I was bored. So i took old picking code and copy-pasted this to my latest editor source.
    Works fine as it did previously. I wish i could make other things work so easily (by just copy pasting).
    I don't have very much motivation to actually work on the flat faces again, there are few to add..

    I will add selection boxes in. I actually had working implementation that drew them very nicely.
    Will try to copy paste as much as i can. I had problems with selection going negative, i thought that glTranslatef will not accept negative values, but actually it did. Dunno where i stopped.
    But the code had some neat things already implemented so i will not reinvent it again, there is no point if it works.

  4. #4
    First, nice job. I was reading and looking the videos for a time and I like it.

    I'm wondering if it can be used for games other than GTA2. I mean create new games.
    No signature provided yet.

  5. #5
    Thanks.

    I have plan to add support for GTA1 but very few people actually play it.
    But there are some other similar games.

    I want to add a simple ped to map renderer and walk around on map, with collisions etc.
    Just for fun. If i can get this work, i will add more things maybe. If it's not gonna be a game, then it would be like preview of map ingame that you just created, without actually running GTA2. So you can see preview of the map like in game.

    But atm im taking a break from this editor project. Im not the guy who can work on one thing for very long time "in one row". I need to do some other things and then come back, everything helps, maybe even getting away from pc for a while, work on my car, just walking outside etc. I get my motivation this way.
    Atm i don't have any of it to work on this editor. But i will get it back soon and then i will continue.

    Instead i work on new script compiler for GTA2. It's a combination of C++ and Delphi.
    Very interesting to code. And it works pretty well already, GTA2 is happy with them.
    Ofc i can only compile simple scripts atm, nothing complex like IF..THEN..ELSE or WHILE etc.
    Im starting with basics.
    Last edited by hwnd; 11-03-2013 at 02:20 AM.

  6. #6
    I wanted to work on this thing again and once again, taking a break from project helps.
    I found good tutorial and example for handling NPOT textures here:

    http://lazyfoo.net/tutorials/OpenGL/...ures/index.php

    So i took some NPOT textures from GTA2 and and they all are rendered correctly.
    I have to use DevIL with Delphi and additional DLL's but the result is awesome.


    What's even more important and awesome for me is that these are all quads rendered with OpenGL and textured with NPOT textures. This is exactly what i wanted.
    And if i understand correctly they all are centered. It was very hard for me to make work, but that example solved this.

    Im not sure if i can get rid of the DevIL but if yes, tell me.
    I was so excited so i even didn't properly read the source and what it does exactly.
    If it's possible to get rid of it, i will use nxPascal stuff.

    Here are few examples

  7. #7
    PGDCE Developer Carver413's Avatar
    Join Date
    Jun 2010
    Location
    Spokane,WA,Usa
    Posts
    206
    in newer versions of opengl textures need not be powers of 2 to work. I create many textures on the fly and none of them are powers of 2 and they render fine.

  8. #8
    Quote Originally Posted by hwnd View Post
    If it's possible to get rid of it, i will use nxPascal stuff.
    Yes nxPascal supports NPOT textures. There should also be demo that shows drawing 2D centered, and it allows rotation point be anywhere in (or out of) the image. Demos use POT texture sizes only because they are most compatible, but you can freely edit the images in Paint/Gimp or other and any size would work.

    Also the link you gave http://lazyfoo.net/tutorials/OpenGL/...ures/index.php is not actually using NPOT but it's putting small picture into larger 1024x256 texture with black pixels outside. That's not best way to handle it, although as i have mentioned before, is also possible with nxPascal through texture options...
    Last edited by User137; 25-03-2013 at 02:37 PM.

Tags for this Thread

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
  •