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.


Messages - Blueblue3D

Pages: [1]
1
Development / Re: How to configure game window
« on: July 20, 2019, 08:16:16 pm »
Thank you very much for all the help! I finally got the code to work, in particular by following Kamigousu's suggestion for registering it to when the map changes.

For the reference of anyone reading this, this is in a file I called "camera_settings.lua" which I required in the main.

Code: [Select]
require("scripts/multi_events")  --This is required for this script to work. It allows the script to be called on its own.

local game_meta = sol.main.get_metatable("game")

local function set_camera(game)
  if game ~= nil then
    if game:get_map() ~= nil then
      local map = game:get_map() 
      local camera = map:get_camera()
      camera:set_size(256, 160)
      --camera:set_position_on_screen(0, 16)
    end
  end
end

game_meta:register_event("on_map_changed", set_camera)


I've also been adding HUD elements to more closely match Golden Axe, and here's a screenshot of how it's looking now:
https://imgur.com/a/PDMVz2m

Thanks again for all the help.

2
Development / Re: How to configure game window
« on: July 19, 2019, 05:41:49 pm »
I tried to implement that script, but Solarus told me it couldn't get the camera because map was a nil value. I'm not totally sure, but I think that when the game is first started, the map has not been set yet, so it's nil. Then later the map gets set and then the map gets started.

I've been studying up on the Solarus documentation a bit, and I thought to perhaps try something like the following code, where I add these camera settings to the on_started() of every map.

Code: [Select]
require("scripts/multi_events")  --This is required for this script to work. It allows the script to be called on its own.
print("Hello")  --Used for testing
local map_meta = sol.main.get_metatable("map")
map_meta:register_event("on started", function()
  camera = self.get_camera()
  camera:set_size(256, 160)
  camera:set_position_on_screen(0, 16)
  print("World")   --Used for testing
end)

This code is in a script called "camera_settings" which I have required in my main.
Unfortunately this is not working either. I'll get "Hello" but no "World," and the camera is not changed. So it would seem that it's not actually registering this function into the on_started() for my maps. Perhaps this is not a great way to do things either, but I don't quite understand what isn't working here.
I followed this code as a guide from the API for sol.main.get_metatable(type):

Code: [Select]
-- Somewhere in your main script, at initialization time:

local map_metatable = sol.main.get_metatable("map")
function map_metatable:add_overlay(image_file_name)
  -- Here, self is the map.
  self.overlay = sol.surface.create(image_file_name)
end

function map_metatable:on_draw(dst_surface)
  if self.overlay ~= nil then
    self.overlay:draw(dst_surface)
  end
end

-- Now, all your maps will have a function map:add_overlay() and an event
-- map:on_draw() that allows to draw an additional image above the map!

3
Development / Re: How to configure game window
« on: July 17, 2019, 02:37:09 am »
Thanks for the reply. I've been fiddling for a while but I'm having trouble understand how Solarus organizes scripts. If I want to put a camera:set_size() call in game:on_started(), what script file would I put it in? Or would I make a new script?

4
Development / How to configure game window
« on: July 16, 2019, 09:14:06 pm »
Hello, I'm trying to do a Solarus recreation of Golden Axe Warrior on the Sega Master System, a Zelda clone that has since been considered a hidden gem of the system.
I am trying to adjust various aspects of the display such that it closely resembles the setup of the original game. You can see my project in Solarus and a screenshot of the original game at the imgur link on the bottom.
In the original game, the map only takes up part of the screen, and the rest of the screen is colored black. I would like to replicate this if possible. What scripts or files should I edit to achieve this?

https://imgur.com/a/bGcLKX6

5
Game art & music / Re: Oracle of Seasons Tileset
« on: July 04, 2019, 08:01:08 pm »
That's really cool. I've been exploring the Solarus community and I keep thinking that it needs more resource packs. I've been working on putting together some Secret of Mana resources in my free time, but progress is slow. I'd be interested to help with this if you want to expand it to a more complete resource pack - I could help with adding NPCs, for instance.

6
That’s good to know. In that case it seems like Secret ot Mana is a really good choice. I think I’ll keep working on some tilesets and update things on the forum as it comes. I’ve also started the outside of Potos. The animated water tiles make it a bit more complicated.

7
So I started looking into things with Secret of Mana and I started some graphic rips. I started on the house tileset since it seems to have fewer animated things than the outside of Potos. I used a map from vgmaps. It's disorganized, nowhere near an actual tileset, but it's a start.
One problem I see is that it seems tile animations in Secret of Mana are 6 frames, while Solarus exclusively uses 3 frame animations. Is there any way around this? I haven't bothered to add the rest of the frames of animation to tiles like the candle and stove because of this, and also because I'll have to go into the emulator and fiddle a bit to get them.

8
Those seem like good choices. I never played Secret of Mana but I really should.

9
I’m interested in contributing the community and I think it would be cool to (over a period of time) create a new resource pack for Solarus based on a game other than A Link to the Past. I’m not sure what game might be a good choice, though, so I’d like to hear what people might suggest. Obvious choices are other Zelda games, but I think it would be more interesting for me personally to move outside of the Zelda sphere. Such a game would of course need to have similar gameplay to a Zelda top-down game, but it should also be a game that people would be interested in making fan games out of.

Pages: [1]