Recent

Author Topic: Snake game for the ptcGraph unit  (Read 4969 times)

Roland57

  • Sr. Member
  • ****
  • Posts: 423
    • msegui.net
Snake game for the ptcGraph unit
« on: April 25, 2021, 09:11:43 pm »
Hello!

Here is a little snake game that I made using the ptcGraph unit.

https://gitlab.com/rchastain/snake-ptcgraph

The more I use the ptcGraph unit, the more I like it! Thanks and congratulations to the author.

And thanks to Eugene Loza for his sprite sheet.

Regards.

Roland

« Last Edit: April 25, 2021, 09:22:27 pm by Roland57 »
My projects are on Gitlab and on Codeberg.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2023
  • Former Delphi 1-7, 10.2 user
Re: Snake game for the ptcGraph unit
« Reply #1 on: April 26, 2021, 01:14:16 am »
Nice!

You might like to add your game to the Wiki's Projects using Free Pascal games category.

Roland57

  • Sr. Member
  • ****
  • Posts: 423
    • msegui.net
Re: Snake game for the ptcGraph unit
« Reply #2 on: April 26, 2021, 05:08:37 am »
My projects are on Gitlab and on Codeberg.

Seenkao

  • Hero Member
  • *****
  • Posts: 550
    • New ZenGL.
Re: Snake game for the ptcGraph unit
« Reply #3 on: April 26, 2021, 12:02:35 pm »
Приветствую. Всё довольно неплохо, но надо учитывать что не у всех установлен BASS (в комплекте нет). При попытке записать в таблицу рекордов, клавиатура почти не работает.

Так же было бы неплохо, чтоб ограничительный экран был виден. При движении влево-вправо не понятно, врежемся мы или нет.
И у меня змейка  выводится только квадратиками. )))

google translate: Greetings. Everything is pretty good, but it should be borne in mind that not everyone has BASS installed (not included). When trying to write to the high score table, the keyboard almost does not work.

It would also be nice to have the bounding screen visible. When moving left-right, it is not clear whether we will crash or not.
And my snake is displayed only in squares.  :)
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

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

Roland57

  • Sr. Member
  • ****
  • Posts: 423
    • msegui.net
Re: Snake game for the ptcGraph unit
« Reply #4 on: April 26, 2021, 12:28:03 pm »
Greetings. Everything is pretty good, but it should be borne in mind that not everyone has BASS installed (not included).
Thank you for your feedback. I will see what I can do for that.

When trying to write to the high score table, the keyboard almost does not work.
I don't know what to say. It works with me.  :-\

It would also be nice to have the bounding screen visible. When moving left-right, it is not clear whether we will crash or not.
Yes. I could draw a wall.

And my snake is displayed only in squares.  :)
Please compile with -dPICTURES.

« Last Edit: April 26, 2021, 12:34:15 pm by Roland57 »
My projects are on Gitlab and on Codeberg.

Roland57

  • Sr. Member
  • ****
  • Posts: 423
    • msegui.net
Re: Snake game for the ptcGraph unit
« Reply #5 on: April 27, 2021, 06:18:23 pm »
It would also be nice to have the bounding screen visible. When moving left-right, it is not clear whether we will crash or not.
I finally decided to let the snake go through the walls (so to say). So from now you lose only when the snake hits its own body.

Everything is pretty good, but it should be borne in mind that not everyone has BASS installed (not included).
I included the BASS unit, and the binary for Linux 64. I included a note in the README with a link where the user can download the other versions of the library.

I also added a -dNoSound option, in case someone wishes to compile and play the game without installing the library.

When trying to write to the high score table, the keyboard almost does not work.
Still not solved, unfortunately, because I cannot reproduce it.  :(

The git repository has been updated.
« Last Edit: April 28, 2021, 08:53:25 am by Roland57 »
My projects are on Gitlab and on Codeberg.

Roland57

  • Sr. Member
  • ****
  • Posts: 423
    • msegui.net
Re: Snake game for the ptcGraph unit
« Reply #6 on: April 29, 2021, 10:39:35 am »
  • Fixed a compilation error on Windows.
  • Created a Lazarus project.
  • Uploaded bass.dll to the repository.
Couldn't test sound on Windows, because there were no speakers on my PC.  :)
« Last Edit: April 29, 2021, 10:42:29 am by Roland57 »
My projects are on Gitlab and on Codeberg.

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1122
  • Professional amateur ;-P
Re: Snake game for the ptcGraph unit
« Reply #7 on: April 29, 2021, 12:21:34 pm »
Hey Roland,

Couldn't test sound on Windows, because there were no speakers on my PC.  :)

Completely off topic, I know, but don't you have at least ONE set of cheap headphones? :P

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

Roland57

  • Sr. Member
  • ****
  • Posts: 423
    • msegui.net
Re: Snake game for the ptcGraph unit
« Reply #8 on: April 29, 2021, 01:19:43 pm »
Completely off topic, I know, but don't you have at least ONE set of cheap headphones? :P

Unfortunately, I don't. When there are children in a house, it is very difficult to find a pair of headphones when you need it.  :)
My projects are on Gitlab and on Codeberg.

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1122
  • Professional amateur ;-P
Re: Snake game for the ptcGraph unit
« Reply #9 on: April 29, 2021, 01:27:37 pm »
Hey Roland,

Unfortunately, I don't. When there are children in a house, it is very difficult to find a pair of headphones when you need it.  :)

I can vouch for that and I sympathise!!! :D

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

Seenkao

  • Hero Member
  • *****
  • Posts: 550
    • New ZenGL.
Re: Snake game for the ptcGraph unit
« Reply #10 on: April 29, 2021, 10:53:19 pm »
Still not solved, unfortunately, because I cannot reproduce it.  :(

The git repository has been updated.

Вполне возможно это был маленький глюк, по окончанию игры. Тестировал (если правильно помню) на Linux.

google translate: Quite possibly it was a small glitch at the end of the game. Tested (if I remember correctly) on Linux.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

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

Roland57

  • Sr. Member
  • ****
  • Posts: 423
    • msegui.net
Re: Snake game for the ptcGraph unit
« Reply #11 on: May 01, 2021, 07:20:21 am »
Quite possibly it was a small glitch at the end of the game.

Thank you for your message.

I believe I see now what you mean. When you lose, if you don't release fast enough the arrow key that you were using for steering the snake, the program skips the high scores page and closes too quickly. I hope the problem is fixed now.
My projects are on Gitlab and on Codeberg.

Seenkao

  • Hero Member
  • *****
  • Posts: 550
    • New ZenGL.
Re: Snake game for the ptcGraph unit
« Reply #12 on: May 01, 2021, 02:07:16 pm »
Нет, вы меня не правильно поняли.

В конце игры, я пытался ввести "имя пользователя". Но клавиатура не реагировала. Реагировали только стрелки. При нажатии на стрелки появлялись символы.

Надеюсь понятно объяснил!? (и как раз вероятно, что был какой-то глюк, раз у меня так сработала игра).

google translate: No, you misunderstood me.

At the end of the game, I tried to enter a "username". But the keyboard didn't respond. Only the arrows reacted. When the arrows were pressed, symbols appeared.

I hope I explained it clearly !? (and it is likely that there was some kind of glitch, since the game worked like that for me).
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

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

Roland57

  • Sr. Member
  • ****
  • Posts: 423
    • msegui.net
Re: Snake game for the ptcGraph unit
« Reply #13 on: May 01, 2021, 07:18:53 pm »
No, you misunderstood me.

At the end of the game, I tried to enter a "username". But the keyboard didn't respond. Only the arrows reacted. When the arrows were pressed, symbols appeared.

I hope I explained it clearly !? (and it is likely that there was some kind of glitch, since the game worked like that for me).

I see. Thank you for the information. I will continue to investigate.

Regards.

Roland
My projects are on Gitlab and on Codeberg.

Handoko

  • Hero Member
  • *****
  • Posts: 5158
  • My goal: build my own game engine using Lazarus
Re: Snake game for the ptcGraph unit
« Reply #14 on: May 01, 2021, 07:37:28 pm »
I tried to compile it under Ubuntu Mate - Lazarus 2.0.10 but failed. The first error was solved after I installed libxxf86dga-dev. But then I got an error while linking message, which I wasn't able to solve.

 

TinyPortal © 2005-2018