Recent

Author Topic: Finding Zen GL C libraries to compile them  (Read 4683 times)

matthius

  • Full Member
  • ***
  • Posts: 164
  • Creating VRAD...
    • LIBERLOG - Développement rapide
Finding Zen GL C libraries to compile them
« on: November 13, 2023, 11:02:38 am »
I use New Zen GL 4.3.

https://sourceforge.net/p/new-zengl

I have found Zen GL libraries.

Here is Andorra 2D compatibility :

https://sourceforge.net/p/multi-briques/code/ci/default/tree/zengl_sprite_image.pas
« Last Edit: November 13, 2023, 02:28:41 pm by matthius »
M. GIROUX
13 rue Tanguy PRIGENT
35000 RENNES - France
http://liberlog.fr

Seenkao

  • Hero Member
  • *****
  • Posts: 649
    • New ZenGL.
Re: Finding Zen GL C libraries to compile them
« Reply #1 on: November 13, 2023, 11:50:35 am »
  Необходимые библиотеки скомпилированы и идут сразу с ZenGL. Если вы создаёте новый проект, то вам нужно указать путь до данных библиотек.
Вы можете указать полный путь до библиотеки или короткий путь (подобные пути предоставлены в демо-версиях). Находятся данные библиотеки в папке "lib/namelib/cpu-OS", например библиотека ogg для Linux x86_64 находится по пути: "lib/ogg/x86_64-Linux".

  Есть так же библиотеки которые идут вместе с вашим Linux. В данном случае это будут библиотеки заканчивающиеся на "dev", например "libgl-dev". Они должны быть установлены вашей системе.

  Извиняюсь, у меня ни как руки не дойдут создать установочный пакет ZenGL. Чтоб люди не мучались с его настройкой при создании нового проекта.

--------------------------
Google translate:
  The necessary libraries are compiled and come directly with ZenGL. If you create a new project, then you need to specify the path to these libraries.
You can specify the full path to the library or a short path (similar paths are provided in demo versions). The library data is located in the folder "lib/namelib/cpu-OS", for example the ogg library for Linux x86_64 is located at the path: "lib/ogg/x86_64-Linux".

  There are also libraries that come with your Linux. In this case, these will be libraries ending in "dev", for example "libgl-dev". They must be installed on your system.

  I apologize, I just can’t get around to creating a ZenGL installation package. So that people don’t have to worry about setting it up when creating a new project. :(
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

matthius

  • Full Member
  • ***
  • Posts: 164
  • Creating VRAD...
    • LIBERLOG - Développement rapide
Full Screen resolution
« Reply #2 on: November 13, 2023, 04:42:02 pm »
I can start the game multi-briques.

But the full screen resolution is not 640 * 400. It seems to be 800 * 600.
« Last Edit: November 13, 2023, 05:25:28 pm by matthius »
M. GIROUX
13 rue Tanguy PRIGENT
35000 RENNES - France
http://liberlog.fr

Seenkao

  • Hero Member
  • *****
  • Posts: 649
    • New ZenGL.
Re: Finding Zen GL C libraries to compile them
« Reply #3 on: November 13, 2023, 05:11:41 pm »
  Посмотрите демку 4.
  Причин почему не создаётся полноэкранное приложение 640*400 может быть несколько. Самые важные из них, это:
- не верно заданы параметры при создании окна;
- пытаетесь создать окно с неподдерживаемым разрешением.

  И, обратите внимание! Наиболее верное решение - это создавать полноэкранное окно с текущим разрешением и делать его корректировку под данное окно (если вы конечно не увеличиваете разрешение, но и там дисплеем должно поддерживаться данное разрешение). Это же самое написано в 4-й демке.

---------------------------------------
Google translate:
  Watch demo 4.
  There may be several reasons why a full-screen 640*400 application is not created. The most important of them are:
- the parameters were not set correctly when creating the window;
- trying to create a window with an unsupported resolution.

  And, pay attention! The most correct solution is to create a full-screen window with the current resolution and adjust it to fit this window (unless, of course, you increase the resolution, but even there the display must support this resolution). The same thing is written in the 4th demo.  :)
« Last Edit: November 13, 2023, 05:18:34 pm by Seenkao »
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Seenkao

  • Hero Member
  • *****
  • Posts: 649
    • New ZenGL.
Re: Finding Zen GL C libraries to compile them
« Reply #4 on: November 13, 2023, 05:26:16 pm »
Here is Andorra 2D compatibility :

https://sourceforge.net/p/multi-briques/code/ci/default/tree/zengl_sprite_image.pas
  Будьте аккуратны, пожалуйста с использованием старых решений! Новая версия ZenGL претерпела много изменений и код, который использовал версию 3.12 и ранее вернее всего надо подгонять под новую версию ZenGL.

------------------------------------
Google translate:
  Please be careful when using old solutions! The new version of ZenGL has undergone many changes and the code that used version 3.12 and previously most likely needs to be adjusted to the new version of ZenGL.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

matthius

  • Full Member
  • ***
  • Posts: 164
  • Creating VRAD...
    • LIBERLOG - Développement rapide
Re: Finding Zen GL C libraries to compile them
« Reply #5 on: November 13, 2023, 05:27:38 pm »
Yes Collision it not the same as i thought it was. Collision seems to not test the width and height of sprite.

There is Y and X that are real.
M. GIROUX
13 rue Tanguy PRIGENT
35000 RENNES - France
http://liberlog.fr

Seenkao

  • Hero Member
  • *****
  • Posts: 649
    • New ZenGL.
Re: Finding Zen GL C libraries to compile them
« Reply #6 on: November 13, 2023, 05:39:09 pm »
  Это зависит от того, какие параметры вы задаёте на проверку. Если вы создали объект, а размеры спрайта больше объекта и при этом вы проверяете сам объект на столкновение, то спрайт на столкновение проверяться не будет. Я думаю вы сами это понимаете.
  И, если в самом деле есть проблемы, то было бы неплохо показать их. Потому что я не могу полностью гарантировать правильность работы кода ZenGL. Слишком мало тестировался код, и в основном мной самим.

------------------------
Google translate:
It depends on what parameters you specify for verification. If you created an object, and the sprite is larger than the object, and you check the object itself for collision, then the sprite will not be checked for collision. I think you understand this yourself.
   And, if there really are problems, then it would be nice to show them. Because I cannot fully guarantee that the ZenGL code will work correctly. The code was tested too little, and mostly by myself.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

matthius

  • Full Member
  • ***
  • Posts: 164
  • Creating VRAD...
    • LIBERLOG - Développement rapide
Re: Finding Zen GL C libraries to compile them
« Reply #7 on: November 15, 2023, 02:25:15 pm »
What is the variable that transfer X and Y real to integer coordinates ?
M. GIROUX
13 rue Tanguy PRIGENT
35000 RENNES - France
http://liberlog.fr

Seenkao

  • Hero Member
  • *****
  • Posts: 649
    • New ZenGL.
Re: Finding Zen GL C libraries to compile them
« Reply #8 on: November 15, 2023, 07:32:21 pm »
x := Round(n)
???
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

matthius

  • Full Member
  • ***
  • Posts: 164
  • Creating VRAD...
    • LIBERLOG - Développement rapide
Re: Finding Zen GL C libraries to compile them
« Reply #9 on: November 21, 2023, 02:46:14 pm »
There was some bug into this function. Here is the correct function :

function col2d_RectVsCircle(const Rect: zglTRect2D; const Circle: zglTCircle2D): Boolean;
var
  closestX, closestY, distanceX, distanceY: Single;
begin
  with Circle , Rect do
   Begin
    closestX := cX;
    if cX - Radius <= X Then
      closestX := X
    else
      if cX + Radius > X + W Then
        closestX := X + W;

    closestY := cY;
    if cY - Radius <= Y Then
      closestY := Y
    else
      if cY + Radius > Y + H Then
        closestY := Y + H;

    distanceX := Abs (cX - closestX);
    distanceY := Abs (cY - closestY);

    Result := sqr(distanceX) + sqr(distanceY) < sqr(Radius);
   end;
end;     
M. GIROUX
13 rue Tanguy PRIGENT
35000 RENNES - France
http://liberlog.fr

Seenkao

  • Hero Member
  • *****
  • Posts: 649
    • New ZenGL.
Re: Finding Zen GL C libraries to compile them
« Reply #10 on: November 21, 2023, 03:24:19 pm »
Благодарю! Есть тестируемый код? Чтоб мне заново его не создавать?  :-[
Я протестирую и сразу внесу правки в код.

Google translate:
Thank you Do you have testable code? So that I don’t have to create it again? :-[
I will test and immediately make changes to the code.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

matthius

  • Full Member
  • ***
  • Posts: 164
  • Creating VRAD...
    • LIBERLOG - Développement rapide
Re: Finding Zen GL C libraries to compile them
« Reply #11 on: November 21, 2023, 03:36:10 pm »
M. GIROUX
13 rue Tanguy PRIGENT
35000 RENNES - France
http://liberlog.fr

Seenkao

  • Hero Member
  • *****
  • Posts: 649
    • New ZenGL.
Re: Finding Zen GL C libraries to compile them
« Reply #12 on: November 21, 2023, 03:46:41 pm »
You can add this unit to your engine :
Хорошо, я подумаю над вашим предложением! Это ни в коем случае не отказ! Мне в любом случае надо тестировать код и проверять его на разных платформах. :)
Google translate:
Okay, I'll think about your suggestion! This is by no means a refusal! In any case, I need to test the code and check it on different platforms. :)

Quote
You can test here :
https://sourceforge.net/p/multi-briques/
Thanks!
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

matthius

  • Full Member
  • ***
  • Posts: 164
  • Creating VRAD...
    • LIBERLOG - Développement rapide
Re: Finding Zen GL C libraries to compile them
« Reply #13 on: November 21, 2023, 04:06:39 pm »
I am testing on windows.

It demands sin and ceil. Where it is ?
M. GIROUX
13 rue Tanguy PRIGENT
35000 RENNES - France
http://liberlog.fr

Seenkao

  • Hero Member
  • *****
  • Posts: 649
    • New ZenGL.
Re: Finding Zen GL C libraries to compile them
« Reply #14 on: November 21, 2023, 04:34:56 pm »
Многие математические (и не только) функции не входят в состав ZenGL. Если в этом есть острая необходимость, то можно создать самим. Но лучше воспользоваться соответствующими модулями FPC, например "Math".

Google translate:
Many mathematical (and other) functions are not included in ZenGL. If there is an urgent need for this, then you can create it yourself. But it is better to use the appropriate FPC modules, for example "Math".
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

 

TinyPortal © 2005-2018