2d dragon missing?

a simple curiosity.
In the downloadable version from the download page of the site the Dragon folder is available but inside there are only two files without extension. In the version downloaded from GitHub the folder is no longer available.
Is there a reason why 2D dragon spine game was removed from the examples folder?

Another question: is the current version 7.0? During compilation, packages are defined as 6.5.

Sorry for late answer… somehow I didn’t get any notifications on forum posts…

It’s still there - just tested with the very latest GIT version. It might have been renamed - the version I tried was in examples\mobile\achievements.

Current version is 7.0-alpha. The packages displayed version were not yet updated.

@eugeneloza Yes, you are right, it has been moved.
I would like to take advantage of your answer to ask you a very important clarification for me as I am writing a utility for managing spritesheets with the new starling-xml format and I cannot proceed.
Do you know if there are problems in setting the number of frames / sec through the #fps parameter using TCastleControlBase?
I looked everywhere, online manual, wiki, API. Maybe something undocumented?
Whatever value I enter the number of frames is constantly the default (8). I am going crazy.
I posted a question with a very simple example. Do you have time to check it out?

Maybe it can’t work under Lazarus and I’m wasting a lot of time looking for an answer that doesn’t exist.

Unfortunately I didn’t investigate the new sprite handling method. Hopefully someone more experienced than me might give the answer (I saw your message both in a previous topic and on Discord).

Hi Eugene,

Michalis must be very busy as he has not answered any questions in almost 2 weeks.
Valterb and I need some help with the new Sprite system.

I believe that something is broken with Forum’s notification system or it’s delivery to gmail mailboxes. I didn’t receive a single notification since 10 March. Maybe @michalis also fell victim of this bug :slight_smile:

Could be.
Maybe you can give him a call?
Or can you help me with the collission issue and coordinate settings on a viewport? (see topics).

Yeah, I pinged him about the problem on Discord.

Unfortunately I’ve never really worked with collisions or physics, except for a few not very successful tests (i.e. in the end I had to ask for help myself :)).

About coordinate system origin - I’ve never been solving this task myself either. Overall, the idea is that it’s reasonable to have center of the scene in the center of the screen - having in mind scaling of everything to different screen resolutions. It is clearly possible to do, but it’ll require to do some math for converting screen coordinates to scene coordinates. This is perfectly doable (and in your situation is should go down to Scene.Translation := Vector3(SceneWidth / 2 - ScreenWidth / 2, SceneHeight / 2 - ScreenHeight / 2, 0);), but I’m not exactly sure how it will behave in different screen resolutions, so it’d be best if someone who knows more about this specific feature would answer.

Thanks. Working on it.

I want to position a mouse image (TCastleScene) on the same coordinates as the system mouse.

Mouse.Translation := vector3(Window.MousePosition.X - Window.Width/2, Window.MousePosition.Y - Window.Height/2, 1);

This is not quite right; in the center of the screen it is close but if I move it to the corners of the screen they drift apart.

Let’s to to the specific topic: Screen coordinates

I have some free time today, I’ll experiment with coordinates conversion in a few minutes.

@eugeneloza @valterb @Carring Indeed the forum email notifications are not working for some time (around 3 weeks now I think). I’ll work on getting them back as soon as possible. Sorry for lack of answers lately – I’ll catch up with forum threads soon. In the meantime I see @eugeneloza answered most things :slight_smile:

The dragon example has indeed moved to examples/mobile/achievements/ . It was also reworked a lot compared to the old examples/2d_dragon_spine_game, to use glTF for background (instead of X3D), and CGE editor for UI designs. It is in practice now very very similar to the “2D game” template, the examples/mobile/achievements/ just adds sample code to handle achievements, see README in castle-engine/examples/mobile/achievements at master · castle-engine/castle-engine · GitHub .

This move was briefly mentioned in new post Docker image, Android upgrades, Aarch64 optimizations, FMOD on Android – Castle Game Engine (point 4).

As for the LPK having version 6.5: This is known and unfortunately not avoidable. I mean it will be fixed once we release 7.0 release (not alpha), then LPK will just say “version 7.0” then. But in the meantime, there seems to be no way to say in LPK "this is version 7.0-alpha1 or 7.0-alpha.snapshot". See also Trello .

Note that every other place in CGE correctly claims to be version 7.0-alpha.snapshot, e.g. CastleEngineVersion constant in CastleUtils unit.

@valterb As for FPS in URL, this was later resolved on Discord I see. In short: use URLs for everything.

But since yesterday, we actually have even better answer: use .castle-sprite-sheet format instead of Starling, that can be created/edited within the CGE editor itself. Then the FPS can be configured inside the sprite sheet file, and it can even be different for each animation. This avoids using the #fps... anchor at all.

There will be a big news post about it this weekend :slight_smile: For now see docs on Sprite sheets · castle-engine/castle-engine Wiki · GitHub and short example in examples/sprite_sheets/sprite_sheets_demo/.

@Carring For the screen coordinates, I’ll answer in a thread for it :slight_smile: We have a dedicated method that should make it easy for you :slight_smile: