Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Morgana retro Dungeon Crawler (uses Tilengine)
#11
Hi there and happy new year 2020 Tongue  We posted another promotional screenshot for the game.

[Image: promo3-corrected.png]

Morgana facebook page: https://www.facebook.com/morganadungeoncrawler

Flavour text:

The way forwards is blocked by the eerie, chilling specters of the Katsushika sisters. The apparitions, Ōi and Tatsujo, unable to let go of their past, wander the maddening haunted manor. Will Morgana and her companions try and help them? Figuring it out is up to you. Art & art direction: Mrmo Tarius (http://pixeljoint.com/p/7846.htm).
Reply
#12
Megamarc, I tried to contact you via PM in Facebook Tilengine page but you didn't saw it, please could you check that?
Reply
#13
Sorry! I don't usually check Facebook for messages. Now I see you were writing there.
Reply
#14
(01-09-2020, 02:40 AM)megamarc Wrote: Sorry! I don't usually check Facebook for messages. Now I see you were writing there.

Hi! I saw you disabled Tilengine's fbook account and that made me sad Sad That's a pity, I know fbook can be somewhat intrusive with its suggestions of ads and promotion (I experience this in my own Morgana's facebook page), but please I would encourage you to reconsider reopening facebook page as it is a good platform to make the engine known to the people (I first learnt of Tilengine through facebook, without it I probably never would have used Tilengine for Morgana). Of course, do what you feel more comfortable with, we can ask questions as well in the forums too, of course.

That being said, I was gonna ask if there is a way to specify different frame durations in the animations, as a blinking character stays still for a while and then blinks fast in two frames. So it would be better to specify a long duration of the first frame and then short durations of the other two, instead of copying the first frame several times to make up for its longer time.

Just a suggestion.

Best regards!
Reply
#15
Hi Jaume!

I appreciate your thoughts about Facebook. I may consider it.

Regarding sequences: yes, the sprite sequence supports individual delays for each frame. It's not supported on the .sqx resource file (a leftover from when sequences had fixed delay between frames). But in release 1.14.0 I introduced the ability to create variable delay animations at runtime, using the C API.

Go http://www.tilengine.org/doc/group__sequence.html and check TLN_CreateSequence() and structure TLN_SequenceFrame. With them you can define your animations in source code.

Let me know if you need some small example on how to use it
Reply
#16
Thank you very much, it works! Biggrin

Code:
if(companion2==madwitch){
     carregar_portrait("madwitch_anim",x_slot_portrait1,y_slot_portrait2,2); 

     TLN_SequenceFrame frames[3];
     frames[0].index=0;
     frames[0].delay=400;

     frames[1].index=1;
     frames[1].delay=30;

     frames[2].index=2;
     frames[2].delay=16;

     TLN_Sequence sequence=TLN_CreateSequence("madwitch_anim",0,3,frames); 
     TLN_SetSpriteAnimation(id_anima_madwitch,id_portrait_companion2,sequence,0); // 0 == loop infinite times
}

Only thing that puzzles me is the delay time magnitude. It would be better to be stated it the documentation of TLN_SequenceFrame. I assumed it was miliseconds, but it doesn't seem to match the miliseconds of Aseprite that the artist gave me.

Nevertheless I played with the values until I found something nice, and it works as stated, a long duration for the first still frame, and a short duration for the two blinking frames.

Thanks!
Reply
#17
Ah, another question!

We recently added a compass to the GUI, and instead of pointing instantly to the four cardinal points one idea is making the arrow rotate slowly or inaccurately similar to Lands of Lore 1 compass:



Artist asked me for in-engine rotation, I checked sprites documentation and I see it not there. Maybe this can be a suggestion for another release, altough it may be complex to implement and of little usage for this project in particular. Nevertheless I think Lands of Lore 1 uses separate sprites or frames for the compass arrow animation, since the arrow shadow points in diferent directions when rotating.

Ah! I found it! But in the layers, rotating the whole layer, like in mode7, not for individual sprites:

TLN_SetLayerTransform (int layer, float angle, float dx, float dy, float sx, float sy)
Sets affine transform matrix to enable rotating and scaling of this layer. More...

I think I may try it using animations frame by frame to better control the easing
Reply
#18
(easing is this, for readers that may not know about it: )

Reply
#19
I'm glad it worked Smile

Yes, timing units is somewhat inconsistent. A bit of history: at first I intended timing to be units agnostic. You just had to match the units in TLN_DrawFrame() call, with the units in the sequence description. But then I added the ability load sequences embedded in Tiled tilemap's tsx files, that are expressed in milliseconds, and internally convert them to frames assuming a rate of 60 fps. This allowed me to load these sequences easily, but that's not always right.
  • Working in frames has the advantage that they're deterministic, all frames have same duration and equally spaced, but the speed depends on refresh rate
  • Working in absolute time (milliseconds) has the advantage that speed doesn't depend on refresh rate, but the resulting animation can have some jitter, as there isn't an integer relationship between milliseconds and frames.
Classic systems worked with fixed rate displays (TVs or arcade monitors) usually at 60 Hz (or 50 Hz in Europe), so frame units were the standard because they're more predictable. Even today 60 Hz is the standard frame rate. That's why I tend to use frames in Tilengine too.

For your animations, for converting milliseconds to frames:

frame = milliseconds*60/1000;
Reply
#20
Regarding sprite rotation: this feature has been long time in my to-do list, is something I'd like to implement some day. But as you guess, having it on an environment where you can change rendering attributes at each scanline, keeping good performance, is no easy task at all. In fact, no classic 2D hardware had sprite rotation.

Common approach is to have pre-drawn frames at different angles of rotation, and draw the closest one.
Reply


Forum Jump:


Users browsing this thread: 12 Guest(s)