Hello, do you remember the old game telepong from atary?ç
I made a game in CGE like that. I’ts my first proyect using physics
/BlueIcaro
Hello, do you remember the old game telepong from atary?ç
I made a game in CGE like that. I’ts my first proyect using physics
/BlueIcaro
Tested, cool! Just like original Pong, it is incredibly hard
Recommendations:
OptimalSize
. Or even activate distance field fonts.Hello Michalis, Thanks for the tips. I change the font, but I can not see many different.
Also I add some text with the keys for the player and a text, which says press space bar to start.
Also I fixed a bug, when a player scores the ball starts to the player which lost. May be is more correct, that the player which gets the goal is who make the next serve
Also I want to say, that after some time reading and making test with CGE, make this game with the physics engine is not so complicate.
I am in a hurry to continue learning about CGE
Thanks for the CGE.
Thanks for the good words about the engine! I’m happy it’s going nicely
I looked at your project on GitHub (BTW thank you for making it public, this allowed me to quickly investigate! I). The issue occurred because you left the TCastleFont.Url
empty – in such case, the TCastleFont
instance doesn’t load any font, so it’s ignored, and the values of OptimalSize
, DistanceField
there don’t matter.
Solution:
You need to get the font file.
If you want to have exactly the same font as used by default by Castle Game Engine, get DejaVuSans.ttf
from castle-engine/src/fonts/data at master · castle-engine/castle-engine · GitHub . These are open-source fonts (see license links from castle-engine/src/fonts/data/AUTHORS.txt at master · castle-engine/castle-engine · GitHub ) so yes, it is OK to copy around the TTF font file into your project.
Put the font file in the data
subdirectory of your project.
Then configure your TCastleFont
instance (named Font1
): set the Url
field to point to the font file. Once you do this, the TCastleFont
properties will start to have an effect
Experimenting, I got pretty results by leaving DistanceField
at false
and setting OptimalSize
to 100.
Attaching the screenshot with important things outlined.
I see you added GitHub Actions – CastleEngineTelepong/.github/workflows/build.yml at main · Blueicaro/CastleEngineTelepong · GitHub . Cool. Let me know if you need any help setting them up – I highly recommend using them to have automatic builds of your projects!
Note that the workflow specified there uploads the “artifacts” (your game builds) to the “snapshot” release tag at the end. To make it work, you need to manually (one time) create the “snapshot” release. Just go to “Releases” of GitHub - Blueicaro/CastleEngineTelepong as the project admin, create a new release, as tag of it choose “snapshot” (the tag will be created upon publishing) and click “publish”. You will then see a new “snapshot” release with only the source code (zip) published. Then you can rerun the action workflow – and it should upload the builds to the release, adding there binaries for Windows, Linux etc.
See e.g. how “snapshot” release looks like in
cool, played it and won
I miss something like randomness. The ball jumps allways in the same way/direction. If the player stands on the right position he has won (in my case).
In my next project I need also something with physics, thanks for the inspiration.
Hello, I add some random in the rest.
May be can be more funny
/BlueIcaro
Hi Michalis, first apologies because I was overloaded with the work and I was AFK and I couldn’t test it
I got a error when I run the action. The MacOs give a error:
Error: Installation failed: Destination file path /Users/runner/work/_temp already exists
Error: Installation process failed: Destination file path /Users/runner/work/_temp already exists
Error: Destination file path /Users/runner/work/_temp already exist
I attach the log file.
logs_30757223540.zip (22.6 KB)
Thanks
There was a bug in the 3.3.0 version of the gcarreno/setup-lazarus action, which is part of the GitHub Actions setup we recommend GitHub Actions | Manual | Castle Game Engine .
I submitted it (see Version 3.3.0 fails with "Error: Installation failed: Destination file path /home/runner/work/_temp already exists and" (at least Linux, macOS) · Issue #31 · gcarreno/setup-lazarus · GitHub ) and it’s already fixed. Sorry, I guess you must have used my castle-game/blob/master/.github/workflows/build.yml as a template during the 6 days when it was broken (while I did some tests on engine branch, but for castle-game I used the master branch).
Short version: Just change the line
uses: gcarreno/[email protected]
into
uses: gcarreno/[email protected]
here: CastleEngineTelepong/.github/workflows/build.yml at main · Blueicaro/CastleEngineTelepong · GitHub
and the issue will be gone
Bonus option: I also recommend you copy the file .github/dependabot.yml into your project. Then every week GitHub will automatically check are there updated versions of your action components, and create a pull request proposing to upgrade them (if they pass automatic tests of course).