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
    Quote Originally Posted by hwnd View Post
    Why not very usable on 3D models?
    Because often times 3D models UV maps rely on coordinate range from 0..1. If Image Width is 257 then texture's sizeX would be 512. So right side of the texture has black stripe. That obviously cannot be used as a repeating texture, and the usable UV range would be closer to 0-0.5.

    edit: Ah it's actually not black stripe. It will clamp with border line like that right side image:
    http://i.msdn.microsoft.com/dynimg/IC142381.gif
    Last edited by User137; 20-02-2013 at 02:35 PM.

  2. #2
    Here i rendered a transparent ped. The lines around him are "little" blocky.
    Is it possible to somehow tell OpenGL to smoothen these curves, so they don't look so blocky?
    If it's not, i can live with that, but i decided to ask just in case.

    The black behind it, is very basic fake shadow.
    It has large offset because ped is dead and floating in air. This i just a test rendering.
    The shadow should be transparent a bit also instead of complete black.
    Shadow is practically same quad rendered with offset and with glColor3f(0,0,0);



    Here is far view of ped
    http://img843.imageshack.us/img843/8071/farview.png
    Last edited by hwnd; 22-02-2013 at 02:15 AM.

  3. #3
    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.

  4. #4
    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.

  5. #5
    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.

  6. #6
    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.

  7. #7
    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.

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
  •