Author Topic: Dev Journal  (Read 2954 times)

0 Members and 1 Guest are viewing this topic.

Offline RavenNine

  • Moderator
  • Posts: 50
    • View Profile
Dev Journal
« on: January 27, 2022, 01:50:22 PM »
After spending time cleaning up a lot of things on the last release, I can now focus on the skills. I have been implementing the most recent physics research for air collision to correct issues with velocity reflection. Velocity is now correctly reflected on the X axis, and nullified when a Lemming bumps his head. Fall/Dazed distances are now accounted for correctly which produces matching DOSBox results from levels I have tested so far.

The next step is to focus on skills needed to complete the Beach levels. Some of the skills are fairly straight forward, others need multiple parts such as the grappling hook.

A preview of the latest physics changes;

https://youtu.be/kIRNwvm3iIw

Offline Simon

  • Administrator
  • Posts: 3387
    • View Profile
    • Lix
Re: Dev Journal
« Reply #1 on: January 28, 2022, 07:51:55 PM »
The L2Player fling arc looks true to L2. In particular, explosions pull upwards the lemmings below the explosion, which doesn't make any sense physically, but L2 does it, too. Satisfying to watch.

L2Player can have lemmings flying backward, e.g., left-facers flung rightwards will continue to face left. L2 would turn these at fling-time, and lemmings would always fly facing forward.

Your exploder crater is the L1 crater. L2 has this only in Classic. All other tribes have the round crater. I don't know what L2 does under the hood, maybe it has 2 different exploder skills, or maybe the tribe affects the physics.

Touching walls or ceiling during flinging, I have no feeling for that in L2. Thus, L2Player's wall/ceiling collisions look good to me but I can't tell for sure. :D

-- Simon
« Last Edit: January 28, 2022, 07:58:51 PM by Simon »

Offline RavenNine

  • Moderator
  • Posts: 50
    • View Profile
Re: Dev Journal
« Reply #2 on: January 29, 2022, 12:43:37 PM »
Thanks Simon. The facing direction was a bug, I was setting the lemming direction to -1 for negative and positive X velocities. oops.

Good catch on the explosion mask :) I have now changed it so the Classic style uses the L1 mask and other styles use the L2 mask.

Offline RavenNine

  • Moderator
  • Posts: 50
    • View Profile
Re: Dev Journal
« Reply #3 on: April 18, 2022, 11:59:02 PM »
Had a go at implementing the more complex trap types. A constant damage trap with a Windup, Damage and Winddown phase. The damage phase loops a segment of the main animation. The start and end frames are specified in the style object data.

See gif (Click images to animate)

Offline RavenNine

  • Moderator
  • Posts: 50
    • View Profile
Re: Dev Journal
« Reply #4 on: April 20, 2022, 09:19:23 PM »
UI and menu framework now completed. Previously the menus where very rough around the edges just to get them working. Now it has a much cleaner set of classes and helpers to make menu screen and widget management much easier. There is now a keyframe animation system with frame events ready for recreating the Intro/Ending screens (On hold for now). I now have the Map & Practice menus implemented and a test scanline output mode for the blitter.

As for skills, Super Lemming, Exploder and Bomber skills are now fully working.

Back to working on some more Lemming skills :)

Menu Preview Video: https://youtu.be/KDeblKYyLeA

Offline RavenNine

  • Moderator
  • Posts: 50
    • View Profile
Re: Dev Journal
« Reply #5 on: April 24, 2022, 01:34:39 AM »
I got around to adding basic mod support. Currently importing DOS level packs is implemented.

When you import a level pack, you offer a path to your DOS levels and provide a mod name. This creates a new mod within the data directory containing the converted levels.

When starting L2Player, you can provide a cmd argument with the mod name. This will cause L2Player to use the levels in that mod instead.

For testing I used the excellent Tribes of Steel level pack by Ste Woz Ere - https://www.lemmingsforums.net/index.php?topic=5664.0

Video preview of this in action: https://youtu.be/8cm0gDq4dvQ

Offline RavenNine

  • Moderator
  • Posts: 50
    • View Profile
Re: Dev Journal
« Reply #6 on: April 24, 2022, 11:26:52 PM »
As an extension to mod support. The basic level editor is now up and running. Just in the process of adding the tile/object pallet and the edit tools.

The primary motivation for the Editor this early, is so I can create test maps for validating skill / level object behaviour.

Both the Editor and Player use the same code base which means the Editor allows you to rapidly flip between Edit and Play mode without having to save or launch L2Player. This means that editing and testing has a tight iteration loop.

I have also implemented a transparent file system wrapper so that mods can replace all aspects of what is in the base cache without actually touching the base game data. All graphics are in .png format for easy manipulation. Graphics which are part of a sprite sheet and have an accompanying .spt file will get a dedicated tool in the future for unpacking/packing sprites and specifying animation frames.

This means for e.g. You place a copy of menu_0.png from data/cache/ui/screens in data/mods/yourmodname/ui/screens, it will be used in place of the original title screen.

Quick early preview of Editor: https://youtu.be/9vRA5pQoZu8 (Again using the Tribes of Steel level pack - Thanks Ste Woz Ere :thumbsup:)

Offline RavenNine

  • Moderator
  • Posts: 50
    • View Profile
Re: Dev Journal
« Reply #7 on: May 01, 2022, 03:37:39 AM »
Basic map editor functionality is now working. Painting tiles and placing objects.

Currently arranging sprite sheets and setting animation properties / testing is slow and manual. Especially for the vlemms sprite sheet which contains every Lemming animation. As part of testing skills I need to define animation segments and their properties frequently.

To speed this up I added an Export/Import workflow in the Editor for Aseprite. I have used this tool a lot over the years and it has a well documented file format.

I have added full Load/Save support for the .aseprite file format rather than using JSON or scripts. This allows a more streamlined workflow without additional import/export steps. Any additional animation properties are stored in the UserData field per FrameTag.

As a bonus, this will make style mods more accessible going forward.

Offline mobius

  • Posts: 2616
  • relax.
    • View Profile
Re: Dev Journal
« Reply #8 on: July 29, 2022, 11:34:53 PM »
First of all: thanks so much for doing this! It looks like it's coming along great so far!!

I'm not alowed to post to the topic on the test release so I'll ask here:

So I need to run this program within DOS Box? or is it supposed to run alone? Is it compatible with DOS Launcher?
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline RavenNine

  • Moderator
  • Posts: 50
    • View Profile
Re: Dev Journal
« Reply #9 on: September 29, 2022, 08:13:37 PM »
Hi Mobius, sorry for the late reply.

L2Player is designed to be a drop-in replacement for DOSBox.

So if you have a directory with DOSBox and the Lemmings 2 for DOS files within it, you would place L2Player at the same level as the DOSBox executable.

When you run L2Player, it should discover the DOS data files and take care of the rest.