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 - Max

Pages: [1] 2 3 ... 9
1
If you learn best by doing, download maybe the Zelda resource pack or the open source one (not sure how complete that is) and try making something like the intro pre-dungeons that Zelda has (Link to the Past's sewers, for example). Get the code to someone else's game (if they're on this forum, they'll probably help you understand it for references so you can learn stuff like making doors that open when you kill enemies, how switches and timers work, etc.

That's how I'd start, at least. And any specific questions you have, just ask on here, somebody usually can help you pretty quickly. Welcome to the forum : D

2
Development / Re: Enemies slowing down as they take damage?
« on: July 19, 2018, 08:27:47 am »
That worked! Thanks, Christopho. I'll post the code for anyone interested in an enemy that runs away from you, and/or teleports via explosions. The only problem is that they hardcore get stuck in corners, even sloped corners. I'll have to figure out a workaround for this. Maybe once I have him tossing bombs at the hero, the dodging you'd have to do to avoid damage would cause the hero to move in such a way that he wouldn't get stuck, but I don't know.

Code: Lua
  1. local enemy = ...
  2. local game = enemy:get_game()
  3. local map = enemy:get_map()
  4. local hero = map:get_hero()
  5. local sprite
  6. local teleporting = false
  7. local can_teleport = true
  8. local teleport_frequency = 10000
  9.  
  10. function enemy:on_created()
  11.   sprite = enemy:create_sprite("enemies/" .. enemy:get_breed())
  12.   enemy:set_life(100)
  13.   enemy:set_damage(1)
  14.   enemy:set_attack_consequence("explosion", "protected")
  15.   enemy:set_hurt_style("boss")
  16. end
  17.  
  18. function enemy:on_restarted()
  19.   enemy:check_hero()
  20. end
  21.  
  22. function enemy:on_movement_changed(movement)
  23.   local direction4 = movement:get_direction4()
  24.   local sprite = self:get_sprite()
  25.   sprite:set_direction(direction4)
  26. end
  27.  
  28. function enemy:check_hero()
  29.   --teleport
  30.   if enemy:get_distance(hero) < 75 and can_teleport == true then enemy:teleport() end --the boss teleports if you get too close
  31.  
  32.   if not teleporting then --teleporting has a movement and we don't want the movements to conflict
  33.     local hero_angle = enemy:get_angle(hero) --gets angle toward hero
  34.     local mov_angle = hero_angle + math.pi --the angle opposite of the hero
  35.     enemy:stop_movement()
  36.     local m = sol.movement.create("straight")
  37.     m:set_angle(mov_angle)
  38.     m:set_speed(80)
  39.     m:set_max_distance(0)
  40.     m:set_smooth(true)
  41.     m:start(enemy)
  42.   end
  43.   sol.timer.start(enemy, 100, function() enemy:check_hero() end)
  44. end
  45.  
  46. function enemy:teleport()
  47.   enemy:set_attack_consequence("sword", "protected") --while he's preparing to teleport, he's invincible
  48.   enemy:set_attack_consequence("arrow", "protected")
  49.   teleporting = true
  50.   can_teleport = false --we don't want him to teleport again right away
  51.   sol.timer.start(map, teleport_frequency, function() can_teleport = true end) --when he can teleport again (in 10 seconds)
  52.   enemy:stop_movement()
  53.   sprite:set_animation("teleport_charge", function()
  54.     local x, y, layer = enemy:get_position()
  55.     map:create_explosion({ x = x, y = y, layer = layer})
  56.     sol.audio.play_sound("explosion")
  57.     sprite:set_animation("teleporting")
  58.     local t = sol.movement.create("straight")
  59.     local telang = enemy:get_angle(480, 240)
  60.     t:set_angle(telang)
  61.     t:set_speed(200)
  62.     t:set_smooth()
  63.     t:set_max_distance(180)
  64.     t:start(enemy)
  65.     sol.timer.start(enemy, 1500, function()
  66.       x, y, layer = enemy:get_position()
  67.       map:create_explosion({ x = x, y = y, layer = layer})
  68.       sol.audio.play_sound("explosion")
  69.       enemy:set_attack_consequence("sword", 1)
  70.       enemy:set_attack_consequence("arrow", 1)
  71.       sprite:set_animation("walking")
  72.       enemy:check_hero()
  73.       teleporting = false
  74.     end) --end of after teleporting timer
  75.  
  76.   end) --end of after charging animation
  77. end
  78.  
  79.  

3
General discussion / Re: Free Pixel Art Making Programs
« on: July 19, 2018, 05:38:13 am »
Zefk, I do the exact same thing. But you have to admit, it's not great to export the entire image, set up the animations, then have to re-export the image for every change. It'd be a lot easier to view animations in the app your animating in.

4
General discussion / Re: Free Pixel Art Making Programs
« on: July 19, 2018, 02:30:21 am »
I know there's a way to set up Photoshop for pixel art, you might try looking up if there are settings for that. I've seen enty of pixel art done in Photoshop.

But if you can't get that set up, you might try GIMP.  It's not the best tool for pixel art, especially animating, and it doesn't have the tools designed specifically for pixel art. But if you're familiar with Photoshop it should come naturally, many options are in the same places and the basic workflow is the same.


5
Development / Re: Enemies slowing down as they take damage?
« on: July 18, 2018, 11:03:54 pm »
Oh, duh! Thanks, I totally forgot about context. I'll try that as soon as I get home.

6
Development / Enemies slowing down as they take damage?
« on: July 18, 2018, 08:01:22 pm »
So, I'm designing a boss who basically runs away from the hero, but I have a really weird problem. Every time he takes damage, he gets a bit slower until he stops moving altogether.

Here's the part of the script that controls his movement:

Code: Lua
  1. function enemy:check_hero()
  2.   --teleport
  3. --  if enemy:get_distance(hero) < 75 and can_teleport == true then enemy:teleport() end --the boss teleports if you get too close
  4.  
  5.   if not teleporting then --teleporting has a movement and we don't want the movements to conflict
  6.     local hero_angle = enemy:get_angle(hero) --gets angle toward hero
  7.     local mov_angle = hero_angle + math.pi --the angle opposite of the hero
  8.     enemy:stop_movement()
  9.     local m = sol.movement.create("straight")
  10.     m:set_angle(mov_angle)
  11.     m:set_speed(80)
  12.     m:set_max_distance(0)
  13.     m:set_smooth(true)
  14.     m:start(enemy)
  15.   end
  16.   sol.timer.start(100, function() enemy:check_hero() end)
  17. end
  18.  

I figure that has got to be that part of the script that's causing the slowdown, but I can post the whole thing at the bottom of this post. Anyway, anybody have any idea what might be causing this? In the mean time, I'm going to try using some movement other than straight and see if that helps things.

UPDATE: it does not help things. Here's what I changed the movement to:

Code: Lua
  1. function enemy:check_hero()
  2.   --teleport
  3. --  if enemy:get_distance(hero) < 75 and can_teleport == true then enemy:teleport() end --the boss teleports if you get too close
  4.  
  5.   if not teleporting then --teleporting has a movement and we don't want the movements to conflict
  6.     local dir_hero = enemy:get_direction8_to(hero)
  7.     dir_hero = (dir_hero + 4) if dir_hero > 7 then dir_hero = dir_hero - 8 end
  8.     enemy:stop_movement()
  9.     local m = sol.movement.create("path")
  10.     m:set_path({dir_hero})
  11.     m:set_loop()
  12.     m:set_speed(75)
  13.     m:start(enemy)
  14.  
  15.   end
  16.   sol.timer.start(100, function() enemy:check_hero() end)
  17. end
  18.  

This does not prevent him from slowing down, and it also makes him get stuck on like, any corner. The diagonal walls don't seem to work like I'd expect them to, pushing the enemy around. But his slowing down every time he takes damage is the main thing. This hasn't happened with any other enemy.



The whole script:
Code: Lua
  1. local enemy = ...
  2. local game = enemy:get_game()
  3. local map = enemy:get_map()
  4. local hero = map:get_hero()
  5. local sprite
  6. local teleporting = false
  7. local can_teleport = true
  8. local teleport_frequency = 10000
  9.  
  10. function enemy:on_created()
  11.   sprite = enemy:create_sprite("enemies/" .. enemy:get_breed())
  12.   enemy:set_life(100)
  13.   enemy:set_damage(1)
  14.   enemy:set_attack_consequence("explosion", "protected")
  15.   enemy:set_hurt_style("boss")
  16. end
  17.  
  18. function enemy:on_restarted()
  19.   enemy:check_hero()
  20. end
  21.  
  22. function enemy:on_movement_changed(movement)
  23.   local direction4 = movement:get_direction4()
  24.   local sprite = self:get_sprite()
  25.   sprite:set_direction(direction4)
  26. end
  27.  
  28. function enemy:check_hero()
  29.   --teleport
  30. --  if enemy:get_distance(hero) < 75 and can_teleport == true then enemy:teleport() end --the boss teleports if you get too close
  31.  
  32.   if not teleporting then --teleporting has a movement and we don't want the movements to conflict
  33.     local hero_angle = enemy:get_angle(hero) --gets angle toward hero
  34.     local mov_angle = hero_angle + math.pi --the angle opposite of the hero
  35.     enemy:stop_movement()
  36.     local m = sol.movement.create("straight")
  37.     m:set_angle(mov_angle)
  38.     m:set_speed(80)
  39.     m:set_max_distance(1)
  40.     m:set_smooth(true)
  41.     m:start(enemy)
  42.   end
  43.   sol.timer.start(100, function() enemy:check_hero() end)
  44. end
  45.  
  46. function enemy:teleport()
  47.   enemy:set_attack_consequence("sword", "protected") --while he's preparing to teleport, he's invincible
  48.   enemy:set_attack_consequence("arrow", "protected")
  49.   teleporting = true
  50.   can_teleport = false --we don't want him to teleport again right away
  51.   sol.timer.start(teleport_frequency, function() can_teleport = true end) --when he can teleport again (in 10 seconds)
  52.   enemy:stop_movement()
  53.   sprite:set_animation("charging", function()
  54.     local x, y, layer = enemy:get_position()
  55.     map:create_explosion({ x = x, y = y, layer = layer})
  56.     sol.audio.play_sound("explosion")
  57.     sprite:set_animation("teleporting")
  58.     local t = sol.movement.create("straight")
  59.     local telang = enemy:get_angle(480, 240)
  60.     t:set_angle(telang)
  61.     t:set_speed(200)
  62.     t:set_smooth()
  63.     t:set_max_distance(180)
  64.     t:start(enemy)
  65.     sol.timer.start(1500, function()
  66.       x, y, layer = enemy:get_position()
  67.       map:create_explosion({ x = x, y = y, layer = layer})
  68.       sol.audio.play_sound("explosion")
  69.       enemy:set_attack_consequence("sword", 1)
  70.       enemy:set_attack_consequence("arrow", 1)
  71.       sprite:set_animation("walking")
  72.       enemy:check_hero()
  73.       teleporting = false
  74.     end) --end of after teleporting timer
  75.  
  76.   end) --end of after charging animation
  77. end
  78.  

7
So, don't credits normally scroll from the bottom to the top?

8
Development / Re: [Solved]Timer problem
« on: July 16, 2018, 06:19:19 am »
No problem! The syntax

For x in map:get_entities("prefix") do
X:function()
End

Is super useful for applying the same code to an arbitrary number of entities. Once I found out a out it, my life was made much easier, lol.

9
Development / Re: Timer problem
« on: July 16, 2018, 04:09:43 am »
You could try this syntax:

Local switches_on= 0

For switch in map:get_entities("solid") do
switch:on_activated()
Switches_on = switches on + 1
If switches_on >= 4 then
 Switches_on = 0
 Sol.timer.start(5000, function() deactivate_switches() end)
End
End
End

Local Function deactivate_switches()
 For switch in map:get_entities("solid") do
 Switch:set_activated(false)
End
End


I typed this on mobile so the capitalization is off and there's typos probably, but I think that'd work.

10
I guess it would depend on how you set up your game, but Oracle really had very few of these per map, since each was just one screen. Even with larger maps, I don't imagine you'd be having more than a couple dozen per map tops. Especially if you did ice as a tileset thing like how I suggested water that dries up in summer. I mean, realistically, how many dynamic tiles do you need before any systems would start to struggle? 100?

Also, after further consideration, most dynamic tiles I was thinking could probably be normal tiles. Vines, for example, in the summer tileset you'd have vine tiles that were set as a ladder tile, and in the other tilesets you'd have a corrospondingly named tile that's just blank and empty. So the tile is still there (no errors when the tileset is switched), but it's just empty. Puddles could be done like this too, most aesthetic changes, you could have corrosponding empty tiles for snow banks, etc. Then there's even fewer dynamic tiles you'd need.

The reason I was thinking you wouldn't want multiple map.dat files is because wouldn't each season then he considered a new map, and therefore would respawn enemies, regrow cut bushes, reset pushed blocks, etc when the season changed?

11
And now we're just hijacking this thread to discuss how you'd hypothetically do this, but Oracle of Seasons is probably my favorite Zelda game, haha.

The rod item I think could easily change the tileset, wouldn't you just do
Local game = item:get_game()
game:set_tileset(game:get_value(current_season )+ 1)
If current_season == 3 then current season = 0
Where you have a game value for the season and your tilesets are named accordingly. Then you'd set a new value for current_season. It'd be easiest if your seasons were just numbered.

Most of the seasonal changes could be dynamic tiles that the map:on_season_changed() function could set enabled/disabled. Ice, leaves, vines, snow, that could all be done with dynamic tiles. Water getting shallow in summer could be the same, but honestly I'd have a special type of "summer shallow" water in the tilesets set to deep water in 3 of them and shallow water for the summer set, so it'd work automatically. Same with bushy trees you can only squeeze past in winter.

There's a few elements like those bouncy flowers that bloom in spring that'd need to be custom entities. But things like those rock mushrooms that are pickable in fall could be destructables, you'd just stack the pickable and the stuck on top of each other and set the pickable disabled 3 seasons and set it enabled in fall, reverse for the non-pickable version.

Then I'm sure there's plenty of ideas that Capcom didn't even think of. Difficult to traverse mud in spring, or slopes you couldn't climb because of mud, a river that floods in the spring and the nearby forest is in a floodplain, so it'd all be shallow water. Maybe fires might start during the summer, or maybe you'd need to bring autumn rains to put one out. A rainy season, especially if you had a particular area of the world that got spring or autumn rains so it wouldn't be global, but in that area there'd be mudslides, puddles, flooded rivers, fires would be put out, rapids would develop, plants would grow big.

Certain enemies could only appear in certain seasons, or be in different parts of their life cycles. Maybe there's a grub enemy that's easy to fight in spring, but by autumn it's matured into a dangerous beetle. Winter might kill off some enemies or cause them to hibernate. Maybe there's a bear like a Snorlax that won't wake up and get out of your path until spring. Maybe theres a forest full of wolves, but they're just a few here and there, but in winter they're only in their den and there's a bunch right together.

Then there's a ton of small environmental touches that Oracle of Seasons couldn't do because of the gameboy's processing power. Fireflies in the summer, falling leaves in the autumn, snow effects in the winter. A random weather system would pair well, and the probabilities of weather would change with each season, so it's unlikely to rain during the summer, but if it does it's a big thunderstorm.

I've thought a lot about this kind of system because Oracle of Seasons is probably my favorite Zelda game, but I've never acted much on it because I've been hesitant to just steal an idea so wholesale like that. But I also think Capcom could have gone much further- for example, why didn't they ever use the season mechanic in dungeons? The puzzle density and different player expectations for dungeons would have paired fantastically, I think.

There's some overall design decisions to make too- I think having the player explore much more of the overworld before they can change the seasons at all would be better, to develop seasonal mechanics and how they work before the player messes with them, so that way the player can form their own solutions based on previous experiences. So instead of, I can't cross this river, but I can cause either winter or summer so I'll see which helps, instead of that it'd be, I can't cross this river but I remember encountering a frozen river earlier, or I remember a dry stream bed from earlier, maybe I can make that happen. Give the player a reason to be more intentional with which season they choose- equipping each season independently would reinforce this, so they'd choose "I want to bring summer" instead of, "let's try a different season." This could be a setup like A Link to the Past, where you have to travel the majority of the world to go through a couple dungeons to even get the main mechanic.

Capcom was smart about only letting the player change the season at certain spots though, because that automatically prevents a lot of tricky situations where you'd suddenly be stuck in a snow bank, I would personally keep that.

Maybe I'll work on it someday. In the mean time, anyone who tries this system in their own game has my full support.

12
Your projects / Re: Ocean's Heart
« on: July 14, 2018, 07:46:39 pm »
Still working away on this, even if I haven't posted here about it in a couple months. I didn't get a ton done in the second half of june / first half of july because I was moving and between packing, unpacking, setting everything up, etc. I've been otherwise occupied, but I'm back into development now.

I thought I'd post a couple updates here. The mini-boss of one of the later dungeons is done and I'm pretty happy with him, he's based on the 12th century engineer Al-Jazari, who is a cool dude. Here's a video on youtube of me (unskillfully) fighting him:
Fight!

I also have been posting more frequent updates to twitter, in case anyone wants to follow me there:
Max's Twitter

I think as far as the major stuff goes, I'm over the main hump and the end is in sight! Sometime in 2019 I bet this will be releasing.


13
I don't know if anyone's done it already, but doing a rod of seasons using dynamic tiles and map:set_tileset() it should be relatively easy, compared to other main, game-wide mechanics at least. All the aesthetic changes would be done using matched tilesets, and then whatever dynamic elements you'd want on each map, you could define on a map-by-map basis. I don't think it'd be one script you could copy and paste though, so you'd definitely want some experience with the engine first.

For masks, I can see how you'd do a few of them fairly simply, the most labor intensive thing would be the graphics of your hero in each mask. The Solarus engine is a lot more flexible than project Zelda, but it requires more front-end investment in learning how to use the engine and writing scripts.

14
General discussion / Re: What are we allowed to use freely??
« on: July 11, 2018, 05:36:35 pm »
So, if you just use whatever art or music you find on the internet, that's considered stealing if you don't have permission. Also, then anyone whose art you stole could technically force you to stop working on your project and sue you in court (unlikely to actually happen, but technically possible). Also, it's impolite to take someone's hard work without asking them, and let's all just be nice.

It's not hard to know whether an artist wants you to be able to use their hard work for yourself- especially in pixel art like you're probably dealing with, usually people will write the rules right on the piece of art.

Sometimes (especially here) you'll see licenses on art. It might look something like CC-BY-SA. The CC means "Creative Commons", which is a type of license, then the others roughly mean "if you use this, you have the give credit to the artist" and "if you alter this, the new thing you create also has to give credit to the original artist." If you see a license on art, it's usually easy to look it up and figure it out, but if you're confused I bet people here would be willing to help you understand the license, just ask : )

The other things you'll see on a lot of pixel art is saying something about credit. Like "give credit" or "credit please". These are like the CC-BY license, because what it means is the artist wants you to let everyone know they created the art you're using. In the case of a game you're making, a readme file in the folder with credits would work temporarily, and then actual credits at the end ought to include them.

An artist might also write "no credit needed", which means you don't have to say who made the art. However it's very rude, at the least, to say you did it yourself because that's lying obviously. And nobody lies on the internet so don't be the first (lol).

The thing about writing "please give credit" or something is that unlike CC licenses, that has no legal standing. Perhaps you could argue in court that they intended to allow others to use their art, but if they changed their mind and wanted you to stop using their art, you'd probably have to, so it's better if someone has put an actual license on their art.

Finally, you'll also find a lot of art that has no rules written on it. This is harder if you really want to use it, but there are some things you can do. If you found the art somewhere where you can ask the artist to use it, start by asking them. They're allow to say no though, because they've probably spent many, many hours learning to create this art and then more hours making the particular thing, so if you just want to use it for free, without having done all that work, why should they let you? But maybe they're really nice and they will just let you, so ask, and follow any rules they might give you (like 'give credit' or 'don't use this in a violent game' or whatever they want.)

If you don't know who the artist is, try looking for them. Use Google for a reverse image search, which can show you who was the first person to put the image on the internet- that will usually be the artist, so maybe you can ask them. If you can't find the original artist, or if they aren't around anymore, or if they won't answer you, you're out of luck. Please don't use their hard work anyway just because you want to. There are a lot of other options- use art from someone else who will let you, or learn yourself.



Finally, a few other things you should know about on this topic- there is lots of art where the artist has explicitly given permission for anyone to use it. Try opengameart.org, it's a whole website of the stuff. It's awesome, even if a lot of it is just okay.

Another option is buying the art from an artist. Websites like gamedevmarket.net allow artists to sell assets like tilesets, characters, etc. for pretty inexpensive prices. For example, maybe instead of stealing Nintendo's art, there's a brilliant pixel artist who I think uses the Zelda Classic engine, and she's released an entire overworld tileset for just $10. If you can save up to spend a bit on that, not only would you be following the law, not stealing from Nintendo, and immune from any cease and desist notes from them, but you'd also be supporting an artist. Link



And one final note that's not about what's legal to do, but just from me personally as an artist. I learned just about everything I know about pixel art from stealing graphics from Nintendo's games and adding more to make my areas customized. It started with basic edits to Zelda the Minish Cap's tilesets, like making a door wider, or combining two things poorly, then I was adding my own little touches that didn't look that great, and now I'm making all my own graphics. I've still got a long way to go, but I did start learning by stealing. Many great artists admit they've stolen ideas, although before digital art this meant they'd see something they liked and reproduce it as best they could, which is a great way to learn. Try to reproduce Nintendo's art- maybe have a graphic open on one side of the screen and try to re-draw it on the other side. Make a few changes. That's how we learn. But please don't just take some poor artists work because you want to.



Oh, and sorry, "matter" and "better" don't rhyme in English XD
Let me know if anything I said wasn't clear.


15
Because the engine already knows exactly what map entity the collision is with (we're calling it target in this situation), you can do target:get_name() to get the name you have the map entitiy.

Pages: [1] 2 3 ... 9