Spherical forums

User-Made => Projects => Topic started by: Miscreant on August 01, 2017, 01:59:01 pm

Title: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 01, 2017, 01:59:01 pm
Unofficially called Zelda-esque Clone (ZeC).

Currently in development since May '17.

100% Fan Made Game. Made mostly from Legend of Zelda Sprite. Very few original designs in the Tileset. Original Tileset copyrighted to Nintendo.
(Just stating. I've seen screenshots of Kefka's revenge so i don't really think the sphere community would have a problem with a zelda game)

In ZeC, the land of Hyrule is very much different than the original Legend of Zelda (LoZ). Many centuries have passed. Mountains fall and rise, rivers divert, lakes dry up. An entire landscape can become totally unrecoginizable over hundreds and hundreds of years. The "Lost Woods" & "Lost Hills" do still exist but are not in there original locations, nor is the passage through them the same as in LoZ.

The attached image is the overworld. I welcome input and thoughts. I am unhappy with the way my overworld map is displaying (all the erronious line data between some map segments. I'm currently collaboratting with a friend who does Graphic Design to eliminate that issue.) As you can see from the image the overall scope of the game is pretty immense. I currently have 2 world maps (composed of a total of 112 Sphere Maps(EPIC project undertaking)). The overworld and the Underworld. While the Overworld map is complete, the Underworld still needs some creation. I will also need to design the 8 levels where the Triforce fragments are. Not included on the Overworld map is the Hyrulian Palace.  I've taken a small break from map creation to implement coding.

The player can currently walk around the world, collect items, step off one of the docks and ride a raft (if you have it). "Talk" to the headstones in the cemeteries. In keeping with tradition of the original Final Fantasy, one random headstone reads "Here lies Erdrick". I am currently implenting the bomb functions...

**Note: The Overworld map image has been scaled down for forum size requirements. The error data between map sections is not visible at this smaller size.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on August 01, 2017, 02:20:49 pm
Hmm, it seems there's no image attached to your post! This sounds interesting already though.

Quote
(Just stating. I've seen screenshots of Kefka's revenge so i don't really think the sphere community would have a problem with a zelda game)
There have been Final Fantasy games, Pokémon games, Zelda games, even Mario ones... No one here's gonna mind, the engine has quite a rich history of interesting fan games in that regard. :P
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 01, 2017, 02:23:44 pm
hmm, I did attach the file. How can I post it now? I see no way to attach it again.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 01, 2017, 02:25:23 pm
nevermind, i figured it out
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on August 01, 2017, 02:38:01 pm
From what I can tell, the map design looks great, and you seem to be well underway already. Maybe a bit too much of a reliance of arrows though. :P

Quote
all the erronious line data between some map segments
All the lines seem to be laid out in a very consistent grid, interestingly. How did you generate this map?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 01, 2017, 03:01:20 pm
From what I can tell, the map design looks great, and you seem to be well underway already. Maybe a bit too much of a reliance of arrows though. :P

Game Tip: The arrows of matching colors on the overworld map point the way you must travel through the Lost Hills. The player must figure out the correct order though.

Quote
all the erronious line data between some map segments

All the lines seem to be laid out in a very consistent grid, interestingly. How did you generate this map

I used Gimp2.8 with layer groups for the rows and individual layers for map segments.

The layout is like this:
Row 1
--Map A1
--Map B1
...
...
--Map P1
Row 2
--Map A2
--Map B2
...
...
so forth and so on...

I spent a good amount of time in Gimp on the original layout so that errors like that would not occur. There is no pixel gap at all between the layers.

I would make the map segment in Sphere, export it to an image, resize the image to appropriate values, paste it into the associated layer.

Took an uncounted amount of man-hours. 112 map segments per overworld and underworld map... You can imagine my frustration with the finished map. As I stated to one of my friends, "Its not a matter of perfectionism but of professionalism."
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on August 01, 2017, 04:08:47 pm
Hmm... That sounds like it was really tedious. I'm sorry it still went wrong somewhere. :(

Perhaps you could export the full image first and then resize that exported image. Maybe try a few of the different scaling filters too. If the problem is somehow present in the full-size image too, there are actually other ways to get your image too: you can create a little Sphere game that draws the whole map to a Surface object, and then save that Surface out to an image file.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 01, 2017, 04:44:18 pm
you can create a little Sphere game that draws the whole map to a Surface object, and then save that Surface out to an image file.

That sounds interesting. Not really sure how to go about doing that yet. I need to read up on Surface usage.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 08, 2017, 02:51:05 am
Update: The Underworld map is almost complete. just a few map segments more and then comes the process of creating the individual levels where the Triforce pieces are.

I also implented a few new fuctions. The most significant being where if you bump into a "Armos" statue it comes to life and and moves quickly around the screen, just like in the original LoZ. Currently, trying to create the Whistle/Ocarina (Not sure which I'm going to call it yet) functions.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 11, 2017, 03:07:32 am
Update: Started coding the inventory screen
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 12, 2017, 01:06:04 am
Just a couple of screenshots
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on August 12, 2017, 01:10:57 am
I'm really liking what I see here.  It's very nostalgic but yet completely new at the same time.  I always did love the Zelda 1 sprites and tiles.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 12, 2017, 01:31:57 am
I have always been a fan of LoZ. It was the first game I ever completed on the NES. Even before running all the way through SMB, there was LoZ. I never realized the scope of this project before I started coding it. The game takes place in Hyrule but I've added in elements from Final Fantasy 2 & 3.

The screenshot of Edward is the entrance to Kain's Tomb. All of the headstones around Kain's tomb is a character from Final Fantasy 2.

Without giving away too much of the story line, The Master Sword has been fragmented and needs to be reforged. Kain's ghost is wandering around randomly inside his tomb and after a series of events leads the player to a fragment of the master sword.

I have also added a similar story point with Setzer from Final Fantasy 3.

I have a few other classic nes/snes and one sega character(s) located in the graveyards throughout Hyrule as well. They are not Sonic or Mario either.
Title: SPLIT: Pixel size consistency in video games
Post by: DaVince on August 14, 2017, 06:52:38 am
I've split this discussion to give the topic a little breathing room for feedback on the game itself. :)

One or more of the messages of this topic have been moved to Off-Topic Discussions (http://forums.spheredev.org/index.php?board=8.0)

http://forums.spheredev.org/index.php?topic=1507.0
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 18, 2017, 11:33:57 pm
After the discussion on pixel consistencies, I brought the whole project back down to the original 16x16 tiles. I've managed to get some of the custom item sprites to also be 16x16 with no scaling loss of quality. I'm finding though that other functionalities need to be recoded. Most of the x, y coordinates are in need of revamping due to the smaller window size and none of my event specific message boxes fit in the screen either. The font I was using doesn't seem suitable due to size. Most message boxes are being drawn off the screen. I'm currently in the process of creating a custom function for my message boxes.

Edit: Trying to program a scrolling message box.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 25, 2017, 07:02:31 am
Been doing some redesign to segments of the overworld. Not quite complete.

Edit: The map section with the 9 different colored Armos was my test area for them. I need to edit it back to a single color. The different colors represent different speeds they move at. The first original redish is the slowest. The Goldish one is the fastest.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 25, 2017, 07:03:27 am
Also creating some ProtoLevels...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on August 25, 2017, 09:13:33 am
The world map looks like it would be a lot of fun to play!
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 25, 2017, 09:34:50 am
And that's just the Overworld. None have seen anything pertaining to the underworld yet...

On a side note: Still trying to decide whether or not i want to leave the enclosed mountain area in the center the way it is or turn it into a desert area like the western part of it. Geographically, it would probably be a desert region being closed off by mountains.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 25, 2017, 11:24:05 am
First of the ProtoLevels
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 25, 2017, 11:59:46 am
I really can't get over how much my inventory progressed.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 26, 2017, 12:22:06 am
Attempting to create my first animation... A whirlpool.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 26, 2017, 03:03:31 am
Major map revisions done...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on August 26, 2017, 06:07:46 am
Good to see the progress.

We could do with more game projects around here...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on August 26, 2017, 08:16:32 am
And that's just the Overworld. None have seen anything pertaining to the underworld yet...

On a side note: Still trying to decide whether or not i want to leave the enclosed mountain area in the center the way it is or turn it into a desert area like the western part of it. Geographically, it would probably be a desert region being closed off by mountains.
How about expanding the desert area while still leaving the mountain area next to it somehow? The mountain area looks neat but the desert does feel too small to be able to get lost in a little (isn't it only like 5 screens?). Especially with the big rock in the middle, though perhaps you weren't going for a feeling of slightly getting lost, I dunno.

Also, awesome progress. I like the pixel art in the inventory.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 26, 2017, 08:55:36 am
How about expanding the desert area while still leaving the mountain area next to it somehow? The mountain area looks neat but the desert does feel too small to be able to get lost in a little (isn't it only like 5 screens?). Especially with the big rock in the middle, though perhaps you weren't going for a feeling of slightly getting lost, I dunno.

If compared to the original LoZ map (https://www.gamefaqs.com/nes/563433-the-legend-of-zelda/faqs/12694?raw=1) the desert was only 5 tiles laid out in a different pattern. The 2 new revisions to the map are:
 
1. The enclosed mountain region is all desert now (That big rock has its own part to fulfill in the outcome of Hyrule.)

2. The obvious mountain watery pass that seperates Western and Eastern Hyrule.

Quote from: DaVince
Also, awesome progress. I like the pixel art in the inventory.

I can take no credit for the pixel art. They came from LunarSignals@OGA.

(https://opengameart.org/users/lunarsignals)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 27, 2017, 10:05:30 am
Whirlpools and warps... gorram it! I have no idea the total time spent trying to get this functionality to correctly process from both sides of the whirlpool...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on August 27, 2017, 10:29:03 am
Nice, I hope you've set this up with some kind of general function so you can add more such with only 1 or 2 lines of code each time?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 27, 2017, 11:52:30 am
When I started it... going from the dock to the whirlpool, then panning to the island whirlpool would function correctly until i tried "exit" the whirlpool. No input attached, person doesn't exit, etc... when I finally got that to be correct, I said to myself okay, now just do the process backwards... nope. A whole new array of issues sprang up. I finally got it down to 4 lines of code in the map. 2 to enter the whirlpool & 2 to exit, there are some redundencies in the code that i need to eliminate though but after all the time spent already. I'm taking a break from it to write the Hyrulian war journal entries. Also, fixing text box widths & heights
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 30, 2017, 08:24:57 am
Off Topic Random Question: Is there an upper limit to the total number of zones and/or person entities there can be on a per map basis?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on August 30, 2017, 09:11:28 am
The maximum number of each an RMP map file can store is 65,535 as the count is stored as a 16-bit integer.  Note that triggers count against the person limit.

In practice I don't think you're ever going to hit that--your game would die of lag first. :P
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 30, 2017, 10:05:40 am
Good to know. The thought I have in mind for a map should function.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 31, 2017, 01:15:08 am
Updates:

The Overworld map is almost completed. Every time I look at it I find something else that needs to be touched up a little.

The Underworld map is near completion. There are only a few map segments left to create.

Created several new room images for ProtoLeveling.

ProtoLeveled:
Death Mountain
Kain's Tomb
Setzer's Tomb
Master Sword Hilt Dungeon
Master Sword Blade Dungeon
Dungeon Levels 1, 2 & 3

Created the actual maps for Level 1, Kain's Tomb & Setzer's Tomb.

Figured out how to not recreate a couple of issues I discovered in the Original Legend of Zelda dungeons.

Created spritesets for the Moblins, Octoroks, Tektites, Bats, Peahats & Leevers.

Removed the redundancies in the whirlpool function without breaking its functionality.

Fixed an issue with the Whistle Function where if used on certain maps the game would crash.

Updated the inventory screen to include the number of coins, keys & bombs the player has.

inEdit:
A generic shop function along the lines of CreateShop(item1, item2, item3).

Turning ProtoLevel 2 into maps.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 31, 2017, 08:44:28 am
First Glimpse of the Hyrulian Underworld (Not yet complete) map.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 31, 2017, 08:56:04 am
In trying to get the sprites of Zelda & Final Fantasy 2 to mesh together, I'm encountering an issue with my Kain spriteset.

In the following screencaps you can see Kain in his original and rescaled forms. While the Zelda sprites are scaled up, I scaled down the Kain sprite to match. However, in the process of scaling Kain down his Sprite Base remains the same.

I've been going through the api.txt & Legacy API's in the Wiki to see if there is a way to reset his base dimensions through coding. Is that a possability? or is that a function of the spritesets that just doesn't exist?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on August 31, 2017, 09:03:46 am
Sphere 1.x has a bug where SetPersonScale*() doesn't scale the sprite base (I fixed this in miniSphere).  I don't believe there's a way to set that in code, unfortunately.  Better would probably just be to scale the spriteset down manually.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 31, 2017, 09:48:08 am
Manually edited from 48w x 32h to 24w x 16h. Now the base is correct and the player can interact with Kain and not the empty space around Kain.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on August 31, 2017, 02:17:01 pm
The underworld looks dark and cool, I like it. I like the whole concept of having two worlds like that. How's it going to work? Can you warp from one to the other using portals, or something like a magic mirror like in LTTP, or through some specific entranceways like in Oracle of Ages/Seasons?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 31, 2017, 02:40:31 pm
The underworld looks dark and cool, I like it. I like the whole concept of having two worlds like that. How's it going to work? Can you warp from one to the other using portals, or something like a magic mirror like in LTTP, or through some specific entranceways like in Oracle of Ages/Seasons?

The Overworld and Underworld are laid out on the same grid system. Letters across the top, numbers going down the sides (A-P, 1-7). The upper left corner would thus be A1 and so forth. If you compare the two maps you can see where certain spots match up, such as in grid A7 (the bottom left corner). Another Example is J4 -> K4 in the Overworld. There are platforms in the water that lead to a cavern in the mountain range that seperates Western & Eastern Hyrule. When the player retreives the ladder from one of the later dungeons, he/she can walk across the platforms and enter the cave. Once underground there are a series of tunnels (that will have underworld specific enemies (bats, dark octoroks, etc...)) that will bring the player to Eastern Hyrule.

There are a few locations that do have warp tiles, both in the Over & Underworld, that you will be able to teleport between.

In the "BetaInvV3" screencap I posted, you may have noticed a pair of Winged Boots. I refer to them as the "Hermes Boots." Specifically added for the Underworld lake. Once activated, the player has the ability to hover above the ground and manuever to locations previously inaccessible.

Edit: The empty caverns that have no exits are actually the locations of shops and other things from the Overworld. The letter for the Water of Life, 2 of the 5 different swords, The "It's a secret to everybody" heres some rupees guys, amongst others.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on August 31, 2017, 03:40:44 pm
When Zelda meets Final Fantasy II:

Here's a little vid of Link and Kain interacting...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 01, 2017, 10:40:26 am
Update:  CreateShop(item1, item2, item3)

Is now GenerateShop(npc, item1, item2, item3).

The function is intended to be used for any cave involving an npc, such as a heart container, or water of life or a shop. Item2 & item3 are conditional.

The function currently creates the npc and items. Places them in their proper locations based upon the number of items selected. Changes the variable as to whether or not the play has the item. Currently implimenting the functionality of setting the items activation scripts and deduction the cost of the item.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 01, 2017, 12:36:28 pm
@Fat Cerberus Question for you: My GenerateShop function is progressing. I've hit a small snag with it and was wondering if you had a suggestion. I'm trying to display the shopkeeper's message (ex. Buy something will ya?) on the screen persistantly. So far I have only been able to do it with the use of a FlipScreen(), GetKey(). Is there a way to draw the text constantly without having to wait for the player to press a key?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 01, 2017, 01:04:10 pm
After FlipScreen() is called, whatever was drawn to the backbuffer is cleared.  That happens intrinsically as part of the map engine event loop.  In order to keep the text on-screen you need to redraw it every frame.  Look into SetRenderScript().
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 02, 2017, 12:11:47 am
The SetRenderScript got the text for the ShopKeeper and the Item Prices to stay on the screen. However. as you can see in the attached image, the player can walk under the text. Might there be a way to draw the text under the player?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 02, 2017, 03:51:50 am
Drawing the text under the player is trickier:

- you could do it with a layer render script if you have the player walking on a higher layer than the ground (layer render scripts are like normal render scripts but attached to specific layers of the map)

- you could re-draw the player in the render script (currently the map + entities are drawn then the render script is called) so when you have a render script running you could have it draw the player as well so he's on top. (basically whatever is drawn last appears on top)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 02, 2017, 04:25:01 am
Quote from: Rhuan
- you could do it with a layer render script if you have the player walking on a higher layer than the ground (layer render scripts are like normal render scripts but attached to specific layers of the map)

hmm, the shop maps are only one layer with 4 lines of code embedded. As an example the current shop map I am editing has...

On Enter Map:
GenerateShop("ShopKeeper2", "Bomb", "Key", "shopHeart");
SetRenderScript("ShopTxt()");

On Leave Map:
SetRenderScript("emptyfunc()");
DstryTmp();

GenerateShop() creates all the entities, sets thier position and associates the proper activation scripts per entity for purchasing the items.

ShopTxt() gets the generated items from a temporary variable, draws the ruppee, prices and shopkeeper message.

emptyfunc() is just that... An empty function defined to prevent certain things from occurring.

DstryTmp() clears the values of the temp item variables.

Quote
- you could re-draw the player in the render script (currently the map + entities are drawn then the render script is called) so when you have a render script running you could have it draw the player as well so he's on top. (basically whatever is drawn last appears on top)

I can attempt to edit that in somewhere in the script. Though, I'm not entirely sure where.

Although, just now while write this post I had a thought... I could change the position of the prices so they are above the items and not below. That would be just changing the y value of the entities instead of recoding redrawing the player just for the shop functions. Not sure how that would look though.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 02, 2017, 04:50:18 am
Quick Edit and now the text is on top... I also changed the font to be more consistent with the message boxes. Which looks better. Text above or below?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 02, 2017, 04:47:32 pm
Over 400 lines of code later... all of the shops in the game can be created with GenerateShop().

Not just the shops but caves with the letter, the swords, the water of life, the heart containers & the guys who give you random rupees.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 03, 2017, 08:47:42 am
Forgot to attach this...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 03, 2017, 11:17:57 am
Attempting to code the PowerBracelet functionality...

It's got my mind in a whirlwind right now.  In this example the headstone should move over by 1 tile, then make the stairs appear. The headstone never meets the condition to make the stairs appear because the end coordinates are constantly updating with the starting coordinates.

I think for now, I'll take a break from the power bracelet function to code a different command. I'll come back to it once the coding fog lifts and I can better see where my coding error is.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 03, 2017, 04:26:36 pm
Power Bracelet functionality fixed and recoded in such a way that the function can be used in dungeons to push blocks also. Added functionality that once the block/headstone/rock is moved, the player can not move it again.

See sometimes, you just need to code something else when your stuck. Not thinking about the issue will present the solution without even realizing it.

Side note: I know they are not the best animated gifs. I just quickly put them together to stay with in the forum post size limits.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 04, 2017, 04:37:16 am
Somewhere, while coding one of the new functions I've created, I broke the functionality of my Ghost Kain interactions... Have find the glitch in that code now.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on September 04, 2017, 04:45:34 am
I love that you're using little gifs to display progress now. I'll also bump up the attachment size by a little bit. :smiley:
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 04, 2017, 05:01:07 am
Thanks. I like the little gif animations also. Creating them is a lot quicker than creating a video example. File sizes are a lot smaller too.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on September 04, 2017, 06:24:14 am
That's kinda interesting; gifs are a lot more bloated compared to modern videos compressed with a modern codec (WebM et al). I wonder if it's because there's not much movement in your videos. In any case, animation does allow for a better general viewing experience/progress report.

By the way, how do you create your gifs? Use any special tools?

Also, it's definitely worth mentioning that I like how much progress you're making with this! :)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 04, 2017, 06:39:38 am
That's kinda interesting; gifs are a lot more bloated compared to modern videos compressed with a modern codec. I wonder if it's because there's not much movement in your videos. In any case, it does allow for a better general experience.

As an example: The whirlpool video I posted is 29mb, where as my Arrrrrrgh.gif is only 288kb. The gif animation has a much smaller file size.

Quote
By the way, how do you create your gifs? Use any special tools?

I found a tiny program called 'Giftedmotion-1.23.jar'. The program itself is only 73kb.

Quote
Also, it's definitely worth mentioning that I like how much progress you're making with this! :)

Thanks. ZeC is definitly progressing. There's still a lot of functionality left to create though. I haven't even begun any type of battle system yet and there's still a few minor things I need to adjust.

Also, in doing research into the original LoZ there are bugs that I am taking time to try to not recreate.

Some of them are simple, like if you are in a dungeon and walk through a door you walk over it and not through it.

Others are a little more involved like, the block bugs that let you walk through them if you position yourself just right.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on September 04, 2017, 09:05:01 am
Even if there isn't any sort of battle system yet, progress is progress, and you're getting used to how Sphere works first after all. :)

Quote
As an example: The whirlpool video I posted is 29mb, where as my Arrrrrrgh.gif is only 288kb. The gif animation has a much smaller file size.
This is because you used Microsoft Video-1 encoding, which is an ancient codec format with very inefficient compression. The fact that it compresses that much more when zipped is very evident of that. A well-compressed video wouldn't become smaller inside a 7z at all.

In the future, if you want to share even longer snippets, it might be worth looking into something that exports to WebM or MP4 for better compression/file sizes. But I can't guarantee that videos would play as directly as a gif does here, anyway. I'll have to test and possibly enable that anyway. :P
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 04, 2017, 10:02:43 am
Quote from: DaVince
This is because you used Microsoft Video-1 encoding, which is an ancient codec format with very inefficient compression. The fact that it compresses that much more when zipped is very evident of that. A well-compressed video wouldn't become smaller inside a 7z at all.

Well, the program I was using for the video creation was kind of outdated itself and started to crash alot. That was one of the main reasons I looked into the gif animation.

Sreencaps:
The Tomb of Kain Highwind and Dodongo.

Note:
Dodongo does not move as fast in the game as he does in the animation.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 04, 2017, 12:34:47 pm
New glitch.
Kain's Tomb Door 1/2/etc...
KTD1: true (door exists / false: Key used, door unlocked)
KTD2: Same as above
HaveKey:1 (0: No Key/ 1: Normal Key / 2: Magic Key)
NumKeys: self explainitory

When you touch the door, it opens, updates to false and deducts a key.

When you walk through the door however, it updates both doors as being unlocked...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 04, 2017, 01:06:05 pm
Hehe, didn't the original LoZ have a glitch just like that in the first dungeon?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 04, 2017, 01:13:16 pm
Hehe, didn't the original LoZ have a glitch just like that in the first dungeon?

Only with the first northern door. You had to leave and reenter level 1 to make the door vanish.

Currently, in ZeC, it's all doors. The same issue occurs if I unlock the Eastern door pictured in the image or other doors in the dungeon. I can't figure out how that is occurring due to the fact that only the current doors variable being is being accessed.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 04, 2017, 01:45:16 pm
Hehe, didn't the original LoZ have a glitch just like that in the first dungeon?

Only with the first northern door. You had to leave and reenter level 1 to make the door vanish.

Currently, in ZeC, it's all doors. The same issue occurs if I unlock the Eastern door pictured in the image or other doors in the dungeon. I can't figure out how that is occurring due to the fact that only the current doors variable being is being accessed.
There must be something causing the code to hit all the doors, possibilities:
- are you sure they have separate variables?
- do you store multiple properties for each door or only open/closed?
- how do you create the door variables?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 04, 2017, 01:56:25 pm
Something you may not know if new to Javascript, if you have an object e.g.:
Code: [Select]
var data = {name:"hi", open:false};
//And then set another variable to equal that object:
var foo = data;
//the object is not copied, rather a reference to it is passed
//so...
foo.open = true;
//will result in
if(data.open===true)
{
  //this code would be executed
}
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 04, 2017, 02:07:46 pm
Currently, each dungeon level has its own js file with its own variables. So all of the variables for Kain's Tomb (short handed as KT) are stored in kainstomb.js.

Kain's Tomb is a 21 room dungeon level. The code would be a huge mess if I tried to store everything in 1 file. Not every room has a door that requires a key, so the amount of variables are at a minimum.

I've designed a function called UseKey. It is currently set as UseKey(name, v). Name being the name of the door, v being the variable of the door. The function "unlocks" the door.

When called it:
Determines if it is a normal key or magic key
sets v equal to false
DestroyPerson(name)
Deducts a key from NumKeys if a normal key was used.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 04, 2017, 02:12:43 pm
Code: [Select]
var foo = data;

funny thing is I have a function called Foo.

Foo(x, y, d, l) I use it to set people or items in the map.
x, y are used always. d and l are optional.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 04, 2017, 02:14:25 pm
Currently, each dungeon level has its own js file with its own variables. So all of the variables for Kain's Tomb (short handed as KT) are stored in kainstomb.js.

Kain's Tomb is a 21 room dungeon level. The code would be a huge mess if I tried to store everything in 1 file. Not every room has a door that requires a key, so the amount of variables are at a minimum.

I've designed a function called UseKey. It is currently set as UseKey(name, v). Name being the name of the door, v being the variable of the door. The function "unlocks" the door.

When called it:
Determines if it is a normal key or magic key
sets v equal to false
DestroyPerson(name)
Dectucts a key from NumKeys if a normal key was used.
Can you post the JS file containing the variables?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 04, 2017, 02:18:31 pm
I can do that in a few...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 04, 2017, 03:15:37 pm
@Rhuan Here it is...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 04, 2017, 03:51:07 pm
Wow that's a lot of variables.... I'm sure you could do whatever you're doing with a lot less than that.

Looking specifically at the doors though there's nothing obvious please can you post the function you use for opening a door? And an example of how it would be called.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 04, 2017, 04:09:52 pm
Just to be clear, this doesn't do what you think it does:

Code: [Select]
var x = 812;
function f(v) { v = 1208; }
f(x);
// x is still == 812 here!
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 04, 2017, 04:12:29 pm
Just to be clear, this doesn't do what you think it does:

Code: [Select]
var x = 812;
function f(v) { v = 1208; }
f(x);
// x is still == 812 here!
His issue is too many variables being updated though not too few which is kinda odd.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 04, 2017, 07:49:40 pm
The function & usage
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 04, 2017, 08:27:43 pm
Okay, well like I said above, setting v = false; inside the function won't have any effect.  When you pass a variable to a function you're actually just passing the value, so that just sets your local copy of v.  If you want to modify something you passed into the function, you'd have to pass in an object, e.g.:

Code: (javascript) [Select]
function modify(obj) {
    obj.c = -128;
    // note: this *still* wouldn't work:
    //     obj = somethingElse
}
var obj = { a: 812, b: 1208, c: 0 };
modify(obj);
// obj.c == -128 now

I can't understand why that would cause ALL your doors to get unlocked though.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 04, 2017, 08:34:50 pm
Okay, well like I said above, setting v = false; inside the function won't have any effect.  When you pass a variable to a function you're actually just passing the value, so that just sets your local copy of v.  If you want to modify something you passed into the function, you'd have to pass in an object, e.g.:

Code: (javascript) [Select]
function modify(obj) {
    obj.c = -128;
    // note: this *still* wouldn't work:
    //     obj = somethingElse
}
var obj = { a: 812, b: 1208, c: 0 };
modify(obj);
// obj.c == -128 now

I can't understand why that would cause ALL your doors to get unlocked though.

Me neither. As you can see only one variable was being passed. So why it was affecting a variable not even entered, I have no idea. Like my pushing block function that I had to take a break from before I actually got it to function properly, this is some thing I may just have to not think about for a lil bit. That's usually when an idea for a solution pops in.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 05, 2017, 01:27:32 am
I stopped trying to pass the variable and just set it directly. Now UseKey functions.

Edit: Gorram it, I just had a thought. The way it is right now, if you touch the door it, whether you have a key or not, it will set the variable to false. Crap, I'll have to change that... again.

That should be a simple enough edit though.

Edit 2 (based on example image):

if (HaveKey > 0)  KTD2 = false;

*Now, UseKey() functions.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 05, 2017, 02:30:32 am
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.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 05, 2017, 09:31:35 am
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
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 05, 2017, 09:36:44 am
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.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 05, 2017, 10:45:35 am
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.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 06, 2017, 07:36:15 am
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.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 06, 2017, 08:50:56 am
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.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 06, 2017, 09:10:24 am
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.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 06, 2017, 09:22:06 am
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.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 06, 2017, 09:51:14 am
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...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 06, 2017, 10:08:17 am
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.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 06, 2017, 12:29:58 pm
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.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 06, 2017, 02:20:27 pm
@Fat Cerberus In Production...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 06, 2017, 06:04:44 pm
@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...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 06, 2017, 06:37:08 pm
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.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 06, 2017, 07:22:21 pm
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
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 07, 2017, 04:44:47 am
Scrolling up and down complete. Now, I just need to code in the cursor and item selection and then I can replace the original inventory screen with the new one.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 07, 2017, 01:08:19 pm
There's some sort of glitch in my Map Reference system that wasn't there before coding the scrollable inventory screen.  The game keeps crashing on 2 particular maps stating MapRef has no properties, yet they are clearly defined.... it's another arrrrrrgh moment.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 07, 2017, 02:15:17 pm
Comment out the render script for the player_info and I can access those, what turns out to be 5, maps. Remove the // and suddenly those maps have no properties. And it is only those maps. I just went through a check of every map in the game to see if any others cause it to crash.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Chad Zechs on September 07, 2017, 03:13:57 pm
I am really enjoying this, more or less, development blog. Thanks Miscreant! Super cool to get to peek into your mind as you work on this!
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 07, 2017, 03:37:05 pm
Comment out the render script for the player_info and I can access those, what turns out to be 5, maps. Remove the // and suddenly those maps have no properties. And it is only those maps. I just went through a check of every map in the game to see if any others cause it to crash.
That's bizarre - I assume you're over writing a key variable somewhere - OR do you have two different render scripts and one isn't being called if you call the other?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 07, 2017, 04:03:59 pm
Comment out the render script for the player_info and I can access those, what turns out to be 5, maps. Remove the // and suddenly those maps have no properties. And it is only those maps. I just went through a check of every map in the game to see if any others cause it to crash.
That's bizarre - I assume you're over writing a key variable somewhere - OR do you have two different render scripts and one isn't being called if you call the other?

Thanks to the debugger in Sphere Studio, I discovered that the variables being called were slightly misnamed in the code. You can look at something countless times and it all looks correct... like when everything gets thrown off because you misplace a decimal point somewhere. I corrected the issue and those 5 maps no longer cause the game to crash.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 07, 2017, 06:26:57 pm
Thanks to the debugger in Sphere Studio, I discovered that the variables being called were slightly misnamed in the code. You can look at something countless times and it all looks correct... like when everything gets thrown off because you misplace a decimal point somewhere. I corrected the issue and those 5 maps no longer cause the game to crash.

This is good to hear, good that I didn't put all that effort into making a Sphere debugger for nothing :D

You have no idea how many times I was writing code for Sphere 1.5, ended up trying to find a single bug for hours and realized I would have found it in two seconds if it had a stepping debugger.  Well, now it does. ;)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 07, 2017, 06:39:37 pm
So editing my Kain function I've come across something unusual.

Let me give a little background first:
You find Kain's body laying on the ground.
You go to interact with him and his ghost appears and walks out the door.
You then follow Kain through a series of room where in the 2nd to last room he walks through a wall.
In the last room he walks to a predetermined spot on the map and turns to face the player, where you can interact with him.

Now, all of this is set in the code itself.
Creation of the sprite, movement and script activation.

I have tried the code both ways SCRIPT_ON_ACTIVATE_TOUCH & SCRIPT_ON_ACTIVATE_TALK.

Once you interact with him a series of messages plays on a timed delay.

In the TOUCH version, the event plays through as intended.

In the TALK version, however, the message plays through twice.

I don't get why that would occur. It's kind of perplexing.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 07, 2017, 06:46:36 pm
Without seeing your code, it's hard to say for sure; what I do know is that miniSphere's map engine contains dedicated logic to prevent double-activation of a talk script:
https://github.com/fatcerberus/minisphere/blob/v4.8.4/src/minisphere/map_engine.c#L2623-L2632

I'm not sure if there's any such guard in Sphere 1.x.  Maybe that's what you're hitting?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 07, 2017, 06:48:26 pm
Thanks to the debugger in Sphere Studio, I discovered that the variables being called were slightly misnamed in the code. You can look at something countless times and it all looks correct... like when everything gets thrown off because you misplace a decimal point somewhere. I corrected the issue and those 5 maps no longer cause the game to crash.

This is good to hear, good that I didn't put all that effort into making a Sphere debugger for nothing :D

You have no idea how many times I was writing code for Sphere 1.5, ended up trying to find a single bug for hours and realized I would have found it in two seconds if it had a stepping debugger.  Well, now it does. ;)

It is very useful, however with the slow down of graphics example I posted in the other topic, it makes it very difficult to debug at times. I even tried to roll back to miniSphere 4.5 at one point just so I could continue to debug but Sphere Studio just kept crashing.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 07, 2017, 06:58:51 pm
Code: [Select]
function GhostKain(id)
{
CreatePerson("Kain", KainGhost, true);

switch (id)
{
case "1":
Foo("Kain", 151, 108, "west", 1);
Move("Kain", COMMAND_MOVE_WEST, 7, false);
Move("Kain", COMMAND_MOVE_NORTH, 1, false);
Move("Kain", COMMAND_MOVE_WEST, 3, false);
FollowingKain = 1;
break;

case "2":
Foo("Kain", 135, 92, "west", 1);
Move("Kain", COMMAND_MOVE_WEST, 9, false);
FollowingKain = 2;
break;

case "3":
Foo("Kain", 182, 92, "west", 1);
Move("Kain", COMMAND_MOVE_WEST, 3.4, false);
Move("Kain", COMMAND_MOVE_SOUTH, 6, false);
FollowingKain = 3;
break;

case "4":
Foo("Kain", 126, 44, "south", 1);
Move("Kain", COMMAND_MOVE_SOUTH, 4, false);
Move("Kain", COMMAND_MOVE_EAST, 2.55, false);
Move("Kain", COMMAND_MOVE_NORTH, 3, false);
Move("Kain", COMMAND_MOVE_EAST, 2, false);
Move("Kain", COMMAND_MOVE_SOUTH, 2, false);
Move("Kain", COMMAND_MOVE_EAST, 4, false);
break;

case "5":
Foo("Kain", 39, 92, "east", 1);
Move("Kain", COMMAND_MOVE_EAST, 5.55, false);
Move("Kain", COMMAND_MOVE_NORTH, 2, false);
QueuePersonCommand("Kain", COMMAND_FACE_EAST, false);
QueuePersonCommand("Kain", COMMAND_FACE_SOUTH, false);
SetPersonScript("Kain", SCRIPT_ON_ACTIVATE_TOUCH, "KainTalk()");
FollowingKain = 1000; //set really really really high so once you talk to him you can not do it again
FoundKain = 1;
break;
}
}

Foo(name, x, y, d, l)
sets x, y, direction and layer of named person

Code: [Select]
function KainTalk()
{
Talk("Kain Highwind", messagetexts[17]);
Delay(5000);
Talk("Kain Highwind", messagetexts[18]);
Delay(5000);
Talk("Kain Highwind", messagetexts[19]);
Delay(5000);
Talk("Kain Highwind", messagetexts[20]);
Delay(5000);
Talk("Kain Highwind", messagetexts[21]);
Delay(5000);
Talk("Kain Highwind", messagetexts[22]);
Delay(5000);
Talk("Kain Highwind", messagetexts[23]);
Delay(5000);
Talk("Kain Highwind", messagetexts[24]);
Delay(5000);
SetBlue();
}

Talk(); was one of the first things I coded (before I started designing my own msgboxes) when I started with Sphere 1.5. It came from the included help file. All I did to it was modify it so it did not require GetKey();

SetBlue(); gives the player the blue ring and changes the spriteset accordingly.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 07, 2017, 07:17:09 pm
When is GhostKain() called?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 07, 2017, 07:19:06 pm
When you interact with his actual body laying on the ground.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 07, 2017, 07:22:54 pm
Hmm... just looking at your code it doesn't seem like anything is amiss.  Does it behave the same way in miniSphere?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 07, 2017, 08:09:00 pm
Can't test in miniSphere... I tried.

Only a partial screencap. Trying to screencap the whole sequence kept causing an error to the header file of the gif. This is the on touch version where it only cycles the once.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 07, 2017, 08:38:06 pm
Another level I've been editing...

"Triforce Island" not it's offical name, just how I refer to it.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 08, 2017, 03:45:05 am
With the immense scope of this project:
Overworld, Underworld, Numerous levels(that range in size from small to gigantic), Hyrule Palace (plus others that are drawn out on paper and not sure if they're going to be implemented yet)

I'm starting to wonder, if upon game completion, I should produce a strategy guide.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 08, 2017, 10:34:19 am
I don't know, part of the charm of the original LoZ was that it was huge and easy to get lost in.  The fun was in finding your way.  It took me probably years to find Level 7 as a kid and now, as a result, it's the level I remember the most fondly. :smile:
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 08, 2017, 11:06:19 am
Don't get me wrong. I never had one either but they do exist.

Quote from: http://www.zeldalegends.net
Description:
This booklet was released as a supplement to "The Legend of Zelda." Sold separately, it offered more detailed descriptions and strategies than what was given in the game's manual. This is more than just a walkthrough: it's like a more detailed instruction manual.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 08, 2017, 12:29:57 pm
Damn, my latest animated gif is over 11megabytes. It's 757 individual frames. Videos were too large and now my gifs are starting to be comparable to the video sizes. I need to figure out a different method for certain things.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Chad Zechs on September 08, 2017, 12:47:08 pm
Damn, my latest animated gif is over 11megabytes. It's 757 individual frames. Videos were too large and now my gifs are starting to be comparable to the video sizes. I need to figure out a different method for certain things.
GIFV through Imgur?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 08, 2017, 01:20:35 pm
And now.... I've just coded a Zork reference into the game.  A few of the headstones now read "Lost in a maze of little twisty passages, all alike." or "Lost in a twisty maze of little passages, all alike." Along with the other possible variations.

Quote from: Chad Zechs
GIFV through Imgur?

DaVince had suggested that I look into a different video compression like WebM or MP4. I just haven't gotten around to it yet because the animated gifs were small and manigable. Now with this >11mb gif file, I guess I should look into it. I suppose GifV could be a possibility but I'd like to ability to create it locally and not rely on an outside webpage.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 08, 2017, 04:12:03 pm
On a side note: My phone gives the Underworld an almost 3D look to it.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 08, 2017, 05:37:33 pm
In coding one of the dungeon levels, I've come to realize that I have an issue I need to figure out.

Its the "Shutter" doors that open and close based upon whether you've killed all the enemies in the room.

I haven't done anything pertaining to enemies or a battle system yet, so just how do I code these doors to open and close?

Another perplexing piece of the puzzle that is ZeC...

Edit:  & I am currently without power so I can't do any coding until it comes back on.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 08, 2017, 06:15:32 pm
In coding one of the dungeon levels, I've come to realize that I have an issue I need to figure out.

Its the "Shutter" doors that open and close based upon whether you've killed all the enemies in the room.

I haven't done anything pertaining to enemies or a battle system yet, so just how do I code these doors to open and close?

Another perplexing piece of the puzzle that is ZeC...

Edit:  & I am currently without power so I can't do any coding until it comes back on.
You're going to need variables tracking how many enemies are alive in the room OR you could monitor how many entities are in the room and open when only 1 (if you destroy the entities when the enemies die) there are several other options, this won't be hard.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 09, 2017, 05:47:12 am
I've put the shutter doors on hold for the time being. I've been editing the routine for the triforce in the final room of each level that has a piece. In the original LoZ, the player would pick up the triforce, a new sound would play, the the screen would wipe to black from the left and the right, then link would appear outside of the dungeon level. Fancy screen wiping aside for the time being, my character picks up the triforce piece and then ignores all the other code and goes straight to warping the player out of the dungeon level.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 09, 2017, 08:43:02 am
Ugh, just went through a major overhaul of the ActivateDbug() I wrote some time back. Its basic function is to turn on/off my various Dbug scripts. Press 'Insert' turns on/off Dbug. Was functioning great. Somewhere along the way the functionality broke and the function was always in the "on" state. After, about an hour, hour & 1/2 (estimated), The ActivateDbug() is functioning as intended again.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 09, 2017, 10:31:15 am
Little things here & there... Just went through my overwold map and made a reference text file of all the locations. Shops, sword caves, hidden secrets, dungeon levels, etc... and came to realize I had no entrance for 1 of the 8 main levels.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 09, 2017, 03:26:08 pm
I need to figure out how to stop this from happening...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 10, 2017, 04:14:48 pm
I was trying out a random thought about how to code the ladder inside dungeon levels...

Right now all it does is draw the cooridnates on the screen. I would assume that the variables should be returning different values... they are not.

Basically, I'm trying to take the player x,y and convert them to the map x,y.

Is this not a way to accomplish that idea?

Keep in mind this is a test function and all "var" are currently just for testing.

Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 10, 2017, 04:41:46 pm
MapToScreenX/Y().  You can go in the reverse direction, too.

Edit: Sorry, I see you already knew about them...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 10, 2017, 05:04:38 pm
I know that in the screen cap I posted they are both using the playerX/Y values so MapToScreen is really doing no conversion at all which I would expect but shouldn't ScreenToMap be displaying a different value for the variables?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 10, 2017, 05:09:05 pm
By definition if MapToScreen(x,y) == (x,y) then the reverse is also true.

What exactly are you trying to do?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 10, 2017, 05:13:32 pm
I'm trying to design a general purpose ladder function that allows the player to pass over the water tiles.

ideally:

Get player X/Y
convert to mapX/Y
add or subtract based on direction
SetTile to ladder
player crosses tile
tile changes back to water

Edit: I originally started doing it with zones but that quickly got very messy and buggy. Player crossed tile and it would change back too early and player obsructed. In some instances, Tile wouldn't change back at all.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 10, 2017, 05:17:10 pm
GetPlayerXY() is already in map coordinates, you don't need to convert.  UNLESS, you're trying to get the tile-based coordinates, in which case the conversion is simple:

Code: [Select]
tileX = Math.floor(playerX / tileWidth);
tileY = Math.floor(playerY / tileHeight);
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 10, 2017, 05:23:43 pm
I don't even have to use the ScreenTo or the MapTo after all. It never even occurred to me to do it that way.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 10, 2017, 05:25:37 pm
I don't even have to use the ScreenTo or the MapTo after all. It never even occurred to me to do it that way.
The conversion is only needed if you're going to have something drawn in a render script that moves based on the coordinates of things on the map.

If you're going to use a person/entity and put it on the map then there's no conversion required.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 10, 2017, 05:31:19 pm
hmm, I wonder if that's why one of the other functions I put on hold wasn't responding correctly. I'll have to go back to it and perhaps re-edit the code.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 10, 2017, 05:37:23 pm
Just one of the screwed up ladder zones...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 10, 2017, 05:38:25 pm
In general, MapToScreen and its inverse correct for scrolling.  Your maps don't scroll because they're smaller than the screen, so the conversion functions do nothing.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 10, 2017, 05:47:01 pm
Well, these maps don't but I do have 2 maps that are larger than the screen. My "Hyrulian Outpost". It's an indoor map with a bunch of different rooms that all link to one another on the map. It is laid out, however, in a way that you can't see one room to the next even if the map scrolls some. The other map is outside of the Hyrulian Palace map. That's all one map and large compared to the rest of my other maps. It is the equivalent of a 3x3 section of Hyrule (768x528).
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 10, 2017, 05:58:52 pm
Oh, make that 3 maps. The whirlpool is a different map that spans all of Hyrule that i use for panning across the land. That map is huge in comparison @ 4096x1232.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 11, 2017, 06:28:00 am
The ladder function is progressing. Right now, it is setting the tile back to a water tile too soon causing the player to become obstructed. I'm trying to set it so that does not occur but my math appears incorrect due to the fact that the py and pxy2 (temp var used for dbug) keep updating together.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 11, 2017, 10:22:29 am
Somehow, I've just broken all functionally of the ladder coding...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on September 11, 2017, 10:40:20 am
Yeowch! Hope you have an easy way to revert that.

I wonder if you could just check if the ladder is present, and if so, detect how many pixels away from it the player is. If it's > tileWidth pixels away from it in any direction, it could safely disappear.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 11, 2017, 10:53:37 am
How does the base of a spriteset interact with a zone? Does the middle base have to be in the middle of a zone? Can any part of the base be in any part of the zone?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 11, 2017, 11:01:35 am
Here's the zone handling code in miniSphere:
https://github.com/fatcerberus/minisphere/blob/v4.8.5/src/minisphere/map_engine.c#L2839-L2856

Basically, the engine calls GetPersonXY() and checks whether those values are inside the zone.  Based on a quick check of the spriteset code here:
https://github.com/fatcerberus/minisphere/blob/v4.8.5/src/minisphere/spriteset.c#L552-L554

PersonXY refers to the center of the sprite base.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 11, 2017, 11:41:53 am
There's a little refining that needs to be done to the coding..
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 12, 2017, 10:45:28 am
None of my animated gifs from the PowerBracelet on are functioning in the forums, whereas they all function on my side, on multiple platforms... Does this .webm function?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 12, 2017, 10:54:42 am
Not on the forums, but I can play it locally (after installing VLC anyway).
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 12, 2017, 10:58:41 am
What is a good format for the forums? If my animations are no longer functioning.. is there any format that could be used that wouldn't involve the file having to be downloaded?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 12, 2017, 08:44:02 pm
Every time I look at the Overworld map, I find things that need to be touched up. You can tell the map segments I did first by all the straight lines. Went through an edited about 20 different maps (rough estimate, I lost count.) Created some new tiles to match some spots that were in need of editing.

Created a Spriteset for Setzer's Airship, "The Blackjack" to create a cutscene where during the invasion of Hyrule by Gannon and his forces, Setzer and other characters from Final Fantasy 3(VI) arrive to aid in the battle. The airship gets hit with a fireball from Gleeok (2 headed dragon) and crashes in the desert. Created maps for the ruins of the airship.

Trying to find a suitable sound file of footsteps for particular map changes. So far, I haven't really found anything that I can use in the game.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on September 13, 2017, 04:47:15 am
Oh, I was wondering why the gifs were no longer animating. I have no clue why that happens...

I'm going to have to look into making something that makes videos embeddable.

Edit: I can make YouTube videos embeddable automatically, but something tells me you'd rather upload the file here and have it show up.

There's also a forum addon which allows you to embed HTML5 video (like WebM), but the process seems to be roundabout: upload file and post; copy uploaded WebM link, edit post and paste link with special [ html5video ] tags around it. Maybe I can edit that addon so it doesn't need the tags, when I find the time.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 13, 2017, 05:00:38 am
Oh, I was wondering why the gifs were no longer animating. I have no clue why that happens...

I'm going to have to look into making something that makes videos embeddable.

I zipped the few that wouldn't function...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 13, 2017, 05:19:14 am
Edit: I can make YouTube videos embeddable automatically, but something tells me you'd rather upload the file here and have it show up.

There's also a forum addon which allows you to embed HTML5 video (like WebM), but the process seems to be roundabout: upload file and post; copy uploaded WebM link, edit post and paste link with special [ html5video ] tags around it. Maybe I can edit that addon so it doesn't need the tags, when I find the time.

I haven't had a web hosting service for years. I've been thinking about operating a personal web server again for image hosting and the such. Youtube and other similar sites are too much of a hassle just to post a 16 second video.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on September 13, 2017, 05:26:45 am
Imgur used to be great for this, as it's literally drag and drop -> copy forum embed code, but they disabled hotlinking some time ago so it's no longer a feasible option either.

One issue here is that the forum system ElkArte just isn't made to deal with some newfangled HTML5 stuff right out of the box either, or uploading a video would have it display the video right here, without having to do anything else.

I'll be installing the webm embedder add-on, and will check later what we can do to make it easier to use.

Edit:
Welp, it doesn't work. Sigh. Sorry for all this.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on September 13, 2017, 05:52:41 am
Test:

It works!
Okay, the problem was that some time ago I enabled the "Re-encode potentially dangerous image attachments" option in ElkArte, for obvious reason. Apparently, this breaks animated gifs entirely. Had to disable it again, oh well.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 13, 2017, 06:08:20 am
Quote from: imgur.com
...Also, don't use Imgur to host image libraries you link to from elsewhere, content for your website, advertising, avatars, or anything else that turns us into your content delivery network....

you grant Imgur a non-exclusive, royalty-free, perpetual, irrevocable worldwide license (with sublicense and assignment rights) to use, to display online and in any present or future media, to create derivative works of, to allow downloads of, and/or distribute any such file or content.

If I take the time and effort to create something from nothing, I want to retain ownership of it. Most people don't read the fine print and just post things. I am very meticulous when it comes to my creations.

Quote from: DaVince
It works!
Okay, the problem was that some time ago I enabled the "Re-encode potentially dangerous image attachments" option in ElkArte, for obvious reason. Apparently, this breaks animated gifs entirely. Had to disable it again, oh well.

Interesting, Why whould an animated gif be viewed as  a "potentially dangerous image attachment"?

The image you chose to post for your test makes me realize I need to refine that code a little. In my beta testing the player is wearing the blue ring. However, when you get to that point in the game Kain gives you the blue ring.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on September 13, 2017, 06:29:33 am
Fair enough, about the ownership thing. It didn't seem to matter much to me for little preview pics. But yeah, that first clause you pasted is exactly what changed between it being a feasible host and it no longer being that anyway.

Interesting, Why whould an animated gif be viewed as  a "potentially dangerous image attachment"?
My guess is things like this: https://www.phpclasses.org/blog/post/67-PHP-security-exploit-with-GIF-images.html
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 13, 2017, 07:37:52 am
My guess is things like this: https://www.phpclasses.org/blog/post/67-PHP-security-exploit-with-GIF-images.html

Interesting, I had no idea that a gif image could potentially have php code in it.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 13, 2017, 07:52:53 am
Fair enough, about the ownership thing. It didn't seem to matter much to me for little preview pics.

Granted, it may not seem like much because they are small little animated images that play for just a few seconds. Yet, they represent a depiction (a time scaled version) of what could be minutes to hours of time spent in production (Coding, Plot writing, Graphic Design (granted the sprites are not originally created by me but having to recreate them at smaller sizes), etc...) for me.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 13, 2017, 09:15:46 am
Back on Topic: I created a map composed of all Hyrule specifically for in game cutscenes. For the other ones I've designed the map functions well. I've made a backup of it and am editing that one for the arrival of Setzer in Hyrule. In the original version, the Airship appeared to close to the ground. I've been attempting to rescale the map to give the appearance that the Airship is high above in the air. So far, my attempts make Hyrule look blah... any suggestions?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 13, 2017, 10:49:07 am
I'd really like to use Setzer's Airship "The Blackjack", however, if I am unable to come up with a solution to my map scaling issue perhaps I could use "The Enterprise". It is from the wrong game though. "The Enterprise" was from Final Fantasy 2.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 13, 2017, 11:36:25 am
Opinion Poll:

Which do you like more?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Chad Zechs on September 13, 2017, 12:09:30 pm
Hmmm... It's kinda cool with the viney-leafy bits coming off it. I'm voting for the leafy Wood Sword.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 13, 2017, 12:31:48 pm
When you upgrade to the normal sword, the Old Man states "Take this sword with you. I'm sure it will be better than that twig..."
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 13, 2017, 02:50:23 pm
Gorram....

The pain that this was to get functioning in both directions...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 13, 2017, 03:55:31 pm
Cleaned up the Overworld map considerably.

Just a few examples...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 13, 2017, 05:29:08 pm
In the original Legend of Zelda, when Link walks to a different map the map scrolls on to the screen. If he walks south the map scrolls from bottom to top. If he walks west the map scrolls from left to right.

Can a map itself be coded to scroll onto the screen. ChangeMap() just changes the map, nothing fancy just heres the map. Is this a functionality that is possible with sphere or minisphere?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 13, 2017, 05:44:41 pm
It can be done but it's not trivial.  @Radnen would be the person to ask about that, his Blockman game had the Zelda-like scrolling effect I think.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 13, 2017, 06:24:06 pm
I'm beta testing level 4. One room example has doors on the Northern and Southern walls. The room to the north has all 4 doors. When, I move from one room to the next, the Western and Eastern doors just appear. I was trying to figure out a smoother way to transition between rooms. I thought, maybe, the LoZ way might prevent that from occurring. For the time being, I put a short FadeOut() in to my map exits coding. I'll add a fancy room transition to the task list...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 13, 2017, 08:19:20 pm
Hmm my sphere v2 map engine could easily make a map scroll onto the screen, doing it with the v1 map engine is trickier.

Assuming you just want to slide the specific map the map engine is currently handling, roughly you could:
a) set up a variable var map_image;
b) Have a loop using UpdateMap() and RenderMap() to process the map and draw it to the buckbuffer
c) also in the loop do map_image = GrabImage(0, 0, GetScreenWidth(), GetScreenHeight());
d) you may wish to clear the screen (e.g. by drawing a black rectangle)
d) use map_image.blit(x,y); to draw the map, you'd move the x/y to get it where you want it - you'd then need a FlipScreen() to draw it.

Alternatively you may be able to do this as a renderscript something like this:

Code: [Select]
var map_image;
var w = GetScreenWidth();
var h = GetScreenHeight();
var black = CreateColor(0,0,0);
var x = 0;
var y = -h;
function sliding_map()
{
  map_image = GrabImage(0, 0, w, h);
  Rectangle(0, 0, w, h, black);
  map_image.blit(x, y);
  ++y;
  if(y ==0)
  {
    SetRenderScript("");
  }
}
SetRenderScript(sliding_map);
(note this is totally untested);
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 13, 2017, 09:00:07 pm
Link in Setzer's airship.

@Rhuan I'll test that piece of code in a little while and let you know if it functions.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 13, 2017, 09:03:48 pm
Looking back it I'm nervous about variable scoping - the RenderScript probably gets called in a different context to wherever it's set up so you may have to make all of the variables it uses global, then just reset the y coordinate and set the script when you're ready for it.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 13, 2017, 09:22:42 pm
Quote from: Rhuan
Code: [Select]
var map_image;
var w = GetScreenWidth();
var h = GetScreenHeight();
var black = CreateColor(0,0,0);
var x = 0;
var y = -h;
function sliding_map()
{
  map_image = GrabImage(0, 0, w, h);
  Rectangle(0, 0, w, h, black);
  map_image.blit(x, y);
  ++y;
  if(y ==0)
  {
    SetRenderScript("");
  }
}
SetRenderScript(sliding_map);

Looking back it I'm nervous about variable scoping - the RenderScript probably gets called in a different context to wherever it's set up so you may have to make all of the variables it uses global, then just reset the y coordinate and set the script when you're ready for it.

From the above code: w, h, black are already defined as global vars. I have a global_constants.js. It's the first script I evaluate after the two system scripts I use. Many of my functions pull variables from it regularly. I have the w & h defined in it at GW, GH. A large portion of my x, y values are on a per function basis. Unless I need absolute positioning, they are mostly just calculations of GW & GH.

Also, since I've added in the player_info() at the bottom of the screen my maps are not the full screen height. There is a 4 tile gap between the map and GH. That would probably make the h value an absolute.

Edit: I guess you could call it a personal preference but my "black" is not true black. I use no true black anywhere. Everything in the tiles and spritesets that was 0,0,0 is all 10,10,10.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 07:24:34 am
@Rhuan I've been testing that code. It sort of functions. See attached image.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 08:54:37 am
This is perplexing me. The map slide functions once in any given direction. I've been at this for over an hour. I just don't understand why it responds differently on a second processing of the code.

Edit: replaced example with more detailed example.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 12:25:31 pm
Put the map sliding function into inEdit.js for later recoding. Been getting the levels arranged in their proper locations on the Overworld map. Refined Setzer's level... *Note: Secret passageways not included on map.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Chad Zechs on September 14, 2017, 03:50:15 pm
Out of boredom I made a fanart mockup esque type dealy of the ship casino room in a more Zelda 1 form. I like spriting so it's fun to do once in a while.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 14, 2017, 03:53:26 pm
This is perplexing me. The map slide functions once in any given direction. I've been at this for over an hour. I just don't understand why it responds differently on a second processing of the code.

Edit: replaced example with more detailed example.
Without seeing the code you've actually used I can't tell you what the issue is but at a quick guess it looks like the relevant x/y variables are being set incorrectly when the function is first called.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 05:19:30 pm
Out of boredom I made a fanart mockup esque type dealy of the ship casino room in a more Zelda 1 form. I like spriting so it's fun to do once in a while.

Not too bad. However, I am using the actual "Blackjack" as depicted below.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Chad Zechs on September 14, 2017, 05:28:08 pm
Not too bad. However, I am using the actual "Blackjack" as depicted below.

I did it simply to ease my brain. Seeing NES Link in FF6 graphics did the brain a hurt.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 05:28:17 pm
This is perplexing me. The map slide functions once in any given direction. I've been at this for over an hour. I just don't understand why it responds differently on a second processing of the code.

Edit: replaced example with more detailed example.
Without seeing the code you've actually used I can't tell you what the issue is but at a quick guess it looks like the relevant x/y variables are being set incorrectly when the function is first called.

Even your initial code responded that way. Would function once then not process the same way again.
All I did was copy the sliding map function into my inEdit.js, corrected a typo, and added the SetRenderScript to the end of one of my map exit functions. Perhaps, something with the map exit is causing the sliding map to respond that way but I don't think it should be affecting it. I'll post a code snippet shortly for you to look at.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 14, 2017, 05:33:37 pm
My initial one was a use once example - the x and y values need to be set differently depending which way you're sliding and the termination check needs to be different to.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 05:38:25 pm
Not too bad. However, I am using the actual "Blackjack" as depicted below.

I did it simply to ease my brain. Seeing NES Link in FF6 graphics did the brain a hurt.

What about seeing Setzer's Airship flying over hyrule? 

In part of the story Link finds a journal in an outpost depicting Setzer's arrival in Hyrule which I have been developing a "cutscene" for. Basically, Link finds the journal, screen fades to black, re-enters on the southern portion of Hyrule where the airship come in from off the screen. Flies over the outpost and heads west, while flying over the desert region a Gleeok (2 headed version) launches multiple fireballs at the airship where it is hit and crash lands in the desert.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 05:44:30 pm
My initial one was a use once example - the x and y values need to be set differently depending which way you're sliding and the termination check needs to be different to.

I did do some variations to it before saying "arrrrrrgh, I'll try coding this again later." Such as adding in a switch (dir) & then coding the cases accordingly. In every attempt (minimum 2 hours before coding something else) it went wonky. The video showed the results of my attempts. I got frustrated after a few hours. It's on my task list of things to do.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Chad Zechs on September 14, 2017, 06:00:39 pm
What about seeing Setzer's Airship flying over hyrule? 

In part of the story Link finds a journal in an outpost depicting Setzer's arrival in Hyrule which I have been developing a "cutscene" for. Basically, Link finds the journal, screen fades to black, re-enters on the southern portion of Hyrule where the airship come in from off the screen. Flies over the outpost and heads west, while flying over the desert region a Gleeok (2 headed version) launches multiple fireballs at the airship where it is hit and crash lands in the desert.

Actually I never found that one to be bothersome. It's a simple enough image that I never thought twice. Though I did react to the Enterprise better simply because of a less complicated colour scheme haha. I'm not judging, I like the story behind all this. I was just bored, on my lunch break, and wanted to see what I could come up to see if I could appease my pixel-ego.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 14, 2017, 06:02:58 pm
My initial one was a use once example - the x and y values need to be set differently depending which way you're sliding and the termination check needs to be different to.

I did do some variations to it before saying "arrrrrrgh, I'll try coding this again later." Such as adding in a switch (dir) & then coding the cases accordingly. In every attempt (minimum 2 hours before coding something else) it went wonky. The video showed the results of my attempts. I got frustrated after a few hours. It's on my task list of things to do.
To do it right you'd need a switch, probably 2 in fact.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 14, 2017, 06:18:37 pm
Come to think of it Radnen's sliding map transition got bugged in some recent miniSphere version and I haven't looked into what caused that regression yet...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 07:09:22 pm
@Rhuan Keep in mind that this is from like 2+ hours of going blind staring at the screen..
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 07:18:30 pm
What about seeing Setzer's Airship flying over hyrule? 

In part of the story Link finds a journal in an outpost depicting Setzer's arrival in Hyrule which I have been developing a "cutscene" for. Basically, Link finds the journal, screen fades to black, re-enters on the southern portion of Hyrule where the airship come in from off the screen. Flies over the outpost and heads west, while flying over the desert region a Gleeok (2 headed version) launches multiple fireballs at the airship where it is hit and crash lands in the desert.

Actually I never found that one to be bothersome. It's a simple enough image that I never thought twice. Though I did react to the Enterprise better simply because of a less complicated colour scheme haha. I'm not judging, I like the story behind all this. I was just bored, on my lunch break, and wanted to see what I could come up to see if I could appease my pixel-ego.

There was a secondary reason for turning the enterprise into a spriteset besides the map scaling issue. Setzer's Airship has no southern movement sprites. It can only go North, East & West which limits my creation for the cutscene. I'd prefer to use his and am attempting my cutscene with the limited directions. I've been thinking about the possibilty of leaving the enterprise in game. I have "The Tomb of Kain Highwind" and a whole interaction with his ghost coded. The headstones around his level are main characters from Final Fantasy 2(IV). The Enterprise could feasibly be the way they all got to Hyrule, unless I want to code in a flock of random Chocobos somewhere...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 07:33:34 pm
Come to think of it Radnen's sliding map transition got bugged in some recent miniSphere version and I haven't looked into what caused that regression yet...

If I can't get the sliding map to process in 1.5, I'll just have figure out some other way to smooth out the room transitions.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 14, 2017, 07:45:28 pm
The below should work unless there's a typo (it's untested)

In your version you weren't resetting the start points for the sliding yns or xns I think were your variable names - you set them once at the start but you needed to be resetting them in your exit map function; anyway I've set out how I'd do it below including the reset, and hopefully made it shorter/more efficient at the same time. Also I haven't used a v1 RenderScript in a while but I'm pretty sure you can apply them the way I have below, i.e. without making it a string by just passing the function name.

Code: [Select]
var w = 256;
var h = 176;
var s_h = 240;

var sliding_coords = [0,0];
var frozen_player_info;

/*move to another map
string direction = direction that you left the map in
int layer = new layer
map_object map = new map*/

function ExitMap(direction, layer, map)
{
  var Name = GetInputPerson();
  var p_coords = [GetPersonX(),GetPersonY()];
  LastMap = GetCurrentMap();  //used for Dbug
  RingCheck();  //Check to see if blue or red ring
  //assuming I have the coordinates right this will grab the player_info
  frozen_player_info = GrabImage(0,h,w,s_h-h);

  switch(direction)
  {
    case("north"):
      p_coords[1] = 168 - p_coords[1];
      sliding_coords = [0, -h];
      break;
    case("east"):
      p_coords[0] = 264 - p_coors[0];
      sliding_coords = [w, 0];
      break;
    case("south"):
      p_coords[1] - 184 = p_coords[1];
      sliding_coords = [0, h];
      break;
    case("west"):
      p_coords[0] = 264 - p_coords[0];
      sliding_coords = [-w, 0];
      break;
  }

    ChangeMap(map);
    //I assume Foo sets a layer so I have removed the SetPersonLayer call
    Foo(Name, p_coords[0],p_coords[1], GetPersonDirection(name),layer);
    FadeOut(200); // My temp solution for the room transitions

    SetRenderScript(SlidingMap);
}


//Renderscript for transitions
function SlidingMap()
{
  map_image = GrabImage(0, 0, w, h);
  Rectangle(0, 0, w, h, Black);
  map_image.blit(sliding_coords[0], sliding_coords[1]);
  frozen_player_info.blit(0,h);

  if(sliding_coords[0] > 0)
  {
    -- sliding_coords[0];
  }
  else if (sliding_coords[0] < 0)
  {
    ++ sliding_coords[0];
  }
  else if (sliding_coords[1] > 0)
  {
    -- sliding_coords[1];
  }
  else if (sliding_coords[1] < 0)
  {
    ++ sliding_coords[1];
  }
  else
  {
    SetRenderScript(player_info);
  }
}
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 07:59:24 pm
The below should work unless there's a typo (it's untested)

In your version you weren't resetting the start points for the sliding yns or xns I think were your variable names - you set them once at the start but you needed to be resetting them in your exit map function; anyway I've set out how I'd do it below including the reset, and hopefully made it shorter/more efficient at the same time. Also I haven't used a v1 RenderScript in a while but I'm pretty sure you can apply them the way I have below, i.e. without making it a string by just passing the function name.

Code: [Select]
var w = 256;
var h = 176;
var s_h = 240;

var sliding_coords = [0,0];
var frozen_player_info;

/*move to another map
string direction = direction that you left the map in
int layer = new layer
map_object map = new map*/

function ExitMap(direction, layer, map)
{
  var Name = GetInputPerson();
  var p_coords = [GetPersonX(),GetPersonY()];
  LastMap = GetCurrentMap();  //used for Dbug
  RingCheck();  //Check to see if blue or red ring
  //assuming I have the coordinates right this will grab the player_info
  frozen_player_info = GrabImage(0,h,w,s_h-h);

  switch(direction)
  {
    case("north"):
      p_coords[1] = 168 - p_coords[1];
      sliding_coords = [0, -h];
      break;
    case("east"):
      p_coords[0] = 264 - p_coors[0];
      sliding_coords = [w, 0];
      break;
    case("south"):
      p_coords[1] - 184 = p_coords[1];
      sliding_coords = [0, h];
      break;
    case("west"):
      p_coords[0] = 264 - p_coords[0];
      sliding_coords = [-w, 0];
      break;
  }

    ChangeMap(map);
    //I assume Foo sets a layer so I have removed the SetPersonLayer call
    Foo(Name, p_coords[0],p_coords[1], GetPersonDirection(name),layer);
    FadeOut(200); // My temp solution for the room transitions

    SetRenderScript(SlidingMap);
}


//Renderscript for transitions
function SlidingMap()
{
  map_image = GrabImage(0, 0, w, h);
  Rectangle(0, 0, w, h, Black);
  map_image.blit(sliding_coords[0], sliding_coords[1]);
  frozen_player_info.blit(0,h);

  if(sliding_coords[0] > 0)
  {
    -- sliding_coords[0];
  }
  else if (sliding_coords[0] < 0)
  {
    ++ sliding_coords[0];
  }
  else if (sliding_coords[1] > 0)
  {
    -- sliding_coords[1];
  }
  else if (sliding_coords[1] < 0)
  {
    ++ sliding_coords[1];
  }
  else
  {
    SetRenderScript(player_info);
  }
}

I will give that a try and let you know. My version of Foo(), the direction and layer are conditional. When I was placing objects on a map with only one layer it seemed kind of redundent to set the layer property.

Code: [Select]
function Foo(name, x, y, d, l)
{
 SetPersonX(name, x);
 SetPersonY(name, y);
 if (d) SetPersonDirection(name, d);
 if (l) SetPersonLayer(name, l);
}

That is Foo. A simple little function I use in a ton of places.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 14, 2017, 08:02:55 pm
SetPersonDirection isn't expensive, as you needed to set the layer anyway I just thought I'd use what was there.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 14, 2017, 08:13:09 pm
To clarify, the key thing you were missing before is what I'm doing with the sliding_coords, these need to be set each time you wish to do a transition - your version set them once as globals but never reset them - the transition render script overwrites these values with 0 when it's finished (which is how it knows it is done) so you have to set them again each time.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 08:16:15 pm
I've referenced Foo() a few times in the forum. Figured I post it. The first time I referenced it, I was told about SetPersonXYFloat() because the example I had posted was just using the x, y portion. My GenerateShop() function has soooo much Foo().
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 08:18:25 pm
To clarify, the key thing you were missing before is what I'm doing with the sliding_coords, these need to be set each time you wish to do a transition - your version set them once as globals but never reset them - the transition render script overwrites these values with 0 when it's finished (which is how it knows it is done) so you have to set them again each time.

That never even occurred to me because I was going off of your suggestion to set the variables globally. Resetting them never ever crossed my mind
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Chad Zechs on September 14, 2017, 08:59:26 pm
There was a secondary reason for turning the enterprise into a spriteset besides the map scaling issue. Setzer's Airship has no southern movement sprites. It can only go North, East & West which limits my creation for the cutscene. I'd prefer to use his and am attempting my cutscene with the limited directions. I've been thinking about the possibilty of leaving the enterprise in game. I have "The Tomb of Kain Highwind" and a whole interaction with his ghost coded. The headstones around his level are main characters from Final Fantasy 2(IV). The Enterprise could feasibly be the way they all got to Hyrule, unless I want to code in a flock of random Chocobos somewhere...

Send me the sprites and I'll see if I can pixel up some south facing ship magic.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 10:07:44 pm
@Rhuan Just did a quick count... I currently have 310 maps. To change them all at this point to use ExitMap() would entail roughly around 1200 edits in total. I am going to see if I can make some edits to use the map exit naming I already have in place.

Update: After setting up a seperate little sphere program to test and refine, the map scrolling is functioning very well. I recoded my current map exit directionals to incorporate your code. The ExitMap() function will be implemented for future maps. It's just the hours I forsee spending on editing my already existing maps...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 14, 2017, 10:14:35 pm
That's a great example of why I really dislike the .rmp map format feature of embedded scripts.  It makes it *really* difficult to edit things later, and encourages copying and pasting code between maps which is very bad if you end up with a bunch of maps and later discover a bug in the embedded code that affects all of them...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 11:22:03 pm
That's a great example of why I really dislike the .rmp map format feature of embedded scripts.  It makes it *really* difficult to edit things later, and encourages copying and pasting code between maps which is very bad if you end up with a bunch of maps and later discover a bug in the embedded code that affects all of them...

It wasn't so much of a bug but me not liking the transition that was occurring in my dungeon level maps. The transitions between map segments on the Overworld and Underworld maps were fine. If I wasn't being overly particular about it, my existing map exits were fine. However,  along the lines of your statement... I have a warp platform in one of my maps that is just a "return to" point. I can't remember what links to it. I thought to myself "I can just run a search on my js files for that map segment." I then realized that what ever point warps to that tile is stored in a map somewhere and there's no way to run a search to find the "return to" point. Having to open each map individually and examine the triggers or zone would be very time consuming. The Overworld and Underworld combined are currently 199 files with 6 or 7 left to create for the Underworld putting the total at 205 or 206. The epic scope of ZeC still continues to astound me. 2 worlds... 13 dungeons, the palace, the outpost...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 11:26:48 pm
There was a secondary reason for turning the enterprise into a spriteset besides the map scaling issue. Setzer's Airship has no southern movement sprites. It can only go North, East & West which limits my creation for the cutscene. I'd prefer to use his and am attempting my cutscene with the limited directions. I've been thinking about the possibilty of leaving the enterprise in game. I have "The Tomb of Kain Highwind" and a whole interaction with his ghost coded. The headstones around his level are main characters from Final Fantasy 2(IV). The Enterprise could feasibly be the way they all got to Hyrule, unless I want to code in a flock of random Chocobos somewhere...

Send me the sprites and I'll see if I can pixel up some south facing ship magic.

Here you go...

If you can create the southern directionals, I will be very impressed with your spriting skills.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 14, 2017, 11:29:25 pm
It wasn't so much of a bug but me not liking the transition that was occurring in my dungeon level maps. The transitions between map segments on the Overworld and Underworld maps were fine. If I wasn't being overly particular about it, my existing map exits were fine. However,  along the lines of your statement... I have a warp platform in one of my maps that is just a "return to" point. I can't remember what links to it. I thought to myself "I can just run a search on my js files for that map segment." I then realized that what ever point warps to that tile is stored in a map somewhere and there's no way to run a search to find the "return to" point. Having to open each map individually and examine the triggers or zone would be very time consuming. The Overworld and Underworld combined are currently 199 files with 6 or 7 left to create for the Underworld putting the total at 205 or 206. The epic scope of ZeC still continues to astound me. 2 worlds... 13 dungeons, the palace, the outpost...

In the future you should look into using persist.js (it's floating around here somewhere).  That would let you store your map and entity code in .js files rather than in the maps themselves, and let you manipulate entities outside the map that hosts them.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 14, 2017, 11:37:50 pm
Quote from: Fat Cerberus

In the future you should look into using persist.js (it's floating around here somewhere).  That would let you store your map and entity code in .js files rather than in the maps themselves, and let you manipulate entities outside the map that hosts them.

Doing a quick search of my dev folders finds that I have persist.js already. When I first started with Sphere I tried to download as many tutorials and demos I could find.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 15, 2017, 12:59:40 am
Update: The before and after versions of the Overworld.

Note: The very last row of tiles was removed in the image of the revised Overworld map for file size reduction. They do still exist on the actual map.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 15, 2017, 02:33:47 am
@Rhuan Just did a quick count... I currently have 310 maps. To change them all at this point to use ExitMap() would entail roughly around 1200 edits in total. I am going to see if I can make some edits to use the map exit naming I already have in place.
Three options:
a) could write a script to update the map scripts, would be an interesting exercise in data handling
b) you could set up a system to change your map scripts at runtime - would be fairly simple
c) make 4 functions with the old names that either redirect to my function after putting in the direction parameter or take the contents of my function and split it to only have the bit for their direction (getting rid of the switch)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 15, 2017, 03:00:28 am
b) you could set up a system to change your map scripts at runtime - would be fairly simple

This is what persist.js does, in fact.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on September 15, 2017, 06:22:56 am
If I understand things correctly, you have one map dedicated for every screen, right? You could actually use and depend on just the combined overworld map, put every single (overworld) screen on there, and use some clever coding to position the camera as well as spawn objects into and out of existence depending on what your current screen is.

It takes more coding, but it makes things like scrolling to the next map a cinch and it prevents you from having to maintain duplicates of every screen as well.

(If I didn't understand things correctly, excuse the mistake - I've been looking at the pictures and text more than actually downloading the scripts and code. :P )
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 15, 2017, 07:01:21 am
@Rhuan Just did a quick count... I currently have 310 maps. To change them all at this point to use ExitMap() would entail roughly around 1200 edits in total. I am going to see if I can make some edits to use the map exit naming I already have in place.
Three options:
a) could write a script to update the map scripts, would be an interesting exercise in data handling
b) you could set up a system to change your map scripts at runtime - would be fairly simple
c) make 4 functions with the old names that either redirect to my function after putting in the direction parameter or take the contents of my function and split it to only have the bit for their direction (getting rid of the switch)

I did c.

Code: [Select]
//Before
function NorthernExit(layer, map)
{
 var Name = GetInputPerson();
 var PX = GetPersonX(Name);
 var PY = GetPersonY(Name);
 var NewPY;

 NewPY = (176 - PY) - 8;
 
 LastMap = GetCurrentMap();  //used for Dbug
 RingCheck();  //Check to see if blue or red ring
 
 if (map) ChangeMap(map);
 if (layer >= 0) SetPersonLayer(Name, layer);
 Foo(Name, PX, NewPY) //Foo(name, x, y, dir, layer)
 FadeOut(200); // My temp solution for the room transitions
 
 SetRenderScript("SlidingMap()");
}

//After

function NorthernExit(layer, map)
{
 var Name = GetInputPerson();
 var p_coords = [GetPersonX(Name), GetPersonY()];

 p_coords[0] = 264 - p_coords[0];
 sliding_coords = [w, 0];
 
 LastMap = GetCurrentMap();
 RingCheck();
 
 frozen_player_info = GrabImage(0, h, w, s_h-h);
 
 ChangeMap(map);
 Foo(Name, p_coords[0], p_coords[1], GetPersonDirection(Name), layer);
 
 SetRenderScript(SlidingMap);
}
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 15, 2017, 07:03:08 am
b) you could set up a system to change your map scripts at runtime - would be fairly simple

This is what persist.js does, in fact.

I am reading the Wiki page about it
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 15, 2017, 07:33:07 am
If I understand things correctly, you have one map dedicated for every screen, right?

Each map is 16 tiles x 11 tiles. The Overworld & Underworld, as examples, are composed of 112 maps. They are both 16 maps x 7 maps.

Quote
You could actually use and depend on just the combined overworld map, put every single (overworld) screen on there, and use some clever coding to position the camera as well as spawn objects into and out of existence depending on what your current screen is.

I actually, recently, created a map just like that. I took all of my individual map images (used to create the combined overworld image in one of the above posts), converted each one to a tileset, combined all of the tilesets into 1 file and created a map of all of Hyrule.

The whirlpool function I created uses that map. I've also started using it to develop the cutscene involving Setzer's airship. I do plan on using it more in other functions as well.

Quote
It takes more coding, but it makes things like scrolling to the next map a cinch and it prevents you from having to maintain duplicates of every screen as well.

(If I didn't understand things correctly, excuse the mistake - I've been looking at the pictures and text more than actually downloading the scripts and code. :P )
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 15, 2017, 04:34:07 pm
I've been thinking about how all the levels in the original LoZ fit together into one map. I created this mockup with that thought in mind. The mockup image is not complete. It is missing, at minimum, 3 dungeon levels. The rooms are just a ProtoRoom for development purposes and the levels in no way connect with doors as they do in the image. The colors are to tell the difference between the levels.

Thoughts? Opinions? Suggestions?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on September 16, 2017, 08:54:11 am
I like the zec text and the little heart-like dungeon! The other shapes seem kinda undefined which gives you plenty of opportunity to move things around,

If you move the zec dungeons to the left more, you end up with more flexibility on the right side of the large map. Also, if you remove/rework the rightmost two tiles of the gray dungeon, this gives you more space to place a dungeon at the bottom right/general right side.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 16, 2017, 10:00:48 am
I like the zec text and the little heart-like dungeon!
Heart? Do you mean the skull? Death Mountain.

Quote
The other shapes seem kinda undefined which gives you plenty of opportunity to move things around,

If you move the zec dungeons to the left more, you end up with more flexibility on the right side of the large map.

Moving levels around is a possibilty, although the mockup is still missing (turns out to be) 4 maps. I'm creating ProtoLevel images of them now...

Quote
Also, if you remove/rework the rightmost two tiles of the gray dungeon, this gives you more space to place a dungeon at the bottom right/general right side.

I didn't realize it when I first created the mockup but what you refer to as "the grey dungeon" is actually 2 seperate dungeons. The color difference between them is a very suttle change and makes it hard to tell them apart. They are in fact, Setzer's Tomb & Kain's Tomb as depicted below.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 16, 2017, 10:09:04 am
Also, One of the missing dungeons is huge. I have no idea, currently, where I would even place it on the mockup. It is below.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 16, 2017, 02:32:58 pm
@DaVince Going through my Sphere Tutorials folder I found your Mode7map program. I think it might just be the solution I was looking for to create my cutscene with Setzer's airship.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on September 16, 2017, 03:23:10 pm
Nice to see a little demo become useful! I thought that demo was broken in miniSphere though, so that might need a fix...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 16, 2017, 03:25:30 pm
oh, I'll have to test that. I only tried it in 1.5

Edit: Doesn't function the say way in miniSphere... attempting to see what I can do
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 16, 2017, 03:31:32 pm
Had a quick glance, looks to me like it should work it's just GrabImage and transformBlit I've used both of those in miniSphere.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 16, 2017, 03:51:54 pm
If it's broken I can look into it.  Is the mode7 demo in the downloads repo?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 16, 2017, 03:57:45 pm
If it's broken I can look into it.  Is the mode7 demo in the downloads repo?
It is in the downloads repo as part of "Collection of test games" It's literally just this though:

Code: [Select]
//THE MODE7 EFFECT
//Set it as a renderscript to see it in action!
//(note: sprites are stretched by the effect too!)

var MapImage;

var x1;
var x2;
var y1;
var y2;

//Modify x1 and x2 to change the top blit map x position. Not recommended.
//Modify x3 and x4 to stretch the map more. Make 30 bigger to strech more, and smaller to stretch less.
//If x1 and x2 == x3 and x4 then the map will blit like it would normally show.
x1 = 0;
x2 = GetScreenWidth();
x3 = GetScreenWidth()+50;
x4 = -50;

//Modify both y1 and y2 to change the height from the top of the mode7 map.
//Modify y3 and y4 to change the height from the bottom.
y1 = 0;
y2 = 0;
y3 = GetScreenHeight();
y4 = GetScreenHeight();

var black = CreateColor(0,0,0);



function WorldmapEffect()
{
MapImage = GrabImage(0, 0, GetScreenWidth(), GetScreenHeight());

//Before we start, cover the original map with black
//Turned off by default, but turn it on if you'll need to stetch maps so the old unedited map doesn't
//Show under it. Note that the effect then will be slightly slower and won't work on the DirectX driver.
//Rectangle(0,0,GetScreenWidth(),GetScreenHeight(), black);

MapImage.transformBlit(x1, y1, x2, y2, x3, y3, x4, y4);

//Draw the REAL sprite on the screen.
//var frame =
//RealSprite.images[].blit(160, 120);
}
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 16, 2017, 04:14:15 pm
Had a quick glance, looks to me like it should work it's just GrabImage and transformBlit I've used both of those in miniSphere.

You can see how it functions in minisphere. I think it may just need adjusting of the various x, y values. I'm attempting a variety of values to see if I can get it to display properly.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 16, 2017, 05:03:43 pm
After many different attempts, it still has that warping effect to it.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 16, 2017, 05:16:29 pm
In miniSphere the map is being drawn as 2 triangles - you're crossing the boundary between the two hence the warping effect.

Hmm interesting problem.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 16, 2017, 05:45:12 pm
I'm afraid I think that will likely be a problem with any use of transformBlit to distort (i.e. change the size unequally) a shape in miniSphere.

Whilst I can't think of a way to fix that with sphere v1 functions without editing miniSphere's internals the below sphere v2 (i.e. miniSphere only) code should do what you want, though not as a render script:

1. turn on the effect.
Code: [Select]
var wh = screen.width / 2;
var hh = screen.height / 2;
screen.transform = new Transform()
    .translate(-wh, -hh)
    .scale(4 / wh, 4 / wh)//change the 4 to a different number to make the screen bigger or smaller
    .translate(0, 0, -1.0)
    .rotate(15, 1.0, 0.0, 0.0)

    .project3D(120, wh / hh, 0.1, 2.0);

2. turn off the effect
Code: [Select]
screen.transform.identity();

(All credit for the above should go to Fat Cerberus)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 16, 2017, 10:53:47 pm
I'm think for right now, I'm going to put the Airship cutscene on my Task List until more of the game is complete. For the time being, I've been turning the level images into actual maps. Right now, I'm coding a multipart secret unlock function.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 16, 2017, 11:59:43 pm
Haven't test this with minisphere yet...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 17, 2017, 12:11:38 am
Regarding that Mode7 demo: the warping effect is present in Sphere 1.5 too when using the sphere_gl plugin.  Noticing a pattern with these yet? ;)

I'm not sure if there's a way to fix it, as modern GPUs draw things as triangles.  I'll keep it in mind.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 17, 2017, 12:30:30 am
Regarding that Mode7 demo: the warping effect is present in Sphere 1.5 too when using the sphere_gl plugin.

Because of the issues I had with the video before I added the PCIe card, I never even attempted using the gl.  I've just always had it set to standard32.

Edit: Just attempted it. The mode7 idea was a good thought but I suppose not very feasible.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on September 17, 2017, 03:11:23 am
Could the Mode7 demo displaying like that have anything to do with perspective correction (http://graphics.stanford.edu/courses/cs248-98-fall/Lectures/lecture18/slides/walk014.html)? It looks very similar to it.

That said, I'm just doing a basic transform, no fancy 3D...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 17, 2017, 03:47:09 am
Regarding that Mode7 demo: the warping effect is present in Sphere 1.5 too when using the sphere_gl plugin.

Because of the issues I had with the video before I added the PCIe card, I never even attempted using the gl.  I've just always had it set to standard32.

Edit: Just attempted it. The mode7 idea was a good thought but I suppose not very feasible.
Try the v2 code I posted above - will only work in miniSphere but should not have any warping effect.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 17, 2017, 06:07:09 am
Try the v2 code I posted above - will only work in miniSphere but should not have any warping effect.

It is saved to inEdit. I have a side program for testing various things. I'm going to test it in that at some point over the course of today.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 17, 2017, 11:51:14 am
Started to redesign my MapRef() to include individual dungeon functionality for when the player finds that level's map & compass.

And broke the whole gorram thing. The game won't even load now and freezes before the debugger can even load to find an error. Good thing I made a backup of the functioning code before I attempting to edit it.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 17, 2017, 03:13:45 pm
Made some major progress with my MapRef(). It already showed the player's  location on the overworld & underworld maps. Now, when you enter a dungeon level, the worldmap is replaced with a blank space. When you collect that levels map, it gets drawn in the blank area and shows your location in the dungeon. When you leave the dungeon the level is again replaced with the worldmap. I have not coded in the functionality yet to display the triforce piece on the map when the player locates the compass. I was in the process of entering in the different room coordinates for level 2 when my power went out...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 17, 2017, 03:41:33 pm
I know you restored your backup already, but in the future if you lock up it's usually because your code got into an infinite loop somehow.  If you're using the debugger you should be able to press the Pause button on the toolbar to break out and see where it's stuck.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 17, 2017, 03:56:39 pm
Once I restored the functioning code, I started to try a different idea to code the MapRef(). The second attempt didn't cause the game to crash on startup & the debugger was very much a help while implementing the added functionality.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 17, 2017, 07:18:40 pm
@Fat Cerberus While testing some changes I made, I bumped into one of the armos statues in the underworld which uses a different code then the overworld statues. The debugger stopped the game with an "illegal path". My code had a leading "/" on the rss path. The debugger has become a very useful tool. I never would have found that error using 1.5.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 17, 2017, 07:39:03 pm
@Fat Cerberus While testing some changes I made, I bumped into one of the armos statues in the underworld which uses a different code then the overworld statues. The debugger stopped the game with an "illegal path". My code had a leading "/" on the rss path. The debugger has become a very useful tool. I never would have found that error using 1.5.

The very first thing I did after I found out Duktape had a built-in debugger was to start looking at how I could implement it in miniSphere.  I wished that Sphere 1.5 had something like it for years.  The number of hours I lost hunting down stubborn bugs in my own code that something like SSj Blue would have lit up with a neon sign in a few seconds... it's insane to think about.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 18, 2017, 12:54:02 am
No doors are currently coded in...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 18, 2017, 01:39:38 am
I am attemping to combine the Map and Compass values for each level for the MapRef().

In theory:
Code: [Select]
var MapCompass = [];
MapCompass[0] = [false, false, x, y];

Would the following be a valid statement?
Code: [Select]
if (MapCompass[0][0] == true && MapCompass[0][1] == true) image.blit(MapCompass[0][2], MapCompass[0][3]);
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 18, 2017, 01:47:05 am
That's a really awkward use of arrays there.  You could use an object instead:

Code: [Select]
var MapCompass = [];
MapCompass[0] = { haveMap: false, haveCompass: false, x: x, y: y };

Code: [Select]
if (MapCompass[0].haveMap && MapCompass[0].haveCompass)
    image.blit(MapCompass[0].x, MapCompass[0].y);

Object literals are basically the best thing about JS and the main reason I fell in love with it.

Also: You don't need to explicitly compare against true in an if statement, the comparison is implied.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 18, 2017, 02:00:31 am
That's a really awkward use of arrays there.  You could use an object instead:
That's why I asked before trying to code anything like that. It seemed logical but that's that fuzzy logic...
Quote
Code: [Select]
var MapCompass = [];
MapCompass[0] = { haveMap: false, haveCompass: false, x: x, y: y };

Code: [Select]
if (MapCompass[0].haveMap && MapCompass[0].haveCompass)
    image.blit(MapCompass[0].x, MapCompass[0].y);

Object literals are basically the best thing about JS and the main reason I fell in love with it.
An object would be much easier to manipulate and remember just what it is you're coding. Looking at the syntax I posted, it would most likely get very confusing after awhile.
Quote
Also: You don't need to explicitly compare against true in an if statement, the comparison is implied.
Good to know. For a long time, I hardly ever used true/false. I always coded with 0/1. One of my old college professors was always fond of saying "its either on or its off."
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 18, 2017, 12:05:09 pm
Seeing NES Link in FF6 graphics did the brain a hurt.

@Chad Zechs Brain a little less hurt?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Chad Zechs on September 18, 2017, 12:51:55 pm
Seeing NES Link in FF6 graphics did the brain a hurt.

@Chad Zechs Brain a little less hurt?

Haha y'know I was thinking of that too. Have him metamorph into aLttP link when he enters the ship. Me likey.

Also, I haven't had a chance to hit my head against the front of the ship but I've sketched out an idea. Hopefully I'll have something for you this week (regardless of if you'll need it, I'm intrigued to try)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 18, 2017, 01:24:27 pm
Seeing NES Link in FF6 graphics did the brain a hurt.

@Chad Zechs Brain a little less hurt?

Haha y'know I was thinking of that too. Have him metamorph into aLttP link when he enters the ship. Me likey.

Also, I haven't had a chance to hit my head against the front of the ship but I've sketched out an idea. Hopefully I'll have something for you this week (regardless of if you'll need it, I'm intrigued to try)

No rush. I posted a partial section of my tasklist in the sphere studio thread. There is still much core functionality to code before really getting into the creation of the cutscene. That's going to takes some time to edit, especially with the 2 headed Gleeok attack that I have planned.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 18, 2017, 03:43:21 pm
huh? Very simple. If x = 39 destroyperson... why the is he still there when his x = 39?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 18, 2017, 04:06:48 pm
huh? Very simple. If x = 39 destroyperson... why the is he still there when his x = 39?
That looks like a script that runs once? If yes - the commands to move are queued then the condition is checked (he won't have moved yet so I assume the condition returns false) then the movement commands execute.

Movement commands do not happen during script execution - in general, sphere is entirely single threaded, at any given time only one thing can be happening.

Options:
1. Simple option you could use QueuePersonScript to queue destroying the person - this would trigger as soon as the movement queue emptied - no reason to put in a condition check it would just be when he stopped moving.

2. You could put the condition check and DestroyPerson command into the update script - though this seems excessive for a one time event.

3. you could put a loop into the script that does:
Code: [Select]
while(GetPersonX('OldMan') !=39)
{
  UpdateMap();
  RenderMap();
  FlipScreen();
}
DestroyPerson("OldMan");
UpdateMap and processes the movement queue and Render Map draws the map - a loop like this basically runs the map engine during your script, if you want to have other things happen after the Old Man finishes moving this another way to do it. (Though simply using QueuePersonScript("Old Man", "DestroyPerson('Old Man');", false); may be easier.)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 18, 2017, 04:34:58 pm

huh? Very simple. If x = 39 destroyperson... why the is he still there when his x = 39?
That looks like a script that runs once? If yes - the commands to move are queued then the condition is checked (he won't have moved yet so I assume the condition returns false) that then the movement commands execute.
In LoZ certain npcs just vanish after you talk to them. I thought hey, lets move him to the stairs first, that way it looks like left the room. Yeah, It occurs once, in Level3.

Quote
Movement commands do not happen during script execution - in general, sphere is entirely single threaded, at any given time only one thing can be happening.

Options:
1. Simple option you could use QueuePersonScript to queue destroying the person - this would trigger as soon as the movement queue emptied - no reason to put in a condition check it would just be when he stopped moving.

I'm having some sort of buggy reactions when  QueuePersonScript.

That's interesting, there seems to be a bug in Sphere 1.5's handling of queued person scripts from the looks of things.  Not sure what's wrong yet, I can look into that later.

I'm not really sure why. My CollectTriforce() (posted in sphere vs minisphere) uses the QueuePersonScript. I thought from Fat Cerberus's comment it was limited to 1.5 however, the other night, minisphere started to react in the same way.
Quote
2. You could put the condition check and DestroyPerson command into the update script - though this seems excessive for a one time event.

3. you could put a loop into the script that does:
Code: [Select]
while(GetPersonX('OldMan') !=39)
{
  UpdateMap();
  RenderMap();
  FlipScreen();
}
DestroyPerson("OldMan");
UpdateMap and processes the movement queue and Render Map draws the map - a loop like this basically runs the map engine during your script, if you want to have other things happen after the Old Man finishes moving this another way to do it. (Though simply using QueuePersonScript("Old Man", "DestroyPerson('Old Man');", false); may be easier.)
The only thing that happens after the npc uses the stairs is a paricular door in the level gets unlocked.

I can try the QueuePersonScript with this npc but with the one in CollectTriforce() becoming unresponvise...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 18, 2017, 04:52:34 pm
My read of your other topic was that it was the Delay that wasn't working, not the QueuePersonScript, that aside if you don't want to use QueuePersonScript, then use the loop method.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 19, 2017, 04:50:36 am
My read of your other topic was that it was the Delay that wasn't working, not the QueuePersonScript

CollectTriforce();
QueuePersonScript("Triforce", "LevelComplete(x,y,map)", false);

Upon much testing in both sphere & minisphere, the queued LevelComplete does function. It has something to do with CollectTriforce. In sphere the sound plays and levelcomplete() gets called but it isn't changing the location of the triforce and the player. In minisphere it functions sporadically, sometimes the location will be updated, sometimes it won't.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 19, 2017, 09:09:47 am
Set a breakpoint at the top of CollectTriforce() (press F9) and then start the debugger.  Then you can step through it line by line to see where it goes wrong.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 19, 2017, 10:11:35 am
Interestingly, I set the breakpoint, run the debugger and tested it in the Triforce rooms for Levels 1 thru 5. It functioned correctly each time.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 19, 2017, 01:42:03 pm
I tested each individual Triforce room currently created 10 times each. CollectTriforce() functioned each time in miniSphere. In sphere, however, the function would skip past relocating the Triforce and the player but process playing the sound and the rest of the function.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 19, 2017, 02:47:14 pm
I tested each individual Triforce room currently created 10 times each. CollectTriforce() functioned each time in miniSphere. In sphere, however, the function would skip past relocating the Triforce and the player but process playing the sound and the rest of the function.
OK, So either before the Delay or before the Queue person script call put in:
UpdateMapEngine();
RenderMap();
FlipScreen();

Or actually to make it simpler forget queue person script for that one just do:

CollectTriforce();
UpdateMapEngine();
RenderMap();
FlipScreen();
LevelComplete(x, y, map);

Looked it over and it seems clear that with Sphere 1.5 what's happening is that your queued person script executes before the mpa gets redrawn after moving the people as in the internal logic works like this (for every cycle of the map engine):

1. Update Map including running any person scripts
2. Draw the Map
3. Return to 1.

In this case your function to move your people and then queue a script gets called BUT the queued script then gets called as well still in step 1 and so the map is not drawn after the movement.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 19, 2017, 04:05:51 pm
executes before the mpa gets redrawn

mpa? Motion Picture Association?... I know you meant map though.

Also, The player collecting the Triforce now functions in Sphere & miniSphere.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 19, 2017, 04:37:27 pm
In general if you need something to happen on the map before your script continues you have to stick in those 3 lines to guarantee it, unless instead you have it queued as a person script where the person script contains a condition OR the thing you want to wait for is that person to move (as their queued script won't execute until they've finished moving - note "moving" in this context is not the same as having a function set their x and y I'm talking about queued movements)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 19, 2017, 06:01:15 pm
I read somewhere about how comments, formatting and trailing spaces can affect frames per second. I went through a few of my major *.js files, removed unneeded comments, reformatted some of the code and removed all trailing spaces. I then tested in Sphere and miniSphere. One notable difference was the scrolling inventory function. Before I did this the inventory would move at a stead pace up and down the screen. Now, in Sphere it was at the top of the page in a blink of an eye. Below are the frames per second while performing the scrolling inventory. Can the comments, formatting and trailing spaces really affect the code that much to have the frames per second go so high?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 19, 2017, 06:09:56 pm
It looks like miniSphere is getting locked at 60fps due to vsync.  Sphere is software rendering so that doesn't come into play.

Don't fall into the cargo-cult trap though: the reason stripping comments etc. sped up Sphere is that old SpiderMonkey was purely interpreted, so cutting down the amount of text speeds things up.  All modern JS engines including Duktape (used in mS) compile to bytecode first so there would be no runtime gain at all from stripping comments and whitespace.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 19, 2017, 06:18:12 pm
I just dropped in 2 lines of code to the InvScroll() that made it scroll at a steady pace again. Now looking at the frames per second in Sphere, they fluctuate between 60 & 65.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 19, 2017, 06:24:21 pm
If you want to guarantee a steady framerate in your menu (assuming your code can keep up), call SetFrameRate(60)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 19, 2017, 06:25:56 pm
@Miscreant : you can slow down your 1.5 code to an appropriate rate by passing a framerate limit when making your MapEngine call. MapEngine(name_of_first_map, framerate);

@Fat Cerberus SetFrameRate is only meant to control out of map engine drawing - render scripts are called by the mapengine fps (per the api documentation anyway)

And yeah repeating what Fat Cerberus said - removing detritus from your scripts will speed up 1.5 but the only thing it would change in miniSphere is the time to open the script in the first place so unless you have noticeable loading times removing comments and white space is largely irrelevant for miniSphere. (Well if it was a MB or more worth of comments it could be enough to cause an actual noticeable load time but that's about it)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 19, 2017, 06:29:43 pm
If you run a sepearate FlipScreen loop for your menu, even in the map engine, you need to call SetFrameRate.  I assume that's what @Miscreant is doing since there's no way he could get 220fps otherwise (map engine framerate must be nonzero)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 19, 2017, 08:03:49 pm
@Rhuan I do that at the beginning of the game already. MapEngine("Start.rmp", 60);

@Fat Cerberus The InvScroll() does use a FlipScreen() but I have no SetFrameRate in it at all. Should I?

I just went through several maps in game with the frames per second turned on . In some areas it remained between 56 & 65. Transitioning between the overworld and underworld or the overworld and entering a dungeon the frames per second jumped as high as the mid 700's.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 19, 2017, 08:28:55 pm
@Fat Cerberus The InvScroll() does use a FlipScreen() but I have no SetFrameRate in it at all. Should I?

If at any place you're calling FlipScreen() in a loop, then you should have the primary framerate set.  It's enough just to call SetFrameRate(60); once, on startup.  No need to call it again unless you're changing the framerate.

Another benefit of setting a framerate is that (in miniSphere at least), leftover time that you didn't use for a frame won't steal CPU cycles from other programs which is more battery-friendly for laptops.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 20, 2017, 12:10:00 am
Any Zork fans?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 20, 2017, 01:54:12 am
Could SetPersonSpeed() affect the way a spriteset is drawn on the screen?

In both images at the top of the image is the foot from the bottom. In the first image the line looks reversed with the bottom of the staff/spear all the way to the left. Actually, they both look reversed.

I checked the actual rss file and the images are correct. Might this be caused by the speed?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on September 20, 2017, 03:35:58 am
@Rhuan I do that at the beginning of the game already. MapEngine("Start.rmp", 60);
This is akin to SetMapEngineFrameRate(); for everything else a separate frame limiter is used so calling SetFrameRate() at the start of your game (or whatever function does an internal loop with a FlipScreen) is still a good idea to limit the frames.

SetPersonSpeed() only changes the speed at which a person moves. If there's any rendering differences, that's a bug.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 20, 2017, 07:54:20 am
I was curious about the speed. The function to activate the armos statues sets their speed based on color of the initial statue. I thought maybe it was the SetPersonSpeed because this particular group of statues are kind of fast. I checked with the other colors and the image does not render improperly. Maybe, just to see what happens, I'll drop the speed down a notch...

Edit: I just tried it again and the improper rendering does occur with the other statues as well.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 20, 2017, 11:42:20 am
Took care of some real world stuff... Now, I'm going to try removing just the last line of the armos rss and see if

1. It really makes the sprite look that bad.
2. Removing that line still causes rendering issues.

Out of all the rss files I use, that is the only one that has encountered an error thus far.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 20, 2017, 03:10:38 pm
Update: Basic layout for level 5 is completed, now I have to design the individual rooms.

miniMap functional for levels 1 thru 5 & the 2 tombs.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 20, 2017, 07:12:13 pm
The main Triforce levels so far:

Note: Item rooms & Passageways not shown
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 20, 2017, 10:50:35 pm
I've been reading about persist.js on the wiki

Quote
4. For each some_map.rmp, make a new script file scripts/maps/some_map.js

My understanding of that is, I would have to make some_map.js for every map I have already created. That would also mean that the individual map rmp file would effectively be codeless. Then I would be able to have different variables on a per map basis, like enemies or items or what not. In the process, reducing the number of global variables needing to be created. Is that correct? or am I misunderstanding how persist.js functions?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 20, 2017, 11:05:49 pm
I've been reading about persist.js on the wiki

Quote
4. For each some_map.rmp, make a new script file scripts/maps/some_map.js

My understanding of that is, I would have to make some_map.js for every map I have already created. That would also mean that the individual map rmp file would effectively be codeless. Then I would be able to have different variables on a per map basis, like enemies or items or what not. In the process, reducing the number of global variables needing to be created. Is that correct? or am I misunderstanding how persist.js functions?

Nope, that's exactly how it works.  Note though that in browser-style scripts (what Sphere 1.x uses) any `vars` at the top of a script (outside of a function) become global by default.  The main advantage of persist.js is that all your map code is in actual .js files, allowing you to search for code more easily later.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 21, 2017, 08:09:42 am
It seems very useful and in future projects, I'm going to included it into those. For ZeC, with so many maps already created, it would be very time consuming to try to re-edit everything to include persist.js. I may attempt to though, I'm not sure yet.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 21, 2017, 03:56:07 pm
Attempting to design a function to make a pond drain when the player uses the whistle.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 21, 2017, 05:24:12 pm
Player uses whistle...

Dungeon Level is now accessible. Note: Not Level 7.

Edit: I redid this slightly so there is a smoother transition between the pond draining and the stairs appearing.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 21, 2017, 05:37:28 pm
That gives me PTSD flashbacks of going around the entire world in circles for hours at a time trying to find Level 7 as a kid.  It took me years to actually find it.  How was I supposed to guess I had to use the whistle for a purpose that wasn't even hinted at before?

I think I got stuck inside the dungeon for a few months too...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 21, 2017, 05:44:22 pm
The whistle actually unlocks a few secrets in the game. Unlike the original LoZ, I have messages coded into my msg_db that will advise the player to where the various locations are.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 21, 2017, 05:47:57 pm
I think I got stuck inside the dungeon for a few months too...

The grumble, grumble guy?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 21, 2017, 06:28:13 pm
I think I got stuck inside the dungeon for a few months too...

The grumble, grumble guy?

Yeah, I think so.  Didn't realize I had to give him the bait.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 21, 2017, 07:03:47 pm
That probably stumped a lot of players through the years. In ZeC, I refer to it everywhere in the code as just 'meat'.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 21, 2017, 07:34:05 pm
Trying to append code into already existing code to add new functionality to the original code can be very frustrating at times... Attempting to add the Compass function to the already existing MapRef().

Edit: I had it functioning under the condition that if the player has the map & the compass, the Triforce location is drawn. In LoZ, it is possible to get the compass before the map, I changed the condition to the player having just the compass and it ceased functionality.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 21, 2017, 10:50:42 pm
I've gotten the MapRef() to function for the map and Compass. In miniSphere it would function, in Sphere it kept causing a NaN error. It was kind of frustrating. So far though, It currently only functions for Level 1 but it does function now in both Sphere and miniSphere.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 21, 2017, 11:53:08 pm
I was wondering, is there a way to prevent diagonal player movement?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 22, 2017, 02:31:04 am
Upon further attempted implementation of the compass in MapRef(), I've come to realize that the way it is currently coded is causing compass values to be overwritten. Such as, if the player has the compass for levels 1 & 2 but is currently in level 1, the compass is showing the location for the triforce piece in level 2... I need to rethink how to code this functionality.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 22, 2017, 02:38:43 am
I'm assuming the game already knows which level you're in, so the pseudocode should be as simple as:

Code: [Select]
if (currentLevel.playerHasCompass)
    lightUpRoom(currentLevel.triforceLocation);

Right?  I see no reason to look through the whole array of compass values when you already know which level you're in (and you would have to know that, to display the correct map in the first place).
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 22, 2017, 02:23:28 pm
I've been developing this project in a windows environment. If I wanted to demo it to someone who uses an apple/mac environment, how would I accomplish that?

Everything I've seen is "install in windows / install in ubuntu"
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 22, 2017, 02:41:05 pm
If you want it to be sphere 1.5 you'll have to point them to using wine.

On the other hand with miniSphere I build mac versions of miniSphere and share them:
http://forums.spheredev.org/index.php/topic,1215.msg10639.html#msg10639

I'm hoping at some point to add my build set up to the github repo so other people can build for macOS but my setup is a bit Heath Robinson at the moment so would need refactoring before it could be shared - for now the binaries I've posted are quite usable.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 22, 2017, 02:41:28 pm
There's a macOS build of miniSphere 5.0b1 in the downloads drive:
https://drive.google.com/drive/folders/0Bw-4UFVty4u1fjJ2RHNUTFNzMVp1WEFVOHlJaFk4STJPd1RMVmFLeGtDQWQ5SVlSSXhEWFk

I'm not sure what the minimum macOS/OS X version to run it is though.  I think Rhuan built it on Sierra.

edit: ninja'd by @Rhuan.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 22, 2017, 02:46:57 pm
I'm not sure what the minimum macOS/OS X version to run it is though.  I think Rhuan built it on Sierra.
edit: ninja'd by @Rhuan.
Yes it's built on Sierra and targeting Sierra, I could build targeting an older version if wanted - I've just seen so little to no feedback from anyone using it other than me so kept it with the easiest option for now.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 22, 2017, 02:47:18 pm
Now that I no longer have the graphics issues I was encountering, I have been testing consistently to be sure that the game functions properly in sphere & minisphere.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 22, 2017, 02:50:25 pm
Yes it's built on Sierra and targeting Sierra, I could build targeting an older version if wanted - I've just seen so little to no feedback from anyone using it other than me so kept it with the easiest option for now.

TBH: I'm not sure what version the other person is using and I, personally, haven't used an apple computer since the era of the original little boxy Macintosh.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 22, 2017, 04:46:39 pm
Yes it's built on Sierra and targeting Sierra, I could build targeting an older version if wanted - I've just seen so little to no feedback from anyone using it other than me so kept it with the easiest option for now.

TBH: I'm not sure what version the other person is using and I, personally, haven't used an apple computer since the era of the original little boxy Macintosh.
Sierra is the latest version of macOS the linked version of miniSphere should run out of the box on that and may run on older versions but may not, I should be able to build it for anything back to OSX 10.8 (aka Mountain Lion) with a little fiddling so let me know if it doesn't work for your friend and which version they want me to target. (If they need earlier than 10.8 it may be difficult)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 22, 2017, 05:09:36 pm
Haven't test this with minisphere yet...

The arrow rock formation to unlock the Hidden Programmers Room is now the final piece of a 3 part unlocking sequence with 2 parts scattered in the overworld (1 being the arrow rock formation) and 1 part hidden in the underworld. They need to be accomplished in the proper sequence. Part 1 unlocks Part 2. Part 2 unlocks Part 3. Part 3 activates the portal to the Hidden Programmers Room.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 22, 2017, 05:12:44 pm
Yes it's built on Sierra and targeting Sierra, I could build targeting an older version if wanted - I've just seen so little to no feedback from anyone using it other than me so kept it with the easiest option for now.

TBH: I'm not sure what version the other person is using and I, personally, haven't used an apple computer since the era of the original little boxy Macintosh.
Sierra is the latest version of macOS the linked version of miniSphere should run out of the box on that and may run on older versions but may not, I should be able to build it for anything back to OSX 10.8 (aka Mountain Lion) with a little fiddling so let me know if it doesn't work for your friend and which version they want me to target. (If they need earlier than 10.8 it may be difficult)

When I find out, I'll let you know. I'm not sure how up-to-date their mac is.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 22, 2017, 07:17:16 pm
I made the unlock to it. I thought I'd show what the hidden programmers room has evolved into.

Top left: All shops
Top Middle: Message box Testing
Top Right: All dungeon levels

Middle Left: Fairy healing/Change Music
Middle Middle: NPCs
Middle Right: All Items

Bottom Left: Ladder testing
Bottom Middle: Exit to Start Map
Bottom Right: Raft & Whirlpool Testing

Raft & Ladder Testing areas exit to each other. Only the NPC room exits to the Start map.

Shop & Dungeon rooms exit to each other
Raft & Dungeon rooms also exit to each other

Edit: The bottom dock in the raft room intentionally breaks the function and leaves the spriteset as 'link' on the raft.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 23, 2017, 12:32:13 am
Started a Project: ZeC miniProject including persist.js. Wondering, how difficult & time consuming it would be to try to include it in to the things already created in P:ZeC.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 23, 2017, 01:34:33 pm
Started a Project: ZeC miniProject including persist.js. Wondering, how difficult & time consuming it would be to try to include it in to the things already created in P:ZeC.

At a current total of 401 maps, there is just so much already created that it may be too time consuming to try to convert the project to include persist.js.

My next project will include it.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 23, 2017, 03:49:50 pm
Quote from: Miscreant
Sierra is the latest version of macOS the linked version of miniSphere should run out of the box on that and may run on older versions but may not, I should be able to build it for anything back to OSX 10.8 (aka Mountain Lion) with a little fiddling so let me know if it doesn't work for your friend and which version they want me to target. (If they need earlier than 10.8 it may be difficult)

When I find out, I'll let you know. I'm not sure how up-to-date their mac is.

The version is Sierra. The current miniSphere MacOS Port should function.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 23, 2017, 04:40:35 pm
Started a Project: ZeC miniProject including persist.js. Wondering, how difficult & time consuming it would be to try to include it in to the things already created in P:ZeC.

At a current total of 401 maps, there is just so much already created that it may be too time consuming to try to convert the project to include persist.js.

My next project will include it.
There could probably be a script that would export all of the scripts from your maps into text files - I have code that loads rmp files as JS objects, it would just be a case of working out what needed to write back out again.

The version is Sierra. The current miniSphere MacOS Port should function.
Excellent - FYI worth saying that it's a miniSphere 5 beta port, one known bug is that the startup game is unusable in the version 5 beta - just do the one of the following to get around that:
a) rightclick your game.sgm file and do open with and select miniSphere OR
b) rename your game folder as startup and put it in the same folder as miniSphere - double clicking miniSphere should then find it
c) double click miniSphere it should give you a box assking you to open something - select your game's game.sgm file and click ok.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 24, 2017, 12:48:07 pm
All doors for level 2 coded and functional, including the shutter doors.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 24, 2017, 02:47:48 pm
Would this be the proper formatting for a persist map javascript file?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 24, 2017, 03:27:12 pm
Almost.  You have an extra spurious ( before "function" that shouldn't be there, though.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 24, 2017, 06:22:41 pm
In attempting to use persist.js, I keep getting an error on startup. The program is small. 2 map one exits north, the other south. I don't have a default enter map. Just leaveNorth & LeaveSouth. I do not know enough about persist.js, Would someone be willing to look it over to determine if there actually is an error?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 24, 2017, 07:11:51 pm
I've not used persist.js but based on reading your error and the code I think it expects you to have a map script or each map AND for each of those map scripts to define all of the standard scripts for that map - if you want the script to be blank I think you still need it in the map script just have it as an empty function.

I think what's happening is that persist.js has overwritten the default on enter map script (which would be blank) with the one it has read from your map script file - but you didn't include one so instead of "" it got the value undefined which is what it's then trying to execute.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 24, 2017, 07:42:00 pm
I do have a map script for each map. I put the other values in to all the scripts and left them blank.

I have 3 different versions of persist.js (Wiki & Forums version are 2 different file sizes.
The wiki page: Line 403 error
The forum: SyntaxError: missing } after property list
@Radnen  analogue.js: Also returning a missing } error but with enter: function () {}

I did ask about the map script format before I attempted. I also corrected the error @Fat Cerberus pointed out. This is becoming a very confusing functionality.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 24, 2017, 08:10:00 pm
Can you post the map script you're using?

The line 403 error is persist.js forcing an error as it can't run the code from the map script you've given it. (It has internal error handling designed to give you more sensible error messages)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 24, 2017, 08:33:02 pm
Can you post the map script you're using?

Very small... only 2 maps to begin with.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 25, 2017, 02:47:54 am
You have to have a comma after each function definition in the map script (other than the last one), like in the attached.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 25, 2017, 09:46:04 am
@Miscreant The persist.js map script syntax is a bit weird, basically the whole file is a big object literal which is eval()'d.  It was done that way as a necessary evil because otherwise, with traditional JS, all the functions in the file would be global.  Putting them into an object which can be eval'd gets around that limitation.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 25, 2017, 10:43:46 am
You have to have a comma after each function definition in the map script (other than the last one), like in the attached.
Added in the commas, the map scripts are functioning.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 25, 2017, 10:48:20 am
@Miscreant The persist.js map script syntax is a bit weird, basically the whole file is a big object literal which is eval()'d.  It was done that way as a necessary evil because otherwise, with traditional JS, all the functions in the file would be global.  Putting them into an object which can be eval'd gets around that limitation.

Which version should I be using? The one from the wiki, the one I found posted in the forums or Radnen's analogue?

Also, I can infer that zones and triggers would still be need to coded internally in the map file. Looking through the 1.5 api file(which I started this project with) it does not appear that the zones or triggers can be created externally with coding.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 25, 2017, 10:52:48 am
Radnen's analogue.js is newer and fixes a few nagging bugs that persist had, so I would recommend that.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 25, 2017, 10:54:08 am
Also, I can infer that zones and triggers would still be need to coded internally in the map file. Looking through the 1.5 api file(which I started this project with) it does not appear that the zone or triggers can be created externally with coding.

Yeah, the problem with zones and triggers is that they are not named, so there's no provision for them in persist.js.  One of the unfortunate limitations of the classic map engine. :(
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 25, 2017, 11:06:10 am
I'm going to attempt to port the project maps to use the persist functionality. At over 400 maps this could take some time. I think the levels will be the most time consuming to port over.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 25, 2017, 02:42:10 pm
Shops, ProgramersRooms and the first column of the overworld maps are now recoded for persist.js.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 25, 2017, 03:43:54 pm
I'm going to attempt to port the project maps to use the persist functionality. At over 400 maps this could take some time. I think the levels will be the most time consuming to port over.
I could pull all the scripts out with a script I have if you want me too... Let me know if you want the help.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 25, 2017, 03:57:23 pm
It's actually going quicker than I thought it would. The overworld is now 1/4th of the way ported over. The map exits are quick and simple. Porting the person entities is what takes a few moments. Especially on maps where there are a good number of Armos statues.

Also, I've already added you into my credits.txt for the assistance you've provided thus far.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 25, 2017, 08:25:35 pm
All of the shops, programmers rooms and the entire overworld has been recoded to use persist.js. I was going through the overworld testing all the various shops, rupee caves and heart container caves to make sure they functioned properly with persist.js. In Sphere, every cave is functional but one heart container cave. Everytime, i go to enter the cave, Sphere crashes. I loaded up miniSphere to process it through the debugger and that one cave had functionality. No errors. Load it back up in Sphere, try it again. Crashed. I'm trying to figure out what is causing this one cave to crash the game. The coding is virtually identical to the other heart caves that function, the only difference is the variable name to check if you collected the heart container.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 25, 2017, 09:03:57 pm
Another benefit to persist.js which I'm sure you've seen already is that you can use the debugger to step inside the map scripts.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 25, 2017, 09:30:36 pm
Another benefit to persist.js which I'm sure you've seen already is that you can use the debugger to step inside the map scripts.

miniSphere processes the script correctly. The debugger found no errors with it.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 26, 2017, 12:02:34 am
Now with persist, I'm thinking about doing a little restructuring to one of my main data modules. Changing variables between maps is much quicker now.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 26, 2017, 06:21:17 pm
The underworld is a little more that 1/2 ported over to use persist.js.

In the process of converting the map files, I found a couple that, since I haven't had cause to open for coding in some time, they were still using my original exit map functionality from before I created the actual function.

Those maps are now implemented with the newer functions.

Plus, there were a few maps that had exits coded which didn't have those exits.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 27, 2017, 04:00:53 am
I'm going to attempt to port the project maps to use the persist functionality. At over 400 maps this could take some time. I think the levels will be the most time consuming to port over.
I could pull all the scripts out with a script I have if you want me too... Let me know if you want the help.

@Rhuan This is taking longer than expected. I've got the overworld and underwold ported over along with all the shops and extras. I still have 6 dungeon levels to port to persist. How long would this script take?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 27, 2017, 04:30:51 pm
A bit tired to set up a full conversion for you right now - here's an RMP loader - with some comments pointing out the key stuff you'd need to write the bits you want back out again - if you can't work it out I could set it up for you another day, maybe saturday.

Basic idea to write it will be the following - note this is a starting point a working write function will be about 40 lines.
Code: [Select]
//make the output file
let outputFile = new DataStream(fileName.replace(".rmp",".js"), FileOp.Write);

//write out the strings
//you'd need to add the names and brakcets etc to them first
//the loaded versions will be function bodies only
outputFile.writeStringRaw(string1, string1.length);

Note this requires the latest beta of miniSphere 5 to run as it uses some new tricks.
Here's the RMP reading function - this takes an RMP fileName as an input loads the file and then returns an object containing all the data from the file - note you can't skip the read functions you don't need as the data is stored sequentially and each read moves you along in the file  - if you just need the map scripts it will be easier - the entity scripts are further down but the below does load them all.
Code: [Select]
import {DataStream} from "sphere-runtime";

function loadRMP(fileName)
{
let inputFile = new DataStream(fileName, FileOp.Read);

if(inputFile.readStringRaw(4) !== ".rmp")
{
throw new Error("rmpLoader provided with file that is not an rmp file filename is " + fileName);
}
inputFile.position = inputFile.position + 3;//skip version number (always 1) and type which is meaningless

let numLayers = inputFile.readUint8();

inputFile.position = inputFile.position + 1;//skip reserved byte

let numEntities = inputFile.readUint16(true);

//skip startX, startY, (Uint16s) startLayer, startDirection (Uint8s) <- not used with MEngine
inputFile.position = inputFile.position + 6;
let numStrings = inputFile.readUint16(true);

let numZones = inputFile.readUint16(true);

let repeating = inputFile.readUint8();
inputFile.position = inputFile.position + 234;

/*  -strings are all currently ignored, they are:
0 - tileset file (obsolete)
1 - music file
2 - script file (obsolete)
3 - entry script
4 - exit script
5 - north script
6 - east script
7 - south script
8 - west script*/
let mapStrings = new Array(9);
for(let i = 0; i < numStrings; ++i)
{
mapStrings[i] = inputFile.readString16(true);
}

let width = 0;
let height = 0;

//load main Layer data - 1st key output
let layers = new Array(numLayers);
for(let i = 0; i < numLayers; ++i)
{
layers[i] =
{
width       : inputFile.readUint16(true),
height      : inputFile.readUint16(true),
flags       : inputFile.readUint16(true),
parallaxX   : inputFile.readFloat32(true),
parallaxY   : inputFile.readFloat32(true),
scrollX     : inputFile.readFloat32(true),
scrollY     : inputFile.readFloat32(true),
numSegments : inputFile.readUint32(true),
reflective  : inputFile.readUint8(),
zones       : [],
triggers    : []
};
width = Math.max(width, layers[i].width);
height = Math.max(height, layers[i].height);
inputFile.position = inputFile.position + 3;//skip 3 reserved bytes
layers[i].name = inputFile.readString16(true);
layers[i].tiles = inputFile.read(2 * layers[i].width * layers[i].height);

layers[i].segments = new Array(layers[i].numSegments);
for(let j = 0; j < layers[i].numSegments; ++j)
{
let x = inputFile.readUint32(true);
let y = inputFile.readUint32(true);
layers[i].segments[j] = new Polygon(1, x, y, inputFile.readUint32(true) - x, inputFile.readUint32(true) - y);
}
}

//load entity data 2nd key output
//and load trigger data - attached into layer objects from above
let entities   = [];
for(let i = 0; i < numEntities; ++i)
{
let x     = inputFile.readUint16(true);
let y     = inputFile.readUint16(true);
let layer = inputFile.readUint16(true);
let type  = inputFile.readUint16(true);

inputFile.position = inputFile.position + 8;//skip 8 reserved bytes

if(layer > numLayers)
{
throw new Error("layer number " + layer + "for entity" + i + " but total layers in rmp are " + numLayers);
}
if(type == 1)
{
entities.push(
{
x          : x,
y          : y,
layer      : layer,
name       : inputFile.readString16(true),
sprite     : inputFile.readString16(true),//.replace(".rss",".ses"),
sripts     : new Array(5)
});
inputFile.position = inputFile.position + 2;//skip reading number of scripts as always 5
entities.scripts[0] = inputFile.readString16(true);
entities.scripts[1] = inputFile.readString16(true);
entities.scripts[2] = inputFile.readString16(true);
entities.scripts[3] = inputFile.readString16(true);
entities.scripts[4] = inputFile.readString16(true);

/* inputFile.position = inputFile.readUint16(true) + inputFile.position;//burn the scripts I don't want them
inputFile.position = inputFile.readUint16(true) + inputFile.position;
inputFile.position = inputFile.readUint16(true) + inputFile.position;
inputFile.position = inputFile.readUint16(true) + inputFile.position;
inputFile.position = inputFile.readUint16(true) + inputFile.position;*/
inputFile.position = inputFile.position + 16;//skip the reserved bytes
}
else if (type == 2)
{
layers[layer].triggers.push(
{
x      : x,
y      : y,
name : inputFile.readString16(true)//note per spec this is script - but no name and need an ID
});
}
}

//load zone data - attached into layer objects from above
for(let i = 0; i < numZones; ++i)
{
let x1 = inputFile.readUint16(true);
let y1 = inputFile.readUint16(true);
let x2 = inputFile.readUint16(true);
let y2 = inputFile.readUint16(true);
let layer = inputFile.readUint16(true);
let steps = inputFile.readUint16(true);
inputFile.position = inputFile.position + 4;
let name = inputFile.readString16(true);//script field re-purposed as a ref
layers[layer] = {
poly : new Polygon(1, x1, x2, x2 - x1, y2 - y1),
steps : steps,
name : name
};
}

if(inputFile.readStringRaw(4) !== ".rts")
{
throw new Error("Tile signiture not found either .rmp file is corrupt/out of date or there's an error in the reader script");
}
inputFile.position = inputFile.position + 2;//skip version number - always 1
let numTiles = inputFile.readUint16(true);
let tileWidth = inputFile.readUint16(true);
let tileHeight = inputFile.readUint16(true);
let tileSize = tileWidth * tileHeight;

inputFile.position = inputFile.position + 244;//skip 3 reserved bytes then 1 byte "has_obstructions" then 240 reserved bytes
//has_obstructions is aassumed to always be true

//load rawTile data 3rd key Output
let tileData = inputFile.read(numTiles * tileWidth * tileHeight * 4);

//load and process tile properties 4th key output
let tiles = new Array(numTiles);
for(let i = 0; i < numTiles; ++i)
{
inputFile.position = inputFile.position + 1;//skip 1 reserved byte
let animated = inputFile.readUint8();
let nextTile = inputFile.readUint16(true);
let delay = inputFile.readUint16(true);
inputFile.position = inputFile.position + 1;//skip 1 reserved byte
let obsType = inputFile.readUint8();
let numSegments = inputFile.readUint16(true);
let nameLength = inputFile.readUint16(true);
inputFile.position = inputFile.position + 20;//skip 20 reserved bytes

let tileName = inputFile.readStringRaw(nameLength);

let tileObs = [];
if(obsType == 1)
{
for(let j = 0; j < tileSize; ++j)
{
if(inputFile.readUint8() === 1)
{
tileObs.push(new Polygon(1, j % tileWidth, Math.floor(j / tileHeight), 1, 1));
}
}
}
else
{
for(let j = 0; j < numSegments; ++j)
{
let x1 = inputFile.readUint16(true);
let y1 = inputFile.readUint16(true);
let x2 = inputFile.readUint16(true);
let y2 = inputFile.readUint16(true);

let x_ = Math.min(x1, x2);
let y_ = Math.min(y1, y2);


tileObs.push(new Polygon(1, x_, y_,
Math.abs(x1 - x2),
Math.abs(y1 - y2)));
}
}
tiles[i] =
{
name     : tileName,
animated : animated,
nextTile : nextTile,
delay    : delay,
obs      : tileObs
};
}

return {
width      : width,
height     : height,
repeating  : repeating,
layers     : layers,
mapStrings : mapStrings,
entities   : entities,
numTiles   : numTiles,
tileWidth  : tileWidth,
tileHeight : tileHeight,
tileData   : tileData,
tiles      : tiles
};
}

class Polygon
{
constructor(type, x, y, w, h)
{
this.type = type;
this.x    = x;
this.y    = y;
this.w    = w;
this.h    = h;
}
}
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 27, 2017, 09:59:50 pm
I've been creating a refined tileset for the Hyrulian Outpost map. I'll take a closer look at what you posted in a little bit.

The original and refined versions of the outpost:

Still making small adjustments to it.

Edit: Looking at the image it occurs to me that the 2 darker blue floor tiles were in fact the same color. Changed that.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 28, 2017, 12:57:37 am
I'm trying to figure out what is causing this one cave to crash the game.

I appear to have "fixed" the broken cave. I originally had it set with a trigger point. Kept crashing. I changed the trigger to a zone with the same line of code from the trigger point. Tested repeatedly in sphere and minisphere and now it's not crashing. Why would a trigger point crash it and a zone wouldn't... no idea.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 28, 2017, 01:09:50 am
Did it crash in miniSphere too, or only Sphere?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 28, 2017, 01:11:15 am
Only in sphere.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 28, 2017, 01:19:51 am
That makes sense, I remember trigger handling was pretty buggy (read: crashy) in Sphere 1.x.  As you've seen miniSphere is in general more stable and reliable than Sphere.  Building the engine was a combination of 1) reading the original source code and 2) reverse engineering, and wherever I found obvious bugs I fixed them.  So any time you have to ask "Why does this work right in miniSphere but not Sphere" you're probably just running into a bug that I purposely chose not to replicate ;)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 28, 2017, 01:26:06 am
I've replaced quite a few of the trigger points with zones because I didn't really like the way they were processing. Such as some of my doors. The Island outpost door was particularly buggy as a trigger point.

Also, seeing as how I started this project with the 1.5 API (I originally found sphere then learned about the forums site and the wiki after I had already started coding), I intend to finish it with the 1.5. With my next project I'll delve into the realm of the v2 API.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 28, 2017, 01:52:50 am
Triggers in Sphere are kind of weird.  In most cases their area of effect doesn't line up with a tile boundary so that's probably why you're getting glitchy behavior with them.  In particular putting two triggers on adjacent tiles still allows the player just enough space to squeeze between them.  So I'd agree zones are almost surely the better choice here.

Hopefully by the time you dive into Sphere v2 I'll have mS 5.0 released and then you'll be able to take full advantage of it, ES6 syntax, modules and great JS performance (seriously even the current beta entirely blows mS 4.8 out of the water here) :D
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 28, 2017, 02:28:21 am
I have an rpg that I've been developing here and there on paper for a number of years. The previous languages I learned (VB, C++ (although I did get a C- in one of my C++ classes), Pascal) never really seemed to be the right enviroment to actually produce it.

While, ZeC is a fan made Zelda game that I hope, once complete, people will enjoy playing; it is my first introduction to sphere and javascript. Yet, it has already had, currently, 3 sub programs be created for it.

Just one of which is ZeC: World maps which I use often for dungeon level generation. That way I can get an idea of what the layout could be before I actually start coding it. I also used it to create the Overworld and Underworld maps.

As for the other RPG, I have a directory for it. I've started scripting the character, item and magic modules for it but I really haven't put that much into it yet because I would like to use miniSphere to create it. I'm also trying to design a main character that hasn't been seen countless times.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 28, 2017, 05:05:28 am
I've been thinking about how all the levels in the original LoZ fit together into one map...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 28, 2017, 05:30:46 pm
In attempting to eliminate diagonal player movements (based on Original LoZ, only 4 movements n, s, e, w) the movement systems I've attempted so far have in fact eliminated the diagonal movement but in the process broken other essential game functions. Might be good movement systems for future projects but not ZeC.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 28, 2017, 06:02:57 pm
In attempting to eliminate diagonal player movements (based on Original LoZ, only 4 movements n, s, e, w) the movement systems I've attempted so far have in fact eliminated the diagonal movement but in the process broken other essential game functions. Might be good movement systems for future projects but not ZeC.
To eliminate Diagonal movement whilst taking advantage of various "normal" features of the sphere v1 map engine you have to.

1. AttachInput to your character. (otherwise OnActivateTouch and related thigns don't work.

2. Use BindKey to overwrite the functionality that AttachInput has given to KEY_UP, KEY_DOWN, KEY_LEFT and KEY_RIGHT e.g.
Code: [Select]
BindKey(KEY_UP,"""");
BindKey(KEY_DOWN,"""");
BindKey(KEY_LEFT,"""");
BindKey(KEY_RIGHT,"""");
3. Implement new movement - normally done by setting an update script that handles it.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on September 28, 2017, 06:11:30 pm
Does that BindKey trick work in miniSphere?  Thinking about how the input code in map_engine.c looks, it might not.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 28, 2017, 06:30:52 pm
Does that BindKey trick work in miniSphere?  Thinking about how the input code in map_engine.c looks, it might not.
Honestly I have no idea, I've hardly used the "default" mapengine in years.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 28, 2017, 07:07:13 pm
I did all that, had a nice movement set. Broke functionality for the raft & ladder functions. Threw off all coordinates in dungeons (north & south doors were fine, east & west couldn't align the player to walk through them without redefining all x, y's). Never even attempted to try it in miniSphere due to the raft & ladder (2 very main functions) being broken. Set it back the way it was for the time being. I'll attempt other movement systems at some point. Eliminating diagonal movement is really just me being particular and doesn't really affect how the game is played.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 28, 2017, 07:08:48 pm
You shouldn't have needed to move everything - what was your movement script?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 28, 2017, 07:12:11 pm
It was based off of tile movement. A good portion of my x,y put you on the other side of a door at mid tile points. Especially in the dungeon levels where the north & south doors take up 2 tiles & the entry point is between those 2 tiles.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 28, 2017, 07:22:25 pm
It was based off of tile movement. A good portion of my x,y put you on the other side of a door at mid tile points. Especially in the dungeon levels where the north & south doors take up 2 tiles & the entry point is between those 2 tiles.
You could do 4 directions without doing tile movement - tile movement in an action rpg would be problematic anyway.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 28, 2017, 07:26:43 pm
The tile movement was very problematic with ZeC. I did like the way that it was functioning though on a tile basis, so rather than abolish the code, I have it stored in a seperate script to implement into future projects.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 28, 2017, 09:28:04 pm
Modified CollectTriforce() into a CollectItem() for use in the dungeon level item rooms. Also, adapted the collection image from the spriteset to holding the item up with one hand because I really didn't like the pose from the Original LoZ.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on September 30, 2017, 04:00:08 pm
It would seem that Project: ZeC is on a temporary hiatus. My computer is apparently fried. It won't turn on. Press the power button and nothing happens... Just... It... I... Now... arrrrrrrgh...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on September 30, 2017, 04:02:33 pm
Oh no I'm really sorry to hear that and hope it is fixed somehow soon.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Radnen on October 01, 2017, 12:14:59 am
Just noticed the mentions section on these new forums. I'm trying to read everything but there's been a lot of talk! Anyways here's some answers for ya'll:

As for Analogue, here is a version I had on github as a gist:
https://gist.github.com/Radnen/5882431

(I would use the gist tags, but the code gets long. The old forums shortened the window, and added a scrollbar.)

As for map transitions in Blockman, I'm uncertain I want to share that code as because I really need to recode that project for Sphere 2.0+ API. I'm waiting for that ChakraCore engine. :) I use a floating camera too and there are issues with the camera working correctly on Sphere 1.5 API. Basically the map transition scripts are activated when the camera hits past the edges of the map, not the input character. This makes things weird sometimes.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on October 01, 2017, 12:23:13 am
As for map transitions in Blockman, I'm uncertain I want to share that code as because I really need to recode that project for Sphere 2.0+ API. I'm waiting for that CakraCore engine. :) I use a floating camera too and there are issues with the camera working correctly on Sphere 1.5 API. Basically the map transition scripts are activated when the camera hits past the edges of the map, not the input character. This makes things weird sometimes.

You've been lurking all this time watching miniSphere 5.0 progress, huh? :D  It's going to be awesome, it even has a real event loop now so combined with async await support in Chakra and the Dispatch API, plus mJS module support, makes it basically the game engine version of Node.js. :P
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on October 01, 2017, 12:29:54 am
Quote
The old forums shortened the window, and added a scrollbar.
Thanks for reminding me to fix that. :D
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 01, 2017, 12:42:16 am
Just noticed the mentions section on these new forums. I'm trying to read everything but there's been a lot of talk! Anyways here's some answers for ya'll:

As for Analogue, here is a version I had on github as a gist:
https://gist.github.com/Radnen/5882431

(I would use the gist tags, but the code gets long. The old forums shortened the window, and added a scrollbar.)

A copy of your analogue was included with miniSphere. I've been using that.

Quote
As for map transitions in Blockman, I'm uncertain I want to share that code as because I really need to recode that project for Sphere 2.0+ API. I'm waiting for that ChakraCore engine. :) I use a floating camera too and there are issues with the camera working correctly on Sphere 1.5 API. Basically the map transition scripts are activated when the camera hits past the edges of the map, not the input character. This makes things weird sometimes.

Rhuan helped me come up with a way to handle the map transitions. It's a very good starting point but I need to find a way for the player not to be able to move across the map while the transition is occurring.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 01, 2017, 04:26:30 am
After many hours and hardware headaches, I'm back on the really old (2003 hardware) pc, so that I may continue coding Project: ZeC. I'm pretty sure the power supply fried on the other machine. I'm kinda stuck using Sphere 1.5 for the time being. This older machine can't handle miniSphere. Which means I can't utilize the debugger until I can acquire a new power supply. At the very least, I can now continue coding.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on October 01, 2017, 04:29:11 am
Rhuan helped me come up with a way to handle the map transitions. It's a very good starting point but I need to find a way for the player not to be able to move across the map while the transition is occurring.
To do that just put in  DetachInput() and ClearQueue() (with the player as the parameter) at the start of the transition and then an AttachInput at the end.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 01, 2017, 01:16:49 pm
Every so often I try to add that in at different code locations. I'll get more in depth on adding that at a later point. For now, during the creation stages, I have that function "turned off" for quicker developement and testing. It is in the code, just currently //.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 01, 2017, 04:40:10 pm
Adding in doors to various dungeon levels, reformatted some of the code base, fixed a "bug" with the whistle functionality where it would set the wrong tile. Attempting to remove the glitchiness of the ladder function. Main functions still in need of editing: UseCandle() and setBomb(). Started both of them at different points, got to an 'argh' moment and created a different function. Need to get back to those.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 02, 2017, 01:53:45 am
"persist.js" questions:

Quote from: http://wiki.spheredev.org/index.php/Script:Persist.js
Map Events:
1st - the map state. Usually named map.
2nd - the world state. Usually named world

Person Events:
1st - the person state. Usually named self.
2nd - the map state. Usually named map.
3rd - the world state. Usually named world

If I understand this correctly, 'self' refers to the actual mapname.js or would it be the mapname.rmp file because of the example. As an example using actual ZeC references...

The player enters the cave with the first sword:
Code: [Select]
//swordcave.js
({
visited: false,
enter: function (self)
{
 if (!self.visited)
 {
 GenerateShop("OldMan", "WoodenSword");
 self.visited = true;
}
},
leaveSouth: function ()
{
Warp(55, 39, 0, "south", Start);
}
})

According to that, when the player enters swordcave.rmp and already collected the sword the GenerateShop() would not process because visited is true.

What I'm hazy on is the map & world portions of the optional parameters.

Code: [Select]
talk: function (self, map, world)

What exactly do they reference? If 'self' is the map then what is 'map'? I'm not very sure about that. The wiki page doesn't really seem to explain it. Unless, I misread something. Although, I have read & reread the page a few times trying to understand the concepts before posting about it.

Also, what does 'world' set? From reading, it appears that 'world' would be used for set/getWorldState(). If that is correct, then I would need to add 'world' to the dungeon items, doors & whatever other variable setting entities I would want to add into a game save file?

Am I correct in my understanding about any of this?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Radnen on October 02, 2017, 12:58:05 pm
Self: The current entity running the script. This applies to scripts that belong to people.

Map: This is the map scope. Writing data into this object is accessible by all entities and methods on that map.

World: This is the world scope. Writing data into this object makes it available to all maps and people. This is great to store quest variables and world reactions. A death of a person on map A  can be talked about on map C by writing the variables to that object.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 02, 2017, 01:18:31 pm
That is a better explaination than the wiki. Although, not a fan of a "death" example. I've been trying to figure this out for a little while now. Based on that, any item stored in a map that the player collected would be part of 'world' so the variable can be stored in a save file?

I lost the ability to use miniSphere for the time being because of my fried power supply.  As a result, I'm still porting the dungeon levels over to persist.js manually. I've been trying to update the map files as I do it. I don't have many dungeon levels left to port over then I can get back to creating the remaining levels and finishing some of the core functionalities.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Radnen on October 02, 2017, 05:43:26 pm
That is a better explaination than the wiki. Although, not a fan of a "death" example. I've been trying to figure this out for a little while now. Based on that, any item stored in a map that the player collected would be part of 'world' so the variable can be stored in a save file?

Yes, this is a perfect example of storing things in a save file. :)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on October 02, 2017, 06:55:25 pm
That is a better explaination than the wiki. Although, not a fan of a "death" example

Not sure I follow - it's a good example of when you'd want to associate something with the world rather than a specific map.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 02, 2017, 10:00:46 pm
All currently created maps have been ported over to use persist.js. Need to go through a few of them though because I think I may have some typos.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 03, 2017, 03:08:51 am
That is a better explaination than the wiki. Although, not a fan of a "death" example

Not sure I follow - it's a good example of when you'd want to associate something with the world rather than a specific map.

eh, could have just as easily been (a festival, a comet coursing though the night sky, a meteor shower, a bridge, a tunnel, a new building, any number of things...)going on in map A that was being talked about in map C...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 03, 2017, 02:44:55 pm
Created the basic Layout for Level 7. Item and Triforce are collectable. Now to design what the individual rooms will look like.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 03, 2017, 04:22:00 pm
Level 7... for the time being. Doors need to be coded in and I've already noticed a few things that could use re-editing.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 03, 2017, 07:13:09 pm
Now I need to come up with a design for Level 8. I have a few different ones ProtoLeveled. I'm not sure if I am going to use one of them or come up with something else.

The Ideas so far...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 03, 2017, 10:08:27 pm
The Link of Liberty??

Edit: Looking at this, I almost want to edit it so his shield is in the other hand like the actual Statue of Liberty holding the tablet.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 04, 2017, 01:42:37 am
Created a Hidden Character in one of the Programmers Room. Using PlaySound(), I gave the character the functionality to "say" (currently five, more will be added) different things when the player "talks" to the character.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Chad Zechs on October 04, 2017, 10:18:13 am
Now I need to come up with a design for Level 8. I have a few different ones ProtoLeveled. I'm not sure if I am going to use one of them or come up with something else.

The Ideas so far...

1. Demon head? 2. ET? 3. Not sure of the third one... 4. Either a zombie character or something Dr Jekyll/Mr Hyde game? 5. The last one looks familiar too but can't place it.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 04, 2017, 03:35:44 pm
Now I need to come up with a design for Level 8. I have a few different ones ProtoLeveled. I'm not sure if I am going to use one of them or come up with something else.

The Ideas so far...

1. Demon head? 2. ET? 3. Not sure of the third one... 4. Either a zombie character or something Dr Jekyll/Mr Hyde game? 5. The last one looks familiar too but can't place it.

1. Was kinda supposed to look like the chalice from Atari 2600 Adventure.

2. ET - hailed as the worst video game for the 2600. Although the more I look at it, it kind of resembles the actual level 5 from original LoZ.

3, 4 & 5 I just threw random rooms together.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Chad Zechs on October 04, 2017, 04:51:25 pm
I see the chalice now.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 04, 2017, 05:29:09 pm
I was thinking about using the 'chalice' for my 2 part Triforce Island dungeon due to it's symmetry. It would be the same number of rooms for both halves. The map could be split down the middle. Showing at first, the map for whichever half the player is in. Then when the player has both halves of the map, the full dungeon map would be shown.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 04, 2017, 10:53:24 pm
Sometimes trying to create tiles can be frustrating... especially when it is a design that spans multiple tiles and you can't seem to get the alignment correct.

The roof of the outpost is currently just too bland, trying to create a shingled or thatched roof design.

Edit: Maybe... (added 2nd screencap)

Re-Edit: I don't know... The double lines where the 'shingles' don't line up. I circled them. (added 3rd screencap)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 05, 2017, 07:03:52 pm
The basic layout for the 1st half of the Triforce Island level is created. Individual rooms need to designed, doors and items need to be added. I still need to create the sprites for the two halves of the Master Sword.

Been adding to UseCandle() little by little. No longer creates multiple flame sprites at the starting point for maps. It does create the flame in the direction the player is facing and travels upto 2 tiles across the screen. Currently multiple uses per map, need to implement the Blue Candle functionality of once per map. Also need to create the functionality of actually checking if a bush is flammable and replacing it with a staircase.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 05, 2017, 09:14:10 pm
Code: [Select]
var name = candle_flame;

var tile;
var tw = GetTileWidth();
var th = GetTileHeight();
var tn = GetTileName(tile);

var px = GetPersonX(name);
var py = GetPersonY(name);
var pl = GetPersonLayer(name);
var dir = GetPersonDirection(MainChar);

var x;
var y;
var l;

switch (dir) {

case "north":
 
 x = px;
 y = py - 2;
 l = pl;
 tile = GetTile(x, y, l);
 
  if (tn = "burnable_bush") //tile name to be changed later
   {
    if (py == y)
     {
     }
    }
   break;

I am not currently in front of a computer to test this on... Writing the code on my mobile phone. Looking at how this code is written so far, I'm wondering if it will produce an error on var tn due to the fact that var tile technically isn't being define until the switch (dir)?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on October 05, 2017, 09:22:08 pm
Yes, that will produce an error.  You are effectively doing:

Code: (javascript) [Select]
var tn = GetTileName(undefined);
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 05, 2017, 09:27:36 pm
Yes, that will produce an error.  You are effectively doing:

Code: (javascript) [Select]
var tn = GetTileName(undefined);

That's what I thinking. I was trying to design it general purpose without the need to repeatedly redefine variables but I guess I'm going to have to define it for each switch (dir).
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 06, 2017, 02:53:51 am
tired, but too stressed to sleep... Coding more ZeC.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 06, 2017, 03:45:45 pm
The Triforce Island level was too big for MapRef(), needed to redesign it a little to get the dungeon map to display properly.

Also, trying to get the UseCandle() to determine if a bush is burnable or not. The function is not processing correctly. I'm starting to think that I may have to redesign it totally.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 07, 2017, 06:50:11 pm
Both halves of the Triforce Island dungeon are functional. Including the MapRef(). The map functionality displays whatever half the player is currently in and when the player has both map halves the full dungeon map is displayed. Also added functionality, so that the player has to have at least 5 Triforce pieces to enter the first half of the level and all 8 pieces to enter the second half.

Still need to re-edit the displaying of the Triforce on the map in MapRef(). It is processing incorrectly. As that part of the function is right now, the Triforce will blit in the proper location on the initial MapRef(). When the player accesses the inventory screen, the Triforce location is some how getting redefined to a location of (0, 0). Trying to go through the code to determine why that is occurring considering the (x, y) coordinates are stored as part of the Map&Compass object.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 08, 2017, 01:57:04 am
I haven't even finished Project: ZeC but my mind is already generating ideas for ZeC II.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on October 08, 2017, 05:25:05 pm
Code: [Select]
var name = candle_flame;

var tile;
var tw = GetTileWidth();
var th = GetTileHeight();
var tn = GetTileName(tile);

var px = GetPersonX(name);
var py = GetPersonY(name);
var pl = GetPersonLayer(name);
var dir = GetPersonDirection(MainChar);

var x;
var y;
var l;

switch (dir) {

case "north":
 
 x = px;
 y = py - 2;
 l = pl;
 tile = GetTile(x, y, l);
 
  if (tn = "burnable_bush") //tile name to be changed later
   {
    if (py == y)
    {
     }
    }
   break;

I am not currently in front of a computer to test this on... Writing the code on my mobile phone. Looking at how this code is written so far, I'm wondering if it will produce an error on var tn due to the fact that var tile technically isn't being define until the switch (dir)?
I'm not even sure what you're trying to do in this example, I'm sure there's a way to do it that's more concise and won't make an error though.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 08, 2017, 06:12:04 pm
I'm not even sure what you're trying to do in this example, I'm sure there's a way to do it that's more concise and won't make an error though.

I was originally trying to come up with a tile checking system for the candle function.

Use the candle, creates a flame, flame slides 2 tiles in direction player is facing.
Is the candle flame on a rock tile, ground tile, bush tile, etc...?
ok, it's a Bush tile, is the bush burnable? Does it access a staircase to a shop or some other cave?

I wrote some code for north only (if it doesn't function for 1 direction it won't function for all directions, I generally start code testing with north) implemented it into the UseCandle() and got all types of errors. Rewrote the code a few times, still got errors. Scrapped that piece of code an started to rethink the whole process of tile checking I was designing. I currently have notes written for the function in inEdit.js. 
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 09, 2017, 12:47:45 am
Having a real problem with computer mice.... This is now the 2nd time I am without a mouse. Makes it very difficult to do map creation.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 09, 2017, 05:56:20 pm
I got another mouse but it is not functioning correctly...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 10, 2017, 10:26:43 pm
I was curious how ZeC would look with Zelda II graphics...

Too bland in Zelda II style
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on October 10, 2017, 11:04:43 pm
Not surprising, the Zelda II overworld graphics were obviously drawn to be very abstract, like looking at a paper map (I mentioned that in your other topic), whereas LoZ is top-down throughout so the tiles are more concrete representations of the objects they depict.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 11, 2017, 12:11:33 am
(I mentioned that in your other topic)

Figured I'd bring that topic over to this one seeing as how it was originally about player movement systems and we were kind of getting off that topic a bit.

Also,

Note: Many different sites state that the bottom of the map where the hammer is located in Zelda 2 is the area from Zelda, denoted by the cemetary, woods & spectacle rock. If it is indeed the area from the original Zelda, then the map for ZeC II will reflect that and have a somewhat matching landscape from P:ZeC.

So I was kind of curious to see what it would be like if I wanted to try to include the overworld map from ZeC.

Unless I do a very scaled down version like how Zelda 2 just had the cemetary, lake, lost woods and spectacle rock... I may not include it in the follow up game. However, it is still way too early to do any decision making on a sequel seeing as how I still need to finish production of the first game.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 11, 2017, 02:29:09 am
Both halves of the Triforce Island level individual rooms are designed.

Next level to create... Death Mountain.

So far, it is the largest level in the game. While Protoleveling, it has 4 seperate sections linked through passageways.

After that, I need to finish a few core functions and then begin coding a battle system for it.

I also need to create a few more minor enemy spritesets and begin to consider what enemies will be guarding the Triforce pieces.

Edit: Actually, it just occurred to me that there is a large portion of the underworld map that I designed but have not coded yet. Gorram! That sets back the plans for a beta release of the game for a little bit.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 12, 2017, 12:30:44 am
Getting really gorram frustrated with this computer mouse...

Edit:

Begin Rant:
For any fans of Family Guy: "You know what grinds my gears..."

I have been unable to do anything with ZeC for hours because of this mouse. Brand new batteries, swap usb ports, clean the lens... nothing. Now almost 2 hours later since this was first posted, it is barely functioning. The pointer on the screen goes between sporatic movement to unresponsive... for the not so cheap cost of peripheral devices these days a non functioning mouse after 2 days is utterly unacceptable. It's enough to write the company about their inferior product.

End Rant

Sorry,  just needed to get that off my chest.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on October 12, 2017, 06:14:23 am
Hey, at least they no longer cost $415 like the original Xerox mouse. :) But yeah, you better return that crap.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 12, 2017, 06:31:36 am
There are still mice that can cost that much. When looking for an inexpesive replacement mouse I found some in the price range of well over 200 dollars. I was like "WTF, it's a mouse... you point and click." Tons of unneeded buttons, some that had trackballs built in (it's an optical mouse, the trackball isn't needed), I even saw one that you can "transform" the mouse cover on. Seriously, is it really that difficult to find a simplistic 2 button wheel mouse nowadays that won't cost 50 dollars and up...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on October 12, 2017, 09:11:43 am
It's generally pretty easy to find $10-$15 mice in my experience.  Also a trackball is something different than a mouse and I actually find they give you more control.  I have one hooked up to my laptop, it's nice.

Even the cheapest mouse shouldn't crap out after 2 days though.  Definitely try to get your money back on that one.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Chad Zechs on October 12, 2017, 10:49:46 am
Also a trackball is something different than a mouse and I actually find they give you more control.

Only once you adjust to it. And depending on your hand dexterity, that can be easy or complicated.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 12, 2017, 06:26:59 pm
Also a trackball is something different than a mouse

I know. Had a logitech trackball attached to a 386pc back in the early 90's. What I'm saying is that I saw a mouse that had the option of being used as a mouse or a trackball.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 12, 2017, 10:57:08 pm
Somehow, the mouse decided to function today. Death Mountain is in the process of being designed. Creating the individual map rooms javascript files. 33 of 60 rooms defined thus far. Largest level in the game. Second largest is the Triforce Island multi-levels with a combined total of 54 rooms. After Death Mountain is created I have to finish coding the underworld.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 13, 2017, 05:14:56 pm
In the process of creating Death Mountain, I came to realize that the levels are not complete. I have created Levels 1 through 7, the dual Triforce Island level and Death Mountain. However, it seems that I skipped Level 8. Now, to design another level for a Triforce Piece... I still need to design a specialty level for a particular item that the player needs to reforge the Master Sword. I'm going back over my developement notes to see what else I may have left out.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 14, 2017, 02:14:08 am
Designed the 'specialty' level. Shortest level in the game but one of the most difficult because of the item it holds. Need to design a new spriteset for one of the NPCs in that level. Still trying to come up with a Protolevel for Level 8. Started to code the missing maps of the underworld. Also need to readjust some of the obstructions on a few of the underworld tiles as I discovered that in certain spots the player can walk on water.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 14, 2017, 05:44:19 pm
Basic design for level 8 is created.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 14, 2017, 09:55:12 pm
I've been trying include other classic gaming references into ZeC. The Triforce Island level was inspired by the Chalice from Adventure for the Atari 2600. Level 8 has been inspired by one of the 'aliens' from Space Invaders also for the Atari 2600. Other classic references are yet to be determind but I would like to try to include others. Either in this project or future projects that I've started to plan out on paper.

Missing Level maps will be posted a little later on...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Eggbertx on October 14, 2017, 10:14:32 pm
I agree, though I was never a huge fan of Zelda 2.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 14, 2017, 10:40:16 pm
The missing map of Level 6 & a Protomap of Level 8.

I agree, though I was never a huge fan of Zelda 2.

Zelda 2 was a very different game than the Legend of Zelda. Many people either like it or don't. The implementing of experience points, magic, the fact that the items found in dungeons no longer needed to equipped to use, the fact that you now had a # of lives and 1-ups could be found in the game.

However, it did set certain standards that were later implemented into a good amount of the game series afterwards, such as the magic meter and Dark/Shadow Link.

Quote from: wikipedia.com
 In August 2008, Nintendo Power listed it as the 12th best Nintendo Entertainment System video game, describing it as a radical and refreshing departure from its predecessor

Quote from: wikipedia.com
Upon its release in North America, Zelda II became one of the most popular NES games of 1988, with many retailers reporting that the game was selling out that year. The game ultimately sold 4.38 million copies worldwide, making it the fifth best selling NES game, behind the Super Mario Bros. series and the first Legend of Zelda game.

It was also very similar in style and game play to The Battle of Olympus.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on October 14, 2017, 11:12:39 pm
I love Zelda II.  Something about the atmosphere of the dungeons and towns always draws me in.  It's also unlike any other game in the series so the experience always feels fresh no matter how many times I go back to it.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 15, 2017, 01:24:00 pm
I haven't looked at my NES game library for quite some time cause it's in a box somewhere. I know I have The Legend of Zelda, I'm pretty sure that I still own my original Zelda II as well.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 16, 2017, 03:04:56 am
Levels...

I think I might want to do some redesign to level 8. I didn't realize it until I made the map I posted but there are a lot of water type rooms on one side of the map. I'm thinking they need to be spread out a little more.

Also, if you look around the Triforce Island level you can see that I finally created the sprites for the 2 master sword halves.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 22, 2017, 11:59:04 pm
Death Mountain
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 23, 2017, 01:05:04 am
Hidden dungeon level
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on October 23, 2017, 07:24:16 am
Not that hidden now, is it? ;)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 23, 2017, 07:33:22 am
While the map may be posted, the actual location on either the overworld or underworld map has never been revealed; so yes, actually, it is very hidden. The location is not obvious and the player must find the entrance. Shortest dungeon in the game but also the most challenging. For the item at the end is needed to reforge the Master Sword...and the OldMan at the entrance takes most of the player's items but returns everything at the end of the level.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on October 29, 2017, 04:54:17 pm
Hey, how's progress? This is one of these projects I really like following. :)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on October 30, 2017, 01:03:17 am
@DaVince The project is on hold for the time being. Things are very stressful at the moment. Real life stuff... I need to move. Been packing the apartment up and trying to find another apartment without much luck so far.

I haven't decided what to do yet. Either, put ZeC on hold for a prolonged period of time or just post the whole project here for someone else to complete.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on October 30, 2017, 06:15:29 am
Good luck with finding a new place to live. I hope you find something soon.

As for the project, I'd say put it on hold, but post the current in-development version for us to check out anyway. A lot of effort has gone into your game and we've lost interesting games before because they weren't shared or kept. You can always come back to it when life becomes less stressful.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on November 04, 2017, 05:50:55 am
The zip file is too large to post in the forum.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on November 04, 2017, 06:29:07 am
The zip file is too large to post in the forum.
Upload it with drop box or sendfile or something OR maybe make a github repository for it?
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on November 22, 2017, 10:27:21 pm
things are still rather hectic & stressful but for the next few days I have access to a laptop with minisphere on it so I can do a little more creation on ZeC.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on January 21, 2018, 10:17:06 am
It has been a little while since I have updated about ZeC. It seems to have fallen into "developement hell" for the time being. I haven't forgotten about it. I don't currently have or have access to a computer that I can continue to develop on. There is still a lot that needs to be created for ZeC. While I may not have a computer at the moment, I have still been coming up with ideas for further ZeC advancement.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on January 25, 2018, 07:04:54 am
That sounds less like development hell and more like a forced hiatus! It's nice that you're still keeping busy by thinking of new ideas, however. Can't wait to see what you'll show us once you're able to continue developing the game. :)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on May 16, 2018, 10:00:16 pm
I have acquired an older PC to continue development of ZeC. Unfortunately, it is quite a few years old and can not handle miniSphere. I would really like to continue the development within miniSphere but for the time being this is what I have to program with. Perhaps in time, I will be able to acquire a somewhat newer machine that will be able to handle the installation of miniSphere. Until then, I must continue with Sphere 1.5.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on May 17, 2018, 01:57:04 pm
Quick Edit:

While I would prefer to once again be programming with miniSphere, I don't want to sound overly negative about the age of the dev machine (WinXP circa 2006-2007). I am glad to be able to be continuing programming ZeC. It has been on hiatus for quite a while now.  However, now I get to go back to programming that pesky bomb function...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on May 18, 2018, 01:05:36 am
The minimum requirement to run ChakraCore (the JavaScript engine miniSphere uses since 5.0) is Windows 7 SP1 so there's probably no hope of getting miniSphere to run on that machine, unfortunately. :(
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Rhuan on May 19, 2018, 06:33:11 am
Could this older machine perhaps run miniSphere 4.x? that should run on somewhat older machines and whilst no longer supported should be a bit better to work with than Sphere 1.5 I'd think.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on May 19, 2018, 12:37:21 pm
@Rhuan I'm not really sure. I haven't tried to install a version of miniSphere on this machine yet. I can attempt an install and see what happens.

Update:

Attempted to install miniSphere 4.5.11 - It would seem that this machine can not handle the installation.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on May 19, 2018, 04:14:29 pm
Tried to install miniSphere back to 4.2. Still couldn't get it to run. Sphere 1.5 it is until I can acquire a dev machine that can actually handle newer tech.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Defiant on May 26, 2018, 04:04:08 pm
I had that issue with an older laptop as well. The machine is likely too old and doesn't like converting a 64 bit program down to a 32 bit environment, it works now ever since I got a newer laptop. But I still use 1.5, too stubborn to convert to miniSphere.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on May 26, 2018, 05:54:15 pm
You had an excuse before as Duktape wasn't *that* much faster, but now you're missing out on blazing fast JS by sticking with 1.5 ;)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Defiant on May 27, 2018, 04:09:03 pm
I'm old and don't like change haha, one day I'll adapt... one day...
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Miscreant on May 28, 2018, 09:45:47 am
I'm old and don't like change haha...

I am neither. I'd really like to not be stuck in the technological stone age but new tech isn't cheap.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: FBnil on July 01, 2018, 01:04:42 pm
@Miscreant Did you manage to screenshot your overworld by snapshotting your maps and resizing them? I have made something once that could do that, so I can polish it a bit if you need it.
It was based off Flik's minimap.js. Basically it loads the map, moves every sprite to -64,-64 (so they are not visible) then creates a surface which is resized and saved to disk. Stitching of the thumbnail maps is a manual labour, but by choosing a good naming scheme, could be automated.

And I too, as I use Linux, did not really migrate yet to the new MiniSphere (I use the old one instead)... But it seems there is a new Linux build, so I might be able to get it to compile again... not sure.
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: DaVince on July 01, 2018, 03:17:43 pm
I'm old and don't like change haha...

I am neither. I'd really like to not be stuck in the technological stone age but new tech isn't cheap.
This is kind of curious to me, as more recent computers have been cheaper and cheaper while easily offering the basic specs that engines like miniSphere require these days. As an example, I'm getting by nicely with a refurbished (albeit fairly high-end for its time) laptop from 2012 for about 250 euros. There were options that would have worked for about 150 as well.

This is just coming from my own experience when really looking around for something half-decent when I barely had any budget myself and found something more than decent though. In all, I don't mean to pry or be rude but I figure that if you looked around enough you'd find something pretty affordable for your needs with miniSphere (and just general PC usability, naturally). I have no clue, of course, what your own situation is, what your options are, if you are in any sort of position to save up for that, et cetera.

Quote
And I too, as I use Linux, did not really migrate yet to the new MiniSphere (I use the old one instead)... But it seems there is a new Linux build, so I might be able to get it to compile again... not sure.
In my experience, it's fairly easy to compile miniSphere as long as you get the development libraries for latest Allegro/LibMNG/OGG/zlib (and I'm probably forgetting a few) from the default repository on Ubuntu at least. Certainly far from the nightmare that compiling original Sphere was. :)
Title: Re: Project ZeC (My Zelda-esque Clone)
Post by: Fat Cerberus on July 01, 2018, 03:51:58 pm
@DaVince I think the last time FBnil was active he was using miniSphere 1.x-ish so that was definitely before I committed to supporting Linux officially.  I now do tarball releases for Linux so building there should be no issue at all these days.