Golden Sun Hacking Community
23, January, 2021, 09:25:26 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: The last working version of the classic TLA Editor is Teawater's unofficial "mapeditor" draft.
 
  Home   Forum   DC Wiki Help Search Calendar Downloads Login Register  
Pages: 1 2 3 [4] 5 6 7   Go Down
  Print  
Author Topic: Open Golden Sun: Open source recreation of the Golden Sun engine  (Read 73273 times)
0 Members and 1 Guest are viewing this topic.

Novice Member
*

Coins: 0
Offline Offline

Gender: Male
Posts: 33

« Reply #60 on: 03, April, 2015, 06:25:53 PM »

Hey Atrius,

Thanks for the reply. I finally got around to implementing the method you discussed (your instructions helped a lot). You may have seen my other video of my preliminary battle system where I use a technique called "Billboarding" to attempt to achieve the same effect. I'm basically comparing the two methods for ease of use, flexibility etc...

Here is yours:



Here is mine (note: I'm not doing animations of them at this point, it's just still images):



I have a couple questions for you, I'm hoping you can help me out (this is specific to your method):


  • As you can see in my implementation the background is scrolling slower than yours. Can you tell me how you are determining the speed of your background scrolling? Personally I just take the camera angle 0-360 degrees and translate that to an x-coordinate on the image background.
  • Your background scrolling somehow seems smoother or as if there is motion blurring. Is that the gif or did you actually put that in?
  • I've noticed in the actual game that Sheba seems a lot smaller than Felix. Is there some special consideration for their size that the game does? The current depth calculation doesn't seem to take that into account. If you look at my implementation Sheba is the same height as Jenna. If you look in this image that is not the case.
  • What camera rotation speed do you use? I go 1 degree every frame @ 60fps.

How is Sheba's height calculated?



Approximate camera angle from image above in my engine:



Pretty cool to have this implemented. Although it'll probably be a pain to make that start-up rotation and zoom the actual game does when a battle starts.
« Last Edit: 03, April, 2015, 06:36:31 PM by OpenGoldenSun » Logged

View Profile WWW
Luna_blade
The last member of the Luna clan
Luna Clan

Great Member
*

Coins: 28
Offline Offline

I am: Timeless. As in, i don't have much free time.
Posts: 543

« Reply #61 on: 03, April, 2015, 07:28:47 PM »

Great work man.
Really nice.
Logged

"Hear the sounds and melodies
Of rilets flowing down
They're the verlasting songs
Whispering all the time
As a warning that behind some rocks
There's a rigid grap even
Oreads fear the tread"
View Profile
MaxiPower
Feed Me Coins!!
Venus Clan

Great Member
*

Coins: 20
Offline Offline

Gender: Male
Posts: 699

« Reply #62 on: 03, April, 2015, 11:19:01 PM »

Great work man.
Really nice.
Logged
View Profile
Atrius
Programmer Extraordinaire
Web Host

Fear my blades

Veteran Member
*

Coins: 100
Offline Offline

Gender: Male
Emblems: Website Founder
Clan Position: Creation God of Sol
Posts: 1767

« Reply #63 on: 04, April, 2015, 12:49:23 AM »

  • As you can see in my implementation the background is scrolling slower than yours. Can you tell me how you are determining the speed of your background scrolling? Personally I just take the camera angle 0-360 degrees and translate that to an x-coordinate on the image background.
As I've said, I don't have the original source used to create that demonstration any more.  As I recall I just went with my best guess at what looked good at the time scaled by the camera's relative distance, so it was basically just an arbitrary decision.


  • Your background scrolling somehow seems smoother or as if there is motion blurring. Is that the gif or did you actually put that in?
I believe I did have texture interpolation enabled while drawing the background, so there would have been some "blurring" due to trying to calculate colors between pixels at non-round number coordinates.  Yours is probably more accurate to how Golden Sun really is since the GBA hardware is not capable of interpolation.


  • I've noticed in the actual game that Sheba seems a lot smaller than Felix. Is there some special consideration for their size that the game does? The current depth calculation doesn't seem to take that into account. If you look at my implementation Sheba is the same height as Jenna. If you look in this image that is not the case.
I'll refer you back to where I mentioned a "defaultScale" value in my explanation.
Now, as for field of view and how it affects the scaling of the sprite on screen, it's all a matter of ratios.  Think of the field of view as a cone that extends out from the camera, the size of this cone increases at a fixed ratio (scaleRatio) as the distance increases.  The size a character appears to be on screen is proportional to the amount of that cone they fill, so their sprite's scale will be inverse to scaleRatio multiplied by their distance from the camera.

scale = defaultScale / (scaleRatio * distance)

When initialized defaultScale (normally 1) should be multiplied by (scaleRatio * cameraDist) replacing cameraDist with your camera's default/neutral distance if you want to make the camera distance variable.
The Golden Sun engine has an equivalent for "defaultScale" stored with the sprite data.  You can view this value in the GS:TLA Editor.

For reference:

Isaac: 0.75
Garet: 0.85
Ivan: 0.75
Mia: 0.75
Felix: 0.75
Jenna: 0.75
Sheba: 0.75
Piers: 0.75

(It's my mistake that 0.75 seems to be Golden Sun's default value for defaultScale)

The data doesn't support Sheba being intentionally drawn smaller, Garet is the only odd one out.  I suspect it has something to do with the exact positioning of the characters, and rounding due to the GBA not supporting interpolation.  Still though, looking closely at your comparison image with the Wild Wolf the size of the wolf doesn't look right for this method.  It could be that Golden Sun's battle engine is more faked than I had suspected.


  • What camera rotation speed do you use? I go 1 degree every frame @ 60fps.
I don't recall, but it wasn't based on anything from the real Golden Sun's engine.  I don't think I've stressed this yet, but I haven't actually looked into the code for how the real Golden Sun's battle engine works as far as faking the 3D effect.  Everything I've said is based on my own knowledge/research, and how I would go about creating the same effect.
« Last Edit: 04, April, 2015, 01:26:45 AM by Atrius » Logged

I'm shaking my head in general disapproval of everything
View Profile WWW
Rolina
The Fulminous Witch
Jupiter Clan

Template maker turned lurker

Alchemist
*

Coins: 3
Offline Offline

Gender: Female
I am: wondering if we can get our clan position changed...
Clan Position: Grand Overlady of Jupiter
Posts: 6049

« Reply #64 on: 04, April, 2015, 01:37:56 AM »

One thing I noticed in the games is that the camera has different speeds it can move.  What I figure should be done is a recording of the original games in motion - find the rate of rotation for the opening of battle, the swivel between parties attacking, and the speed for "uber moves" like spark plasma and grand gaia for starters.  I'm pretty sure those are three different speeds.  From there, it should be easier to figure out simply by seeing how many frames it takes to turn the X degrees it turns.
Logged

View Profile WWW

Novice Member
*

Coins: 0
Offline Offline

Gender: Male
Posts: 33

« Reply #65 on: 04, April, 2015, 02:03:35 AM »

@Atrius, thanks for the quick reply, that all makes sense. I'm thinking that I'll have possibly 2 different scale numbers to get this as close as possible to the original. A defaultScale like you've described (starting at 1.0) and a positionalScale, based on where they are in the party position. So for example if Sheba was in position 2 (second position looking from the front) it might be 0.90 - 0.05 or something. I'll see what I come up with, getting pretty close to the battle engine being demoable.

You've mentioned that your method is not really based on the code the engine uses, but that's perfectly fine. You've done the legwork to make a simulation that is pretty damn close. I can tweak stuff to see how close it can be for this.

@Rolina, you raise a good point that I've been meaning to bring up. Does anyone have some good game saves where all characters are in the parties etc...? If anyone could help me out and provide some good ones for GS and GS:TLA that'd be perfect. I know I can recreate it using the editor but if someone already has something that's even better. If would really help for field psynergy and battle psynergy.

@Luna_blade, MaxiPower, thanks guys.
« Last Edit: 04, April, 2015, 02:18:35 AM by OpenGoldenSun » Logged

View Profile WWW
Atrius
Programmer Extraordinaire
Web Host

Fear my blades

Veteran Member
*

Coins: 100
Offline Offline

Gender: Male
Emblems: Website Founder
Clan Position: Creation God of Sol
Posts: 1767

« Reply #66 on: 04, April, 2015, 02:25:29 AM »

Does anyone have some good game saves where all characters are in the parties etc...? If anyone could help me out and provide some good ones for GS and GS:TLA that'd be perfect.

For all saves in the original Golden Sun I'll refer you here, and the TLA equivalent is here.  (Megaupload link is broken, but goldensunhacking.net mirror still works)


EDIT:
Now that I really think about it, I believe the background is moving the exact same speed in both of our examples relative to the rotation speed since both of the GIF animations are only 1 rotation, and the background loops perfectly in both of them.  Maybe my background is x2 speed?  Either way the ratio has to be such that 1 rotation = a whole cycle of the background too.
« Last Edit: 04, April, 2015, 03:14:05 AM by Atrius » Logged

I'm shaking my head in general disapproval of everything
View Profile WWW

Novice Member
*

Coins: 0
Offline Offline

Gender: Male
Posts: 33

« Reply #67 on: 04, April, 2015, 09:00:43 AM »

Here's where I'm at with the battle engine:



Hopefully I can make the next video an actual battle.
Logged

View Profile WWW
Rolina
The Fulminous Witch
Jupiter Clan

Template maker turned lurker

Alchemist
*

Coins: 3
Offline Offline

Gender: Female
I am: wondering if we can get our clan position changed...
Clan Position: Grand Overlady of Jupiter
Posts: 6049

« Reply #68 on: 04, April, 2015, 03:37:44 PM »

For the gifs at the top of the page:

The background is faster in Atrius' rotation.
The sprites are faster in OGS' rotation.
Logged

View Profile WWW
Daddy Poi's Oily Gorillas
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 1002
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2493

« Reply #69 on: 06, April, 2015, 10:24:07 PM »

03000030 = Battle data stuff ==>
 02030034 = Up/Down rotation
 02030036 = Left/Right rotation

030000B0 = Camera destination data pointer ==>
 02031090 = Left/Right rotation destination
 02031094 = Frames to rotate for.

If you compare rot. against the rot. dest., you'll probably notice they're 0xF off, so it likely rotations to the +/-0xF boundary.

The left/right rotation seems to match with this:
0x4000 = During turn selections
0x2000 = Directly after turn selection
0x1500, 0x1C00, 0x2400, 0x2B00 = 1st - 4th PCs
= Actual rotation is based on PC's x/y position, and not slot. (ex: What direction would you be facing if you were looking at the PC from the center?)
*Looks at 08011EA0C function, which is for Ability Type Values 0x2 and 0xF.*
+0xFFFFE000
+0x6000 if enemy
And 0x7FFF
+0xFFFFE000
+= >>0x1F
>> 1
+0x2000

0x2400 = PC use healing psynergy.

Defend/Flee/some Summons do not altar rotation? (Stays at 0x2000)

Quote
One thing I noticed in the games is that the camera has different speeds it can move.  What I figure should be done is a recording of the original games in motion - find the rate of rotation for the opening of battle, the swivel between parties attacking, and the speed for "uber moves" like spark plasma and grand gaia for starters.  I'm pretty sure those are three different speeds.  From there, it should be easier to figure out simply by seeing how many frames it takes to turn the X degrees it turns.
Most rotation seems to be based on 0x3C frames, I think. (60 frames)

Did not check opening of battle, though.

--
030000A8 = Opening entrance stuff (Only points to just one 32-bit.) ==>
 03001380 = Frame counter for opening entrance. Edit this to 0 during the opening, and you'll see the opening entrance happen again.

The openng entrance might be based on rotation for 0x50 (80) frames, ((frame * 0x168) + 0xAF80)
The scaling should be (0xB4 - frame). 0xB4 = 180, so 180%... after the 80 frames, should be 0x64 (100%)...
and the party stats box comes down for 0x20 (32) frames, but starting at frame 0x14 (20). (03001122 changes Y location of this box, but it gets updated every frame, so don't edit & test.)
I think the black transition graphic also animates 1 frame per pixel. Loking at height....  80*2=160 might be the boundary, however, the area is 120, so the last 20 frames would not matter?

I wonder if 030000AC is camera related or not.
« Last Edit: 07, April, 2015, 06:54:59 PM by Fox » Logged

Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)
View Profile

Novice Member
*

Coins: 0
Offline Offline

Gender: Male
Posts: 33

« Reply #70 on: 08, April, 2015, 04:20:29 PM »

Does anyone know where I could find all the sound effects that Golden Sun uses? Like opening the menu, cancelling the menu, using psynergy, etc...

I have the OST, but now I need the game's sound effects.
Logged

View Profile WWW
MaxiPower
Feed Me Coins!!
Venus Clan

Great Member
*

Coins: 20
Offline Offline

Gender: Male
Posts: 699

« Reply #71 on: 08, April, 2015, 04:45:42 PM »

Does anyone know where I could find all the sound effects that Golden Sun uses? Like opening the menu, cancelling the menu, using psynergy, etc...

I have the OST, but now I need the game's sound effects.

I might have them. I will have a look and if so, upload them for you!

EDIT:

https://www.sendspace.com/file/u8des4

Hope its all your looking.
« Last Edit: 08, April, 2015, 04:50:29 PM by MaxiPower » Logged
View Profile

Novice Member
*

Coins: 0
Offline Offline

Gender: Male
Posts: 33

« Reply #72 on: 09, April, 2015, 05:58:19 PM »

Does anyone know where I could find all the sound effects that Golden Sun uses? Like opening the menu, cancelling the menu, using psynergy, etc...

I have the OST, but now I need the game's sound effects.

I might have them. I will have a look and if so, upload them for you!

EDIT:

https://www.sendspace.com/file/u8des4

Hope its all your looking.

Thanks. I ended up doing it the tedious way by recording the applicable audio channels from VBA-M before seeing this.  Sad
Logged

View Profile WWW
MaxiPower
Feed Me Coins!!
Venus Clan

Great Member
*

Coins: 20
Offline Offline

Gender: Male
Posts: 699

« Reply #73 on: 09, April, 2015, 06:14:06 PM »

Lol i posted 25 mins or so after you :P

Least you have them now tho man, thats the main thing... now get back to work!! ;)
Logged
View Profile

Novice Member
*

Coins: 0
Offline Offline

Gender: Male
Posts: 33

« Reply #74 on: 10, April, 2015, 12:32:31 AM »

Wasn't expecting such a quick response.

Quote
now get back to work!! ;)

I have some cool stuff to show...
Logged

View Profile WWW

Novice Member
*

Coins: 0
Offline Offline

Gender: Male
Posts: 33

« Reply #75 on: 10, April, 2015, 04:10:11 AM »

Warping around a map with Alex:

Logged

View Profile WWW
Salanewt
His Sexiness
Global Moderator

Oh yeah, baby!

Prodigy
*

Coins: 203
Offline Offline

I am: A part of the organization of Cool Cats, but more of a dog person in reality.
Emblems: Have a nice day.
Posts: 4610

« Reply #76 on: 10, April, 2015, 04:15:40 AM »

Wow. Even though I haven't really been following this much, I have to say that I really like how you handled the warp spell. Been thinking of experimenting with a hacked utility for GS, and I think I'd want it to be kind of like how yours is set up.

Nice work!
Logged

Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?
View Profile WWW
Daddy Poi's Oily Gorillas
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 1002
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2493

« Reply #77 on: 10, April, 2015, 04:22:44 AM »

Looks awesome!
2 PP? Hmm... Maybe.
I take it this works anywhere as long as the locations are visible on the screen?
Perhaps you should have tried it as an L/R shortcut as well?

Do you plan on also having the field psynergy that Alex used just outside of Venus Lighthouse on the guards...?  (Drench?/Deluge?)
« Last Edit: 10, April, 2015, 04:34:41 AM by Fox » Logged

Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)
View Profile
MaxiPower
Feed Me Coins!!
Venus Clan

Great Member
*

Coins: 20
Offline Offline

Gender: Male
Posts: 699

« Reply #78 on: 10, April, 2015, 09:48:50 AM »

That's awsome man. Some neat puzzels could be implemented with that and even could used with other pysngery or be used to add in new puzzels to past areas. It would be a neat near end game psyngry to get.
« Last Edit: 10, April, 2015, 11:31:27 AM by MaxiPower » Logged
View Profile

Novice Member
*

Coins: 0
Offline Offline

Gender: Male
Posts: 33

« Reply #79 on: 10, April, 2015, 03:20:16 PM »

Quote
Do you plan on also having the field psynergy that Alex used just outside of Venus Lighthouse on the guards...?  (Drench?/Deluge?)

Shh... spoilers.  Happy
Logged

View Profile WWW
Pages: 1 2 3 [4] 5 6 7   Go Up
  Print  
 
Jump to:  

Chatbox
15, November, 2020, 03:45:26 PM
Salanewt: We're more alive than the board implies; most discussion takes place over on the Discord server.
15, November, 2020, 03:45:06 PM
Salanewt: Haha, heya!
15, November, 2020, 02:07:50 PM
Frog: Nice to see this place is still alive...ish anyway xD
30, October, 2020, 11:10:23 PM
Salanewt: ... Actually, it's almost time for me to post an update on the forum. It's been coming along really nicely overall, and it was only a couple months or so ago that I added some new status effects to the game.
30, October, 2020, 11:08:41 PM
Salanewt: I need to get it done to start making progress on the parts of the AI Overhaul I want to start working on.
30, October, 2020, 11:08:14 PM
Salanewt: It's going well! I wanted to get more of my djinn reform done this week but I've been busy with other things sadly.
30, October, 2020, 09:58:14 PM
KyleRunner: Hi guys! How are you doing?
13, October, 2020, 11:19:21 AM
MaxiPower: first chapter of my golden sun inspired webtoon is now live. be cool if yas could check it out. https://www.webtoons.com/en/challenge/legacy-of-the-lost-dragoon/the-northern-reaches/viewer?title_no=508487&episode_no=6
31, August, 2020, 08:40:32 AM
Daddy Poi's Oily Gorillas: Being able to convert IPS files to text files to also supporting commenting, and convert back to IPS after changes.... sounds like a fun strategy? 
27, August, 2020, 10:37:30 PM
Salanewt: Hey, thanks! 
25, August, 2020, 12:59:22 AM
Foreclosure: Yo! Looking forward for this AI OVerhaul patch when it's finished :) :) 
19, August, 2020, 07:00:17 PM
Salanewt: That's awesome! I'm pretty good; been working on an AI Overhaul project and have made some nice progress in the past couple weeks; the goal for tonight is to add Deadbeard to GS2 and then I can move onto something new.
19, August, 2020, 01:14:56 PM
Awec: Ye not bad, just checked back in for updates on GS Reloaded really. Although now I'm looking back through some of my old forum posts, which is fun :D how are you?
19, August, 2020, 01:43:07 AM
Salanewt: It sure is! How have you been?
16, August, 2020, 09:40:57 AM
Awec: Yo nice to see this forum is still going
14, August, 2020, 09:06:44 PM
Salanewt: Hey! How goes it?
01, August, 2020, 01:31:53 PM
KyleRunner: Hello, people!
08, July, 2020, 08:57:11 PM
Salanewt: That awkward feeling when almost a quarter of a year goes by without anyone posting a message in this chatbox.
27, April, 2020, 07:54:10 PM
Daddy Poi's Oily Gorillas: I'm having a thought. So I know Atrius's editor is slow at saving sprites.... So I've been thinking.   I am considering another console program.  This time, for importing and exporting sprites/animations. Image files (for sprites), binary files (for animation data), and maybe binary or text files for Settings. Would certainly be cool if it works out. - Console programs are fun, when you can (at least temporarily) cheat out making a full interface editor for them. =P
25, April, 2020, 10:42:07 PM
Daddy Poi's Oily Gorillas: Tried to list those in order of importance, but anyway....
25, April, 2020, 10:37:59 PM
Daddy Poi's Oily Gorillas: GSHC, GS Speedrunning, /r/Golden Sun, GS United Nations, ToK.  Sixth one is border-line I'm not sure.
25, April, 2020, 08:00:21 PM
Daddy Poi's Oily Gorillas: (low as in <100)
25, April, 2020, 08:00:04 PM
Daddy Poi's Oily Gorillas: So while there are quite a few GS Communities out there. There are only up to maybe ~6 Discords worth even the consideration of joining, I think. Most of the rest of them have a fairly low member count. (Of which I can tell?)
14, April, 2020, 10:49:35 AM
Daddy Poi's Oily Gorillas: The Essential Age could be what it stands for?
13, April, 2020, 05:23:32 PM
Misery: Tea editor... that's a cute name for it
01, April, 2020, 02:42:48 AM
JupiterDjinn: Also my browser is sending two o f my messages srry.
01, April, 2020, 02:42:06 AM
JupiterDjinn: Just got the reply. Ok my question is: how can I get the tea editor on Android, because I already have an emulator. But no computer.
31, March, 2020, 07:18:29 PM
Salanewt: Sure thing!
31, March, 2020, 03:38:27 PM
JupiterDjinn: Can I have a question answered?
28, March, 2020, 12:50:13 AM
Salanewt: I want to shrink it down in size later, but yup!

Affiliates
Temple of Kraden Golden Sunrise
Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.083 seconds with 23 queries.