# 2d dragon missing?

**URL:** https://forum.castle-engine.io/t/2d-dragon-missing/314
**Category:** Uncategorized
**Created:** [March 29, 2021, 9:48am UTC](https://forum.castle-engine.io/t/2d-dragon-missing/314 "2021-03-29T09:48:35Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![valterb](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/valterb/32/26_2.png) [@valterb](https://forum.castle-engine.io/u/valterb)
#### Post date: [March 29, 2021, 9:48am UTC](https://forum.castle-engine.io/t/2d-dragon-missing/314/1 "2021-03-29T09:48:35Z")

</div>

Hello,  
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.

---

<div class="post-metadata">

### Author: ![eugeneloza](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/eugeneloza/32/12_2.png) [@eugeneloza](https://forum.castle-engine.io/u/eugeneloza)
#### Post date: [April 3, 2021, 11:09am UTC](https://forum.castle-engine.io/t/2d-dragon-missing/314/2 "2021-04-03T11:09:05Z")

</div>

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

> [@valterb](#):
>
> Is there a reason why 2D dragon spine game was removed from the examples folder?

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`.

> [@valterb](#):
>
> Another question: is the current version 7.0? During compilation, packages are defined as 6.5.

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

---

<div class="post-metadata">

### Author: ![valterb](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/valterb/32/26_2.png) [@valterb](https://forum.castle-engine.io/u/valterb)
#### Post date: [April 3, 2021, 12:24pm UTC](https://forum.castle-engine.io/t/2d-dragon-missing/314/3 "2021-04-03T12:24:25Z")

</div>

@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?

> [@Problems using the #fps parameter with a starling-xml file](https://forum.castle-engine.io/t/problems-using-the-fps-parameter-with-a-starling-xml-file/318):
>
> I use: MyAnim.Load(MyStarlingXml+'#fps:30,anim-naming:strict-underscore') (or even URL) to open a spritesheet. Any parameter I insert after #fps does not change the number of frames which always remains the default (8). Maybe I’m wrong but I don’t think it’s needed to disable DefaultSpriteSheetFramesPerSecond. Only TimePlayingSpeed works with which I can change the speed of the animation but always starting from 8 frames / sec. I tried to launch the animation both with PlayAnimation and by …

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

---

<div class="post-metadata">

### Author: ![eugeneloza](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/eugeneloza/32/12_2.png) [@eugeneloza](https://forum.castle-engine.io/u/eugeneloza)
#### Post date: [April 3, 2021, 2:35pm UTC](https://forum.castle-engine.io/t/2d-dragon-missing/314/4 "2021-04-03T14:35:50Z")

</div>

> [@valterb](#):
>
> Do you know if there are problems in setting the number of frames / sec through the #fps parameter using TCastleControlBase?

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).

---

<div class="post-metadata">

### Author: ![Carring](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/carring/32/1950_2.png) [@Carring](https://forum.castle-engine.io/u/Carring)
#### Post date: [April 3, 2021, 3:43pm UTC](https://forum.castle-engine.io/t/2d-dragon-missing/314/5 "2021-04-03T15:43:01Z")

</div>

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.  
😉

---

<div class="post-metadata">

### Author: ![eugeneloza](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/eugeneloza/32/12_2.png) [@eugeneloza](https://forum.castle-engine.io/u/eugeneloza)
#### Post date: [April 3, 2021, 6:32pm UTC](https://forum.castle-engine.io/t/2d-dragon-missing/314/6 "2021-04-03T18:32:29Z")

</div>

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 🙂

---

<div class="post-metadata">

### Author: ![Carring](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/carring/32/1950_2.png) [@Carring](https://forum.castle-engine.io/u/Carring)
#### Post date: [April 3, 2021, 6:38pm UTC](https://forum.castle-engine.io/t/2d-dragon-missing/314/7 "2021-04-03T18:38:16Z")

</div>

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).

---

<div class="post-metadata">

### Author: ![eugeneloza](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/eugeneloza/32/12_2.png) [@eugeneloza](https://forum.castle-engine.io/u/eugeneloza)
#### Post date: [April 3, 2021, 7:09pm UTC](https://forum.castle-engine.io/t/2d-dragon-missing/314/8 "2021-04-03T19:09:26Z")

</div>

> [@Carring](#):
>
> Maybe you can give him a call?

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.

---

<div class="post-metadata">

### Author: ![Carring](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/carring/32/1950_2.png) [@Carring](https://forum.castle-engine.io/u/Carring)
#### Post date: [April 4, 2021, 5:10pm UTC](https://forum.castle-engine.io/t/2d-dragon-missing/314/9 "2021-04-04T17:10:39Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![eugeneloza](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/eugeneloza/32/12_2.png) [@eugeneloza](https://forum.castle-engine.io/u/eugeneloza)
#### Post date: [April 5, 2021, 8:26am UTC](https://forum.castle-engine.io/t/2d-dragon-missing/314/10 "2021-04-05T08:26:26Z")

</div>

Let’s to to the specific topic: [Screen coordinates](https://forum.castle-engine.io/t/screen-coordinates/312)

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

---

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [April 7, 2021, 11:20pm UTC](https://forum.castle-engine.io/t/2d-dragon-missing/314/11 "2021-04-07T23:20:06Z")

</div>

@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 🙂

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](https://github.com/castle-engine/castle-engine/tree/master/examples/mobile/achievements) .

This move was briefly mentioned in new post [Docker image, Android upgrades, Aarch64 optimizations, FMOD on Android – Castle Game Engine](https://castle-engine.io/wp/2021/04/03/docker-image-android-upgrades-aarch64-optimizations-fmod-on-android/) (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](https://trello.com/c/vLWwqHor/145-package-version-is-still-65) .

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 🙂 For now see docs on [Sprite sheets · castle-engine/castle-engine Wiki · GitHub](https://github.com/castle-engine/castle-engine/wiki/Sprite-sheets) and short example in `examples/sprite_sheets/sprite_sheets_demo/`.

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