Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - PhoenixII54

#1
Development / Re: Image/Ilustration as background?
June 25, 2023, 08:39:13 AM
*aaah, Legend of Mana...* hum hum

Yes, of course you can use full images as a background: all you need is a second set of invisible tiles that have all the basic terrain grounds, that you overlay on the desired borders. By the way, LoM actually uses tiles, but with many, many more base elements than the 2D Zelda games.

edit : while unrelated to the base question, here is the page for LoM on the Spriters resource site, especially the "background" section which is showing the maps and their different layers :https://www.spriters-resource.com/playstation/lom/
#2
Development / Re: What does this error mean?
June 04, 2023, 10:37:05 AM
The error message says that it can't find the "hero" entity.
The reason is that you never asked the engine to give it to you in the first place.

Since you intend to make  some generic behavior for the hero -hero_meta-, you should use the hero's metatable (using sol.main.get_metatable), and then define what you need here. it works the same as using the hero directly, but more like a model, so multiples heroes will get the same behavior.
If you know the concept of object-oriented programming, then think of modifying the class instead of the instances.
#3
Not sure, but what i would guess is that the on_position_changed event gets triggered the next frame after you stopped moving, so maybe try to have one extra entry in the table and use two indices: one for the current hero step and one for the
NPC that is always 2 steps behind the hero -modulo will be your friend.
By the way, OH uses a standard .solarus zip file so you should be able to check the source code
#4
Yes. In fact, the bare minimum required to start a game is : open main.lua, and in the solarus starting function, create a game object, setup starting point/HP/whatever you need at game start, and start the game. hints : sol.game.load; game:start() --> More info in the documentation page here. That's what file selection menus do, but in a more visual -and enhanced- way.
#5
I don't see any obvious mistake (maybe i would have organized the list in the style 1 entry = an {x=x,y=y} pair but that's just a coding preference) so my guess is that your movement gets overwritten each frame you move and doesn't have time to even start until you stop moving.
So what you should try to do is to detect if the follower NPC already has a movement and update it's target (if possible) instead of recreating a new one each frame, and only create it again if it it reached its actual destination when the hero has stopped moving.
#6
Hello, you can use the hero:on_position_changed() event, which is called each frame Link has moved.


-- <initialization stuff where you get the hero and NPC entities>

function hero:on_position_changed(x, y, layer)
--update your list here and move the NPC accordingly

end
#7
Development / Re: Importing images higher than 16-bit.
January 31, 2023, 09:31:50 AM
Hello,

Technically, you can use the whole 32-bit color palette for your images, and sprites size have no limitation. However, you must be aware that by default, the game uses a 16*16 pixels collision box for the hero and most entities, so if you want hi-res sprites, you'll need to use Lua scripting to change the entities' size as well as their origin point (which also defines their map coordinates). This includes their sprites too, to keep things aligned.
However, doing so is likely to cause collision bugs, so be careful to stay in multiples of 8 pixels for the collision boxes (sprites don't matter).
Tiles can also be of any size as long as they respect the 8-pixels rule (the editor forces you in this direction anyway).
#8
Development / Re: Ressource pack zelda ALTTP
September 28, 2021, 10:39:51 AM
Actually, both worlds are in sorted in across all three tilesets, organized in sections depending on their usage. Feel free to explore them and to learn how it works.

Otherwise, finding and "add[ing files] to the project" or "import[ing] from another poject" isn't that hard, and there are many turorials on how to do this.

So good luck with your project (and feel free to ask if you need help, there will alwys e someone to answer or give you hints).
#9
Your projects / Re: Minish Cap Maps in Solarus
August 05, 2021, 11:08:46 PM
The max number of loadable map elements is purely Lua interpreter limit (confirmed by running the big map through Zerobrane), so unless the team writes a manual map loader from scratch (which is unlikely, as there is not a large demand as the time of writing, bsically there are only you and Adrian, as well as the one who wanted to remake Zelda II, though i can't remember how he manages the map(s?), who make "mega maps" ), or Lua gets more constants memory size in its VM (again, unlikely i fear), you'll have to take that hard limit in account.

That said, in your case, the overworld map of Minish cap is small enough to not be an issue, if i refer to your stats, especially since you will have many tiles larger than just 16*16, which inherently reduces the elts count, so... go! Go! GOOOOOO!
#10
Your projects / Re: Minish Cap Maps in Solarus
August 04, 2021, 09:22:15 AM
Just a quick warning: big maps can not have more than 65534 elements (tiles and entities) on it (+the base properties, that makes 65535) due to Lua interpreting each entry as a constant (someone had the case on Discord and i had to spit the files into two smaller parts for him to be able to open them again). So be careful, make regular backups (and prefer making muliple smaller maps while still possible).

Otherwise, good luck with your repro, can't wait to see the final result!
#11
Your projects / Re: Quest Log Menu
January 26, 2021, 09:32:02 AM
Or maybe we can consider completed full libraries that got in actual finished games as actual projects?  :P ::)
#12
Your projects / Re: Quest Log Menu
January 24, 2021, 10:02:58 AM
Question: wouldn't it be better to put this in the "Your scripts" section instead :-\ ? Because i think this one is for actual games/softwares

Anyway, thanks for your effort in having contributed to the very first commercial project on Solarus :D
#13
Development / Re: Side scrolling functionality
January 18, 2021, 10:14:30 AM
[Sorry for the necropost but since this thread has been mentioned on the Discord, i wanted to make an update before it goes forgotten under tons of Discord messages]

Some of you may already know but i actually tackled on rewriting the sidecrolller system for a Zelda: Links Awakening remake (ALTTD - A Link to the Dream).
As of today (2021, january 18th), the script is stable enough to be used in another project (in fact, someone did test to do it with success). You can find it here: https://gitlab.com/zeldaforce/zelda-alttd/-/blob/dev/data/scripts/maps/sideview_manager.lua.

This is still in development, though, since the internals are quite a hack, especially the sprite and hero movement  management, so i am in the process of using custom states instead. (it is already written in a separate branch, but it broke the ladder-top detection).
Also, the system works badly when you try to walk down slopes, (unfortunately, i don't have any idea how to handle this, maybe you can help me somehow ?), but this is a low-priority for now since the main project it is used on has none.

Prerequisites:
- Since it overwrites some of the metas, you will have to use a script that does allow multiples occurences of the same event (the multi_events.lua, which is required by the script, see header for more information), and never use the direct call to hero:on_position_changed, game:on_map_changed and hero:on_state_changed, since they are the triggers to launch the multiple timers used to update the Y-positions of the affected entities and the movement/commands handling for the hero.
- You will also need scripts/states/sideview_swim.lua, found in the same repository, and the following additional animations for the hero:
swimming_scroll
stopped_swimming_scroll
lifting_heavy
swimming_scroll_loading (+sword_loading_swimming_scroll for the sword sprite)
climbing_walking
climbing_stopped


Remarks:
- To make entities jump, just set your_entity.vspeed to a negative value.
- Being a fan project, the remake may be taken down at any point, so if the links get broken, then i will attach the script here instead.
#14
I think (s)he refers to maps with generic premade structures, which you can copy/paste then resize to your own needs. These maps are sometimes referred to as "store" for obvious reasons.
#15
FYI: ALTTP uses 1024*1024 regions, which can be divided into 2 to 4 subregions, horizontally, vertically or both.