A Foresty Game

Fayabella

  • Posts: 132
This depends on the balancing (how expensive it is to build a mine and how long it takes).
Ah. Yes, I shall try to make it balanced. And if it isn't, then I'll tweak it.

But I've thought of a solution that combines both of my ideas (probability and Perlin Noise):

Each ore type has a Perlin Noise image for itself. When the mine mines a level, it gives you ore based on the perlin noise, using the probability as constraints.

This way, my idea of Perlin Noise and one area having more of a specific ore than another can still be used, while also having ores appear more frequently at certain depths.

So, you don't know what ores you're going to get when you place the first mine, but based on how much you got, you can determine if there's a vein of a specific ore there.

Fayabella

  • Posts: 132
On another note, I've added stones and they behave exactly like trees. What's more, I made a simple way to discern whether an object behaves like that or it just disappears when clicked.

Basically, if it's a stone or a tree, it will trigger an event in that actor, otherwise it kills it. This means I can add as many of these resource objects as I want.

Right now a stone gives you between 2 and 6 stone, with a 1 in 3 chance of also giving you 1-4 coal and a 1 in 7 chance of giving you 1-2 iron ore.

Edit: I've found that for some reason, breaking the rock doesn't remove it from the map of objects, meaning you can't place something in a place where a rock once was. I had this problem with trees but managed to fix it, and I'm using the same thing for rocks but it's no good. How odd.

Edit 2: Now my trees aren't working properly! They act like torches now. How very odd indeed.

« Last Edit: March 16, 2019, 01:20:17 pm by Fayabella »

Fayabella

  • Posts: 132
So I figured out the problem.

If you look at the attachment in the previous post, i have two if-statements and an otherwise.

So basically, even if it's a tree, it's overridden.

I've spent multiple hours trying to find the issue and that was all it was.

Welp, everything's back to normal now.

Fayabella

  • Posts: 132
Code: [Select]
1.4.0: Mar 17 2019
-Improved the inventory: You can now cycle through your items (E or Shift-E) and can place the selected item (if it is a placeable item).

-Added workbench. It serves no purpose as of yet, but will be used for crafting in the future. For now, you get a few in your inventory for placing.

-Made day cycle longer, now 6 minutes long (4 seconds per second).

-Added rocks, which give you stone, iron, and coal.

-Made trees fade when you walk behind them, so you can see the player.

-Made the cursor tween instead of immediately snapping to the grid.

-Fixed light masks spawning 5 pixels left and 5 pixels up.

-Fixed cursor getting stuck on edge of screen.

-Plenty more bug fixes.
Released 1.4.0! See changes above.
http://www.stencyl.com/game/play/39890

« Last Edit: March 17, 2019, 07:03:16 pm by Fayabella »

Bombini

  • *
  • Posts: 1226
Wow! This is already pretty cool!"
Very good progress...one thing i would ask for...please replace the arrow with a placeholder character/person ;) It would make such a difference :)

Fayabella

  • Posts: 132
Wow! This is already pretty cool!"
Very good progress.
Thanks!

Please replace the arrow with a placeholder character/person ;) It would make such a difference :)
hmm well um
I've searched for something that looks alright but can't find anything that fits, and I can't do pixel people.
I'll see about it though. Eventually I gotta find something right?


Fayabella

  • Posts: 132
skidaddle skadoodle you're now a pony

No, not actually, but I was just messing around with the movement behaviour and found you could set animations for each walking direction. I didn't know that and that's one of the reasons I've put off having a character for so long- I thought I would have to edit the behaviour myself to get it to do that and I really didn't feel like it; I'm not the best at editing code someone else made.

So when I actually find (or make) a player animation, it'll be much simpler than I thought to add.

Odd how I miss some of these simple things.

Bombini

  • *
  • Posts: 1226
I'm not the best at editing code someone else made.

You will get better and better and some point replace the  code form someone else with your code :)