Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: Bryed 3d (1998) postmortem

  1. #11
    Quote Originally Posted by Akira13 View Post
    This is part of why it's so embarrassing to see people using glBegin/glEnd in current projects. You are using early 90s rendering techniques, people!
    The fact that these techniques are from early 90's doesn't mean that they shouldn't be used. Does it?
    BTW how many early 90's techniques that originate from early Pascal dialects are you still using today?

    Any way have you ever asked yourself why do people nowadays still use glBegin/glEnd technique?
    Perhaps it is because most OpenGL tutorials for pascal teach this approach. In fact I don't remember ever seeing OpenGL tutorial for Pascal that doesn't use such approach. If you know for one please do share. And if not you are welcome to write one on your own. I will be glad to read it either way.

  2. #12
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Quote Originally Posted by SilverWarior View Post
    The fact that these techniques are from early 90's doesn't mean that they shouldn't be used. Does it?
    It's not a matter of 'technique' - it's not like they're language features or some timeless algorithmic process such as a quick sort.

    They are from a very old API that can't make full use of the graphics hardware that has existed for many years now.

    You absolutely should not be using immediate mode GL anymore (glbegin/glend etc) not only is it slow but there's no guarantee that hardware vendors will even continue to support it and if they do you can forget about using your hardware to anything like its potential.

    Immediate mode GL on any GPU of the past 10 years is like running DOS on brand new 8 core computer. Yes its possible but nobody in their right mind would seriously run it day to day let alone invest their time in long term programming projects for the DOS platform.

    If you're using GL 1.x or GL 2.x in an immediate style (or later revisions of GL in compatibility mode) to develop games then just be aware that you're shooting yourself in the foot.

    Knowing both the old and the new styles? the new style is easier anyway for anything but drawing the most primitive of shapes - it forces you to manage your data in an efficient and logical manner which will quickly become second nature.
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

  3. #13
    Quote Originally Posted by SilverWarior View Post
    In fact I don't remember ever seeing OpenGL tutorial for Pascal that doesn't use such approach.
    Very sad, this situation is.

    We should state whenever possible that even Quake 3 uses glBegin/glEnd either as a compatibility fallback option or to render single textured quads.
    This technique is *that* fresh

  4. #14
    Quote Originally Posted by phibermon View Post
    the new style is easier anyway for anything but drawing the most primitive of shapes.
    No signature provided yet.

  5. #15
    Don't forget that the old style API is capped very hard at about 20k vertices, which is infinitesimal in today videocards terms. Go over that and performance drops like a stone.

  6. #16
    I managed finding a moderately broken version with asset building tools included (from October 1999). So i can finally present this project, incomplete (sigh) with bad porn removed:

    English version (text messages translated by editing the EXE in Notepad++)
    Original (Russian only) version

    Lifted assets galore (doom2, duke nukem, blood) and general lack of sanity, as expected from a college student during the lawless Great Depression of the 90s. (I recently stumbled on an VHS tape with a movie recorded from TV, from that time period. Gratuitous rape scenes with tits flashing, live pigs doused in gasoline and set on fire... Oft interrupted with ads of lawnmowers, beer or luxury cars. No ratings, no limitations, only separated from Chip&Dale Rescue Rangers by time slots. A generation of kids grew watching this)

    Someone's speedrun @ YouTube:

    At first, I just covered all tits with black bars. I then realized it was lowest of hypocrisy as bad porn interaction was still there. I rebuilt all maps removing all porn actors and hastily re-uploaded. I then realized there's a not-so-rare glitch that makes a dead ogre flicker through the entire sprite atlas. And also sprites could be seen in FAR because they are uncompressed. I hastily rebuilt the pak file replacing even censored hentai with empty spaces and re-uploaded again.

    Sorry, still no sources because sources of code and art are intermixed and removing all porn from these is a *much* harder task.

    Cave entrances/exits not showing in game

    Interestingly, those are items, map generator raises them by 100cm so that you pick them up without crouching, while render routine places their sprite 130cm below origin.

    Map editing:

    code sample (note integer = smallint)
    New( SqrtTable );
      for i:=0 to 1023 do
      For c:=0 to  1024 do
      For c:=0 to  1024 do
      For c:=0 to  1024 do
    Function Angle(x1,y1,x2,y2: integer): integer;
      var x,y: LongInt;
        x:=x1-x2; if x=0 then x:=1;
        y:=y1-y2; if y=0 then y:=1;
          If abs(x)>abs(y) then
            If x>0 then Angle:=AT^[512+((y shl 9) div x)]
                   else Angle:=word(32767)+word(AT^[512+((y shl 9) div x)])
            If y>0 then Angle:=16384-AT^[512+((x shl 9) div y)]
                   else Angle:=49152-AT^[512+((x shl 9) div y)];
      Procedure SinCos(var s,c: integer; rasst, angle: integer);
        S:=(longint(ST^[angle shr 6]) * Rasst) div 32767;
        C:=(longint(CT^[angle shr 6]) * Rasst) div 32767;
      STable = array[0..1023] of Word;
      SqrtTable: ^STable;
      i: Word;
    function KOREN( S: LongInt ): Word; assembler;
           db 66h; xor si, si      { xor esi, esi }
           les si, dword ptr SqrtTable
           db 66h; mov bx, word ptr S   { mov ebx, S }
           mov dx, 11
           db 66h, 0Fh, 0BDh, 0CBh      { bsr ecx, ebx }
           sub cx, 9; jle @less
           shr cx, 1
           adc cx, 0
           sub dx, cx
           shl cx, 1
           db 66h; shr bx, cl      { shr ebx, cl }
           db 26h, 67h, 8Bh, 04h, 5Eh   { mov ax, es:[esi+ebx*2] }
           mov cx, dx
           shr ax, cl
    All coordinates are in centimeters, speeds in centimeters per tick (1/25 s), angle is the full SmallInt range is 360 degrees. With overflows exploited to loop it.
    Last edited by Chebmaster; 26-05-2022 at 11:16 AM.

  7. #17
    I watched the video. Nice touch with the mushrooms.. And impressive work. Definitely beats what I did back then..

  8. #18
    And beats anything I've done since too.

  9. #19
    Any new projects ongoing?

  10. #20
    I *am* busy making a new engine since then. Never really stopped. The main thread at is 50 pages and 8 years long. And yet, I can't even show a rotating cube: my works (behold them and despair, ye mighty) are in deep refactoring since, I think, 2018.
    Targets Raspberry Pi and Windows XP with DX9 class gpus.
    It even has a thread here , which is an empty stub as I don't currently have anything to show.

    There was a small side-quest, modifying Quake 2 Delphi into using Lanczos upsampling

    ..a sad date approaches, 20 years since the tragic death of the guy who introduced me into using OpenGL with Delphi. I shall not forget post a tread for it in 3 days.

Page 2 of 3 FirstFirst 123 LastLast


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts