Homebrew [WIP] Undertale Techdemo

  • Thread starter Thread starter lolzvid
  • Start date Start date
  • Views Views 131,920
  • Replies Replies 275
  • Likes Likes 42
Status
Not open for further replies.
8a0qldc.png


Have shitty logo mockup, for whatever this turns into.

If anyone needs (or wants) me to try again once an official name is made (if anything comes out of this) then I could.
 
MFW I realized that it was because I needed to include the 'sound' folder since they are loaded seperately.... hahaha...
 
Awesome!!! Haven't beat the game on PC yet, but have put a good 6 hours into it.
 
Not sure how current the source is on git- but the audio_load function is freeing the buffer it is playing from. This should not be released until the sound is stopped - in audio_stop.
 
  • Like
Reactions: lolzvid
All of my yes!! :wub: I'd love to see this at least working up to full demo potential. I hope Toby will eventually get Undertale out there on the 3DS.

EDIT: Here's a few icons I mocked up quickly:
MBJ5OW5.png
qTkf3IE.png
KjH4H22.png


The .3dsx doesn't seem to be working. Just boots a black screen. Also scaling the sprites down shouldn't be too hard. All you'd need to do is resize them down by 50%.
 
Last edited by Pandaxclone2,
  • Like
Reactions: lolzvid
8a0qldc.png


Have shitty logo mockup, for whatever this turns into.

If anyone needs (or wants) me to try again once an official name is made (if anything comes out of this) then I could.

All of my yes!! :wub: I'd love to see this at least working up to full demo potential. I hope Toby will eventually get Undertale out there on the 3DS.

EDIT: Here's a few icons I mocked up quickly:
MBJ5OW5.png
qTkf3IE.png
KjH4H22.png


The .3dsx doesn't seem to be working. Just boots a black screen. Also scaling the sprites down shouldn't be too hard. All you'd need to do is resize them down by 50%.

Thanks for the icons! They look perfect, and I'll add them to the demo (with credits, obviously)!

Not sure how current the source is on git- but the audio_load function is freeing the buffer it is playing from. This should not be released until the sound is stopped - in audio_stop.

How can that be fixed? I got the code from an example from clank201, and I still didn't research a lot into the inner workings of it (but even that, it still works fine).

---

About the .3dsx: I've got some friends to test it and it worked every single time (Citra and real hardware).
Did you add the "data" and "audio" folder together with the .3dsx and .smdh files?
 
Thanks for the icons! They look perfect, and I'll add them to the demo (with credits, obviously)!



How can that be fixed? I got the code from an example from clank201, and I still didn't research a lot into the inner workings of it (but even that, it still works fine).

---

About the .3dsx: I've got some friends to test it and it worked every single time (Citra and real hardware).
Did you add the "data" and "audio" folder together with the .3dsx and .smdh files?
Just remove the call to linearFree in the audio_load function. At this point your project is small and the freed memory is not being reused. If it did get reused then the music would get overwritten with data - which would not sound so good.
 
  • Like
Reactions: lolzvid
I've just made a bare bones collision detection, only to make sure that the player doesn't go outside the boundaries of the screen.

Can anybody extract Frisk's sprites from the game? I still don't have some sprites (player walking up and down).

Also, GitHub is now updated with the code.
 
I've just made a bare bones collision detection, only to make sure that the player doesn't go outside the boundaries of the screen.

Can anybody extract Frisk's sprites from the game? I still don't have some sprites (player walking up and down).

Also, GitHub is now updated with the code.
I'll do a bunch of programming tonight, and I'll look into grabbing the sprites if that aren't done yet!
 
  • Like
Reactions: lolzvid
Thanks to @Kerouz, now we have all the sprites for the animations (and there are some other great resources included, too)!
 
  • Like
Reactions: krz0001
You guys are my heroes! I just didn't buy it yet because I don't feel like doing a lot of PC gaming lately and I was waiting for a Steam promotion, but if this homebrew comes out I'll buy the game instantly and play it on my 3DS :D
 
  • Like
Reactions: lolzvid
I've made an interesting discovery today: if the system is drawing images/text on both screens, the player's movements are slowed down.

Could it be because the CPU is in usage when rendering the images?
 
I've made an interesting discovery today: if the system is drawing images/text on both screens, the player's movements are slowed down.

Could it be because the CPU is in usage when rendering the images?
Most likely. As far as I know homebrew doesn't make use of the console's GPU, so all that workload is being dumped on the console's main processor.
Of course I have no idea how you'd actually go on about making use of the GPU, but perhaps some of the more experienced homebrew developers might be able to lend you a hand there.
 
  • Like
Reactions: lolzvid
I've made an interesting discovery today: if the system is drawing images/text on both screens, the player's movements are slowed down.

Could it be because the CPU is in usage when rendering the images?

You have to use delta time to make sure the players movement isn't tied to framerate.

Wikipedia has a good description as to what that is:

It is done by calling a timer every frame that holds the time between now and last call in milliseconds. Thereafter the resulting number (Delta Time) is used to calculate how much faster that, for instance, a game character has to move to make up for the lag spike caused in the first place.
 
You have to use delta time to make sure the players movement isn't tied to framerate.

Wikipedia has a good description as to what that is:

It is done by calling a timer every frame that holds the time between now and last call in milliseconds. Thereafter the resulting number (Delta Time) is used to calculate how much faster that, for instance, a game character has to move to make up for the lag spike caused in the first place.
Thanks! I'll do some tests here to see if the framerate drops when using both the screens.

EDIT: I've done some testing, here are the results:

One screen being used: ~480fps
Two screens being used: ~240fps

Conclusion: drawing stuff on both screens causes the framerate to drop, and affecting the player.

So, is it possible to cap the framerate to 60fps? I think that would solve the player's speed and some other minor graphical glitches that happens sometimes.
 
Last edited by lolzvid,
Thanks! I'll do some tests here to see if the framerate drops when using both the screens.

EDIT: I've done some testing, here are the results:

One screen being used: ~480fps
Two screens being used: ~240fps

Conclusion: drawing stuff on both screens causes the framerate to drop, and affecting the player.

So, is it possible to cap the framerate to 60fps? I think that would solve the player's speed and some other minor graphical glitches that happens sometimes.

If you use delta time then the player will move at the same speed no matter the framerate.
Here's a quick/rough implementation off the top of my head:
Code:
int prevTime = 0;
int currTime = 0;
float dt = 0;

void timerStep() {

    prevTime = currTime;

    currTime = osGetTime();

    dt = currTime - prevTime;

    dt *= 0.001;

    if (dt < 0) dt = 0; // We don't want dt to be negative.

}

// Call timerStep() before your draw code each frame.

Then you would multiply the players speed by dt.

Code:
player_y += speed;
Would become
Code:
player_y += speed * dt;

You may have to change the speed variables value to get the speed you want though.
 
  • Like
Reactions: lolzvid
If you use delta time then the player will move at the same speed no matter the framerate.
Here's a quick/rough implementation off the top of my head:
Code:
int prevTime = 0;
int currTime = 0;
float dt = 0;

void timerStep() {

    prevTime = currTime;

    currTime = osGetTime();

    dt = currTime - prevTime;

    dt *= 0.001;

    if (dt < 0) dt = 0; // We don't want dt to be negative.

}

// Call timerStep() before your draw code each frame.

Then you would multiply the players speed by dt.

Code:
player_y += speed;
Would become
Code:
player_y += speed * dt;

You may have to change the speed variables value to get the speed you want though.

Thanks a lot dude, now the player speed is just perfect :D

I'll update my GitHub repository with the code in some minutes
 
Are you guys aiming to port the full game later on or just the demo?

EDIT: I am seriously looking to make a complete demo of Undertale for the 3DS, but that will take quite a while to make it.

I doubt we'd get a full game made unless Toby Fox somehow allowed it.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum