Recent

Author Topic: does the castle engine miss the TDrawableImage class and OnCollision event?  (Read 6944 times)

greenzyzyzy

  • Full Member
  • ***
  • Posts: 249
I looked at the above error but cannot reproduce it.

Tried with
- FPC 3.2.0 on Linux/x86_64,
- FPC 3.2.0 on Windows/x86_64,
- FPC 3.0.4 on Windows/x86_64

-- in all cases strategy_game_demo works fine.

I had one idea for a potential source of problem (and I now fixed it in the engine). But any way I look at it -- if you just run unmodified example code from "examples/tiled/strategy_game_demo/", with unmodified data, then it should have worked anyway.

Actions:

1. Please use "vanilla" FPC and Lazarus, downloaded e.g. from https://www.freepascal.org/ or https://www.lazarus-ide.org/ or through fpcupdeluxe . I neved tested laz4android fork -- it is possible they did something incompatible there.

    Note that CGE has our own way to build Android APK (and packages for other platforms, e.g. iOS, Nintendo Switch) through our build tool. So it is not necessary, and not advised, to use any forks of FPC/Lazarus to get Android support. Just use the latest original releases of FPC/Lazarus :)

2. Please provide a log, so we can see details and spot eventual problems. The strategy_game_demo uses standard CGE logging, so on Windows the logs are just in C:\Users\<user-name>\AppData\Local\strategy_game_demo\strategy_game_demo.log .

sorry ,i give up.i want to wait for castle engine 7.0 and try then.

Handoko

  • Hero Member
  • *****
  • Posts: 5129
  • My goal: build my own game engine using Lazarus
If you want to make simple games (Tetris, Snake, Pacman, etc), LAMW should be good enough.

I played a lot LAMW + GLES 1/2, it worked. I managed to make some moving animations and run it on my phone. No problem. I abandon it because I want something further. The 3D capability of jCanvasES2 had issues. I'm now improving my OpenGL knowledge, hope someday I can fix the issue myself.

furious programming

  • Hero Member
  • *****
  • Posts: 852
A micro library for creating games as simple as for old consoles (like NES or SNES) would come in handy — ultra light, object-oriented, using events (similar in design to the LCL component ecosystem), very easy to use. It is about basic functionality — image rendering, sprite support, sound playing, keyboard, mouse and controller support. Such a minimum.

Someday I would like to write a retro style game (something like "The Legend of Zelda: A Link to the Past") and I'll probably write something like that for Free Pascal and Windows (using OpenGL and OpenAL). But I don't know when.
Lazarus 3.2 with FPC 3.2.2, Windows 10 — all 64-bit

Working solo on an acrade, action/adventure game in retro style (pixelart), programming the engine and shell from scratch, using Free Pascal and SDL. Release planned in 2026.

michalis

  • Full Member
  • ***
  • Posts: 137
    • Castle Game Engine
I looked at the above error but cannot reproduce it.

Tried with
- FPC 3.2.0 on Linux/x86_64,
- FPC 3.2.0 on Windows/x86_64,
- FPC 3.0.4 on Windows/x86_64

-- in all cases strategy_game_demo works fine.

I had one idea for a potential source of problem (and I now fixed it in the engine). But any way I look at it -- if you just run unmodified example code from "examples/tiled/strategy_game_demo/", with unmodified data, then it should have worked anyway.

Actions:

1. Please use "vanilla" FPC and Lazarus, downloaded e.g. from https://www.freepascal.org/ or https://www.lazarus-ide.org/ or through fpcupdeluxe . I neved tested laz4android fork -- it is possible they did something incompatible there.

    Note that CGE has our own way to build Android APK (and packages for other platforms, e.g. iOS, Nintendo Switch) through our build tool. So it is not necessary, and not advised, to use any forks of FPC/Lazarus to get Android support. Just use the latest original releases of FPC/Lazarus :)

2. Please provide a log, so we can see details and spot eventual problems. The strategy_game_demo uses standard CGE logging, so on Windows the logs are just in C:\Users\<user-name>\AppData\Local\strategy_game_demo\strategy_game_demo.log .

sorry ,i give up.i want to wait for castle engine 7.0 and try then.

This particular problem will unlikely disappear for you in CGE 7.0. As I said, it works for me, in all configurations. So I do not have anything actionable to fix. It will unlikely disappear by accident :) You need to help us to have it fixed.

If you want to see this fixed, as outlined above, please

1. Try "vanilla" FPC / Lazarus from https://www.lazarus-ide.org/ , as this is what we support and test extensively.

2. Provide a log that may tell us more details, in case there's something specific on your system/locale that affects this.

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
A micro library for creating games as simple as for old consoles (like NES or SNES) would come in handy %u2014 ultra light, object-oriented, using events (similar in design to the LCL component ecosystem), very easy to use. It is about basic functionality %u2014 image rendering, sprite support, sound playing, keyboard, mouse and controller support. Such a minimum.

Someday I would like to write a retro style game (something like "The Legend of Zelda: A Link to the Past") and I'll probably write something like that for Free Pascal and Windows (using OpenGL and OpenAL). But I don't know when.
Not a micro library, but my engine goal is what you say.  Still  in alpha and will change a lot before reach the beta state, but you can take a look.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

furious programming

  • Hero Member
  • *****
  • Posts: 852
Thanks @Ñuño_Martínez — good to know. When the time comes to start the project mentioned by me, I will be looking for inspiration. I will definitely create a thread to learn more from people familiar with game dev. 8)
Lazarus 3.2 with FPC 3.2.2, Windows 10 — all 64-bit

Working solo on an acrade, action/adventure game in retro style (pixelart), programming the engine and shell from scratch, using Free Pascal and SDL. Release planned in 2026.

 

TinyPortal © 2005-2018