* * *

Author Topic: Game Contest 2018  (Read 28020 times)

Lulu

  • Full Member
  • ***
  • Posts: 105
Re: Game Contest 2018
« Reply #165 on: May 31, 2018, 08:20:21 am »
And the red and blue component of the title and buttons colors are swapped. I'll see this problem later because I'm too busy at this time.
Thanks Handoko ! :)
fpc 3.0.4 Lazarus 1.8.0  -  AMD A8-6600K  -  Windows 10  64bits
bad english... sorry :)

circular

  • Hero Member
  • *****
  • Posts: 2724
    • Personal webpage
Re: Game Contest 2018
« Reply #166 on: May 31, 2018, 02:30:58 pm »
Hello Lulu.

About the font problem, I don't know if I have the latest version but for me it crashes because Font.Name = ''. I solved it by adding a check in GuiFont() and putting 'Arial' in this case.

About the red-blue swap, here is it can be fixed it in oglcTexture.inc (note also the use of LineOrder):
Code: Delphi  [Select]
  1. function TTextureManager.InitFromBGRABitmap(aIma: TBGRABitmap ): PTexture;
  2. var dup:TBGRABitmap;
  3.  glFormat: GLenum;
  4. begin
  5.  dup := aIma.Duplicate as TBGRABitmap;
  6.  
  7.  if TBGRAPixel_RGBAOrder then
  8.    glFormat := GL_RGBA
  9.  else
  10.    glFormat := GL_BGRA;
  11.  
  12.  if dup.LineOrder = riloTopToBottom then
  13.    dup.VerticalFlip;
  14.  
  15.  Result := AddInstanceToList;
  16.  Result^.ImageWidth := dup.Width;
  17.  Result^.ImageHeight := dup.Height;
  18.  
  19.  Result^.TextureWidth := dup.Width;
  20.  Result^.TextureHeight := dup.Height;
  21.  
  22.  Result^.FrameWidth := dup.Width;
  23.  Result^.FrameHeight := dup.Height;
  24.  
  25.  Result^.FrameCount := 1;
  26.  
  27.  glGenTextures(1, @Result^.ID );
  28.  BindTexture( Result );
  29.  glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, dup.Width , dup.Height, 0, glFormat, GL_UNSIGNED_BYTE, dup.Data );
  30.  
  31.  dup.Free;
  32.  
  33.  glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
  34.  glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
  35.  glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); // Linear Filtering
  36.  glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); // Linear Filtering
  37. end;

By the way, nice OGLC library  :)

About the font clipping of the title, I am not sure why but it seems the measured text size is not the same as the actual render size.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 2708
  • I'm coding :)
    • Lainz
Re: Game Contest 2018
« Reply #167 on: May 31, 2018, 08:52:48 pm »
About the deadline: please, for all participants, if your game is not finished, we can extend deadline a bit more, like I said to @Handoko in another thread.

We want to see these games!

I played good games here, ready to submit to itch.io, game jolt or indie db.

Lulu

  • Full Member
  • ***
  • Posts: 105
Re: Game Contest 2018
« Reply #168 on: June 02, 2018, 05:42:48 pm »
Quote
Hello Lulu.

About the font problem, I don't know if I have the latest version but for me it crashes because Font.Name = ''. I solved it by adding a check in GuiFont() and putting 'Arial' in this case.

About the red-blue swap, here is it can be fixed it in oglcTexture.inc (note also the use of LineOrder):
Code: Delphi  [Select]

    function TTextureManager.InitFromBGRABitmap(aIma: TBGRABitmap ): PTexture;
    var dup:TBGRABitmap;
     glFormat: GLenum;
    begin
     dup := aIma.Duplicate as TBGRABitmap;
     
     if TBGRAPixel_RGBAOrder then
       glFormat := GL_RGBA
     else
       glFormat := GL_BGRA;
     
     if dup.LineOrder = riloTopToBottom then
       dup.VerticalFlip;
     
...
Circular, it's a good idea ! fixed in the code.

Quote
By the way, nice OGLC library  :)
Thanks !
fpc 3.0.4 Lazarus 1.8.0  -  AMD A8-6600K  -  Windows 10  64bits
bad english... sorry :)

lainz

  • Hero Member
  • *****
  • Posts: 2708
  • I'm coding :)
    • Lainz
Re: Game Contest 2018
« Reply #169 on: June 18, 2018, 07:55:17 pm »
A bit more than a month to end the contest.

What do you think about the next contest idea:

Create a simulation of a small universe, with creatures that can interact with the things you put in the universe, interact between them, beign capables of learning and making choices.

I know, sounds very tricky =)

Edit: I've added all projects to main page
https://forum.lazarus.freepascal.org/index.php/topic,39495.0.html

Start testing them, so you can vote when needed :)
« Last Edit: June 18, 2018, 09:59:37 pm by lainz »

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus