* * *

Author Topic: Game Contest 2018  (Read 32371 times)

Lulu

  • Full Member
  • ***
  • Posts: 108
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: 2726
    • 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: 2779
  • 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: 108
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: 2779
  • 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 »

Paul_

  • Full Member
  • ***
  • Posts: 104
Re: Game Contest 2018
« Reply #170 on: June 25, 2018, 06:44:18 pm »
Pffff, l must finish my game in next 14 days before I will go away in summer :)

beign capables of learning and making choices

good idea but Black & White game is certainly beyond my capabilities ;D

lainz

  • Hero Member
  • *****
  • Posts: 2779
  • I'm coding :)
    • Lainz
Re: Game Contest 2018
« Reply #171 on: June 25, 2018, 11:10:06 pm »
I've not played it but I remember that game..
 :)
Well. Maybe we can stay with the regular graphics contest next time and let the people do what they want, that worked before. More freedom and learning than that I can't imagine.  :D

Paul_

  • Full Member
  • ***
  • Posts: 104
Re: Game Contest 2018
« Reply #172 on: July 15, 2018, 10:02:40 pm »
Here is my contribution to the contest :)

Pixel Warrior - https://github.com/SlavicGames
https://github.com/SlavicGames/PixelWarrior (Windows binary files included, click on "Clone or download"/"Download ZIP")

Platformer action game with destructible terrain, you can play 2 training missions in campaign. I have no more time now to finish enemy AI and next missions. It's really nice weather so I will make bicycle trip somewhere in Europe :) There are only static targets, when I get back, I'll finish it.

- source code is bit mess, there is no cleanup and I wrote it without any bigger concept. Also lot of stuff needs some polishing.
- controls are descripted in game
- you can use editor for making maps, it's not hard. Just load any mission and check how it's done. Editor controls are descripted in readme on GitHub.
- "graphics" is my work, sounds are somewhere from my HDD and internet

Folders PixelWarrior and PixelWarrior_Editor should be in one folder (+ SFML_units + SFML if someone will check code).

I found one bigger problem. On my PC, sometimes when I run it (with VSync), there is bad tearing. But when I close application and start again it's ok. Same for GAME_Template in csfml-fpc-engine folder. I did not test it on another PC yet.
« Last Edit: July 15, 2018, 10:59:55 pm by Paul_ »

eny

  • Hero Member
  • *****
  • Posts: 1579
Re: Game Contest 2018
« Reply #173 on: July 15, 2018, 10:24:52 pm »
Here is my contribution to the contest :)
Had a quick peek; seems some files are missing  ::)
All posts based on: Win10 (Win64); Lazarus 1.8.0 'stable' (#56594 win64) unless specified otherwise...

lainz

  • Hero Member
  • *****
  • Posts: 2779
  • I'm coding :)
    • Lainz
Re: Game Contest 2018
« Reply #174 on: July 15, 2018, 10:38:20 pm »
Good, I can't beat the first level as always..  :D

Paul_

  • Full Member
  • ***
  • Posts: 104
Re: Game Contest 2018
« Reply #175 on: July 15, 2018, 10:47:47 pm »
Had a quick peek; seems some files are missing  ::)

Ups, I forgot add SFML folder, now it should be complete :) https://github.com/SlavicGames/SFML

Good, I can't beat the first level as always..  :D

Haha, movement is tricky :)

 

Recent

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