Skip to main content

News

Topic: Project ZeC (My Zelda-esque Clone) (Read 345442 times) previous topic - next topic

0 Members and 9 Guests are viewing this topic.
Re: Project ZeC (My Zelda-esque Clone)
Reply #75
Now there's a new issue. You unlock the door, walk through the door, turn around, go back through the door, mysteriously deducts a key...

Just got that corrected. **Now all doors function.
  • Last Edit: September 05, 2017, 02:36:50 am by Miscreant
"I am to misbehave." - Malcom Renyolds, Captain of Serenity

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: Project ZeC (My Zelda-esque Clone)
Reply #76
I'm still confused why your original code did what it did.  If anything it should have resulted in the original door *re-locking* itself, not all the doors magically unlocking themselves.  Really weird...

I know, moot point since it's fixed now, but I do like to try to understand the cause of a bug even after fixing it.  Otherwise it's just voodoo debugging. :P
neoSphere 5.10.0 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: Project ZeC (My Zelda-esque Clone)
Reply #77
I know. I was a very odd glitch and then after that with the other glitch where it opened the door and stayed open but still deducted a key everytime you walked through it. A "ghost in the machine" perhaps. I tried to recreate the bug but now I am unable too.
"I am to misbehave." - Malcom Renyolds, Captain of Serenity

Re: Project ZeC (My Zelda-esque Clone)
Reply #78
Currently attempting to code candle functionality. I also added in a kind of puzzle lock to open a secret passageway. If not done in the proper order the counter resets to 0 and the player has to start again.

Note: The order has been changed since posting this image. After all, some things should remain a secret to the player.
  • Last Edit: September 06, 2017, 06:22:08 am by Miscreant
"I am to misbehave." - Malcom Renyolds, Captain of Serenity

Re: Project ZeC (My Zelda-esque Clone)
Reply #79
Been going through the code so far:
Removing redundacies
Streamling (why have 4 lines of code if i can accomplish the same result with 1)
Better formatting for easier readability
Adding comments where needed
Removing comments where no longer needed
Fixing various bugs that cause game crashes

Making sure things like the following don't occur.
"I am to misbehave." - Malcom Renyolds, Captain of Serenity

Re: Project ZeC (My Zelda-esque Clone)
Reply #80
Creating the player info area. Running into a problem or 2 with it though. While the Original LoZ has it on top, mine is on the bottom. This is just another difference between LoZ & ZeC.
"I am to misbehave." - Malcom Renyolds, Captain of Serenity

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: Project ZeC (My Zelda-esque Clone)
Reply #81
Does the pause screen scroll up from the bottom too?  That's one thing I always thought was neat aesthetically about LoZ1, the HUD was actually part of the pause screen.
neoSphere 5.10.0 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: Project ZeC (My Zelda-esque Clone)
Reply #82
Does the pause screen scroll up from the bottom too?  That's one thing I always thought was neat aesthetically about LoZ1, the HUD was actually part of the pause screen.

I'd like to add the functionality at some point. Right now, when you enter a shop the info area stops rendering and does not update due to how i have the shops coded. I either need to recode the shop functionality a little bit or figure out how to possibly run more than one render script at a time.
"I am to misbehave." - Malcom Renyolds, Captain of Serenity

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: Project ZeC (My Zelda-esque Clone)
Reply #83
Re: Running more than one render script - Rather than swapping out render scripts like you do now, you could just have a single render script, set on startup, a have it call a designated function.  The function can then do anything you want based on the current state of the game.

One really neat thing about JS is that functions are values that can be assigned to variables, passed as parameters, etc.  So you could even put a list of functions in an array and have your render script call them all in turn.  Then you just manipulate the array while the game is running.  That's exactly what the hook-list.js script does, although I'm not sure where you could get a copy now...
neoSphere 5.10.0 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: Project ZeC (My Zelda-esque Clone)
Reply #84
The shop function I designed passes functions as variables. I'm researching things now. I'm reading something Radnen wrote on the wiki about multiple render scripts.

Edit: Also, once completed, the inventory screen will also pass functions as variables based upon item selected.
  • Last Edit: September 06, 2017, 12:48:18 pm by Miscreant
"I am to misbehave." - Malcom Renyolds, Captain of Serenity

Re: Project ZeC (My Zelda-esque Clone)
Reply #85
Note: The really high number of coinage is for testing purposes only. It's so I don't have to keep resetting to Dbug the player_info in all the different shops. Normally, the max that the player can carry is the same as in LoZ... 255.
  • Last Edit: September 06, 2017, 12:31:36 pm by Miscreant
"I am to misbehave." - Malcom Renyolds, Captain of Serenity

Re: Project ZeC (My Zelda-esque Clone)
Reply #86
@Fat Cerberus In Production...
"I am to misbehave." - Malcom Renyolds, Captain of Serenity

Re: Project ZeC (My Zelda-esque Clone)
Reply #87
@Fat Cerberus Scrolling up, complete. Now to get it to scroll back down.

Edit: I keep forgetting to post the current commands. Here they are...
  • Last Edit: September 07, 2017, 04:39:38 am by Miscreant
"I am to misbehave." - Malcom Renyolds, Captain of Serenity

Re: Project ZeC (My Zelda-esque Clone)
Reply #88
I'm still confused why your original code did what it did.  If anything it should have resulted in the original door *re-locking* itself, not all the doors magically unlocking themselves.  Really weird...

I know, moot point since it's fixed now, but I do like to try to understand the cause of a bug even after fixing it.  Otherwise it's just voodoo debugging. :P

Actually, after I supposedly fixed it, I had to recode the whole gorram thing. Doors did keep reappearing and then causing the player to get stuck in doors or between doors with no way to exit.

When I first started laying out the maps I would often find that I exited the map into an obstructed tile. My "Goto LastMap" Dbug function was created due to those types of situations.

I also use it in my "Coder's Cove."  Coder's Cove started out as a single room. The Hidden Programmers Room. It has since been expanded and one of the rooms has doorways to all of the shops in the game. While testing the different shop functions and the player info, I'd go to a shop, test it then just "LastMap" to the Cove and go to the next shop. Saves a bunch of time not having to walk through the whole map to all the different shops.
  • Last Edit: September 06, 2017, 06:41:45 pm by Miscreant
"I am to misbehave." - Malcom Renyolds, Captain of Serenity

Re: Project ZeC (My Zelda-esque Clone)
Reply #89
Quote from: Fat Cerberus
That's exactly what the hook-list.js script does, although I'm not sure where you could get a copy now...

Might this be what you were referring to or is there perhaps a different one?

https://github.com/Radnen/radlib/blob/master/scripts/radlib/hooklist.js
  • Last Edit: September 07, 2017, 09:26:43 am by Miscreant
"I am to misbehave." - Malcom Renyolds, Captain of Serenity