Homebrew [WIP] Undertale Techdemo

Status
Not open for further replies.

CeeDee

fuckin dork
Member
Joined
May 4, 2014
Messages
5,360
Trophies
2
XP
9,901
Country
United States
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.
 

XavyrrVaati

Hobbyist programmer?
Member
Joined
Feb 23, 2014
Messages
385
Trophies
0
XP
478
Country
United States
MFW I realized that it was because I needed to include the 'sound' folder since they are loaded seperately.... hahaha...
 

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,030
Country
United States
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

Pandaxclone2

Pokemon Sprite Artist Hobbyist
Member
Joined
Aug 17, 2015
Messages
1,132
Trophies
0
Location
Earth's Bottle of Death.
XP
2,065
Country
Australia
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

lolzvid

Well-Known Member
OP
Member
Joined
Dec 26, 2014
Messages
148
Trophies
0
Age
22
XP
278
Country
Brazil
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?
 

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,030
Country
United States
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

lolzvid

Well-Known Member
OP
Member
Joined
Dec 26, 2014
Messages
148
Trophies
0
Age
22
XP
278
Country
Brazil
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.
 

XavyrrVaati

Hobbyist programmer?
Member
Joined
Feb 23, 2014
Messages
385
Trophies
0
XP
478
Country
United States
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

farias0

Whatever
Member
Joined
Sep 29, 2015
Messages
142
Trophies
0
Age
27
XP
135
Country
Brazil
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

lolzvid

Well-Known Member
OP
Member
Joined
Dec 26, 2014
Messages
148
Trophies
0
Age
22
XP
278
Country
Brazil
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?
 

ric.

Drivin' to meme country
Member
Joined
Sep 17, 2015
Messages
794
Trophies
0
XP
1,638
Country
Peru
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

VideahGams

Well-Known Member
Newcomer
Joined
Aug 29, 2015
Messages
91
Trophies
0
Age
26
Location
Glasgow, Scotland
Website
videah.xyz
XP
156
Country
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.
 

lolzvid

Well-Known Member
OP
Member
Joined
Dec 26, 2014
Messages
148
Trophies
0
Age
22
XP
278
Country
Brazil
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,

VideahGams

Well-Known Member
Newcomer
Joined
Aug 29, 2015
Messages
91
Trophies
0
Age
26
Location
Glasgow, Scotland
Website
videah.xyz
XP
156
Country
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

lolzvid

Well-Known Member
OP
Member
Joined
Dec 26, 2014
Messages
148
Trophies
0
Age
22
XP
278
Country
Brazil
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
 

Pandaxclone2

Pokemon Sprite Artist Hobbyist
Member
Joined
Aug 17, 2015
Messages
1,132
Trophies
0
Location
Earth's Bottle of Death.
XP
2,065
Country
Australia
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

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    also gonna install twilight menu in my r4 flashcard
  • Psionic Roshambo @ Psionic Roshambo:
    One thing that just occurred to me.... The sound on the 2600 sucked less back then the harsh sound we hear now is from infinitely better speakers we have now, back when the 2600 was new speakers produced a almost muffled sound, like CRTs made old graphics look slightly better.
  • Psionic Roshambo @ Psionic Roshambo:
    I wonder if I could recommend that to some emulation devs that perhaps the sound could use some smoothing out to simulate those old TVs
  • Psionic Roshambo @ Psionic Roshambo:
    I think a few of the early systems could benefit from that, at least up to the 8 bit generation, by the 16 bit generation I think TVs had gotten a lot better in almost every way
  • Xdqwerty @ Xdqwerty:
    i dont have an sd card adapter but I have an usb sd card adapter
  • K3Nv2 @ K3Nv2:
    Old people games
  • Xdqwerty @ Xdqwerty:
    its not the one that comes with the r4
  • Xdqwerty @ Xdqwerty:
    doesnt work (my flashcard is from r4isdhc.com)
  • Xdqwerty @ Xdqwerty:
    might install ysmenu first
  • Psionic Roshambo @ Psionic Roshambo:
    Try Wood firmware
  • Psionic Roshambo @ Psionic Roshambo:
    For your R4
  • Psionic Roshambo @ Psionic Roshambo:
    It's old but it's the best firmware out for DS stuff
  • Xdqwerty @ Xdqwerty:
    it says it only works for the original R4, R4i Gold (r4ids.cn), R4iDSN (r4idsn.com) and Acekard R.P.G.
  • Xdqwerty @ Xdqwerty:
    nvm it does support mine
  • Xdqwerty @ Xdqwerty:
    but why choose it over ysmenu @Psionic Roshambo?
  • Xdqwerty @ Xdqwerty:
    bc im stupid?
  • Xdqwerty @ Xdqwerty:
    yea ik im stupid
  • Xdqwerty @ Xdqwerty:
    good night
  • Psionic Roshambo @ Psionic Roshambo:
    Just give it a try, but honestly if you have a 3DS you can play DS games without a card just off the internal SD card
  • Psionic Roshambo @ Psionic Roshambo:
    Slightly slower loading but a bit more convenient
  • BakerMan @ BakerMan:
    guys, my fuckin headphones have an out of place speaker
  • K3Nv2 @ K3Nv2:
    Did you try wearing them?
    K3Nv2 @ K3Nv2: https://youtube.com/shorts/eJV6GaIEgd4?si=ciLPnlhfd7XcrxQn