Maidens of the Kaleidoscope
~Hakurei Shrine~ => Rika and Nitori's Garage Experiments => Topic started by: WishMakers on April 19, 2020, 08:05:10 PM
-
Welcome to the Danmakufu Q/A thread! This is a continuation of the V2 thread, finally back in action.
Ask your questions here should you have a problem with Danmakufu, be it an error that you can't find, problem with the program, etc.
Previous thread
Danmakufu Wiki (http://dmf.shrinemaiden.com)
DNH Function Docs (http://sparen.github.io/ph3tutorials/docs.html)
Major Info Thread
-
I'm having trouble animating a "gravitational aura" around a boss. The only Danmakufu scripts I've come across that have made use of these can be found here (https://www.youtube.com/watch?v=2hVmjJrUzmM (https://www.youtube.com/watch?v=2hVmjJrUzmM)) and here (https://www.youtube.com/watch?v=bxf9Hvkx5oE (https://www.youtube.com/watch?v=bxf9Hvkx5oE)). In case I'm not clear, I mean the circle around the boss that causes the background to pulsate and warp. I've examined both of these scripts' code and am still unsure how it was accomplished. Can someone help?
EDIT: Nevermind, I got it to work!
-
I have a new question! I'm struggling with understanding packages. When I launch th_dnh.exe, I want it to immediately run the package declared in th_dnh.def like package.script.main = x/y/z.dnh. Despite having declared the package as such in the .def file, the package does not launch automatically, and I am instead brought to the regular Danmakufu menu. I checked to make sure the path was correct, and the package works if I select it from the menu. What am I missing?
-
Greetings! I am relatively new to Danmakufu, working my way through Sparen's tutorials, trying out my own stuff or to tinker with his provided code for learning's sake - long story short, for some reason the task TFinalize he provides only goes off in one of my scripts. I always call it in @Initialize, I have moved it into a function library outside of the pastebins below to ensure all my scripts make use of the same TFinalize task and, quite frankly, I am stumped. :( It does work in all my scripts when moved into @MainLoop, but then awards way too many points on spell capture for obvious reasons.
I've tried to search the old forum as well as Google for my issue before posting here, but have not found aught that could help me - doesn't mean it's not there, merely that I failed to find it.
https://pastebin.com/MucNFquT (https://pastebin.com/MucNFquT) One of my scripts where TFinalize does not work.
https://pastebin.com/urXMyXZN (https://pastebin.com/urXMyXZN) My script where TFinalize does work.
Apologies if I missed out on anything else you might need!
EDIT: Please do notify me if I did. I... generally try to avoid getting help since most of the time, it's just me being stupid or my search engine fu being weak, so I'm far from used to making these posts...
EDIT 2: I am a fool thrice over and I have figured it out - I needed to yield; in @MainLoop... still leaving the post here in case anyone else stumbles over the same issue - my utmost apologies ;_;
-
Despite having declared the package as such in the .def file, the package does not launch automatically, and I am instead brought to the regular Danmakufu menu. I checked to make sure the path was correct, and the package works if I select it from the menu. What am I missing?
Here's a good example of a def file, just in case you're still stuck.
window.title = <redacted>
package.script.main = Script/package.dnh
screen.width=640
screen.height=480
I'm sure you have everything like that, but make sure the name of the .def file is th_dnh.def and in the same folder as the exe. Other than that, I'm not sure personally, but I don't work with .def files very often.
Do you have any more info about the issue? What does your setup look like?
-
Thank you so much for your reply! I tried messing around with the .def file after seeing your sample, and I figured out the problem!
I had declared package.script.main before window.title, and my window title had a "~" character in it. Even though the window would work with the ~ and launch to the regular danmakufu window, after removing it, it launched the package!
For further context, I am using your Woo version of Danmakufu, if that makes any difference in how the .exe interprets the .def. Either way, thank you for your help! It is greatly appreciated. :D
-
I'm new to danmakufu, and each time I tried to run the engine, it crashes and leaves a file called "Gcprojectcrash", I already used locale emulator and I downloaded the Ph3 version
I already posted it in Moriya shrine, but no one replied
Thank you for your reply!
Pichuun! :power: :power: :power: :bigpower: :power: :power: :power:
-
I'm new to danmakufu, and each time I tried to run the engine, it crashes and leaves a file called "Gcprojectcrash", I already used locale emulator and I downloaded the Ph3 version
Can you explain your problem in more detail? What script were you trying to run, if any? When and where does it crash?
For the record, for PH3 Locale Emulator shouldn't be necessary so if you turn that off I think you'll be fine.
-
Hello friends!
So I've been following Sparen's Danmakufu ph3 tutorials for a while, but I've gotten stuck at the process of creating a plural. Whenever I create a plural and try to run it in Danmakufu, the game refuses to give me an error warning and simply crashes on the spot, even though I've created the simplest plural imaginable. But, still, here's the text file for it:
#TouhouDanmakufu[Plural]
#ScriptVersion[3]
#Title["Vs. Momiji"]
#Text["For Kiiro"]
@Event
{
}
@Initialize
{
TPlural;
}
@MainLoop
{
yield;
}
task TPlural
{
let dir = GetCurrentScriptDirectory();
let obj = ObjEnemyBossScene_Create();
// ObjEnemyBossScene_Add(obj, 0, dir ~ "momiji 1.txt");
ObjEnemyBossScene_Add(obj, 0, dir ~ "momiji spell 1.txt");
ObjEnemyBossScene_LoadInThread(obj);
ObjEnemyBossScene_Regist(obj);
while(!Obj_IsDeleted(obj)){
yield;
}
CloseScript(GetOwnScriptID());
}
Again, I get no error message, so I have no idea what could be going wrong. Can anyone give me a hand, please? Thank you so much.
EDIT: Figured it out! Turns out it has to do with how notepad++ saves .txt files.
-
I've got some trouble working with Package scripts now. When I run all my singles, plurals, and the stage through the normal menu everything works as intended. However, when I launch the game through the package script, something strange happens.
Whenever I hit "Retry from Beginning" in my pause script which returns RESULT_RETRY, it keeps the game paused, and a new instance of the game opens up in the same window while the previous instance remains paused. At this point, there will be a paused instance of the stage and a running instance of the stage, and only the running instance detects key inputs. If I repeatedly select retry, more instances of the stage will open in the same way.
If I hit "Return to Title" for RESULT_END, the currently running instance of the stage will close because of TerminateStageScene(), and the most recent previous instance of the game will render and begin accepting key inputs. This will continue until all instances of the stage are closed, at which point, the package will close.
The code for my package script is below.
EDIT: I found out what the problem was. I was restarting the stage from the pause menu, meaning I couldn't finalize the stage scene. I moved the recursive TStageScene call to a point after calling FinalizeStageScene and now it works.
#TouhouDanmakufu[Package]
#Title["Touhou ~ Forlorn Souls of Wicked Past"]
#Text["-NL"]
#System["./system/Default_System.dnh"]
#Player["./player/player_reimu.dnh"]
@Initialize{
TStageScene(GetCurrentScriptDirectory ~ "x1/stage1.dnh", GetCurrentScriptDirectory ~ "player/player_reimu.dnh", "");
}
@MainLoop{
yield;
}
@Finalize{}
// STAGE SCENE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
task TStageScene(let stagePath, let playerPath, let replayPath){
ClearCommonData;
// Prepare the Stage Scene ------------------------------
InitializeStageScene();
// If a replay was called ------------------------------
if(length(replayPath) > 0){
SetStageReplayFile(replayPath);
}
let indexStage = 1;
SetStageIndex(indexStage);
SetStageMainScript(stagePath);
SetStagePlayerScript(playerPath);
StartStageScene();
loop{
// Hitting the pause key
if(GetVirtualKeyState(VK_PAUSE) == KEY_PUSH){
let resPause = RunPauseScene();
alternative(resPause)
case(RESULT_RETRY){
if(!IsReplay()){
TerminateStageScene();
TStageScene(stagePath, playerPath, replayPath);
ClearCommonData;
}
}
case(RESULT_END){
TerminateStageScene();
// ClosePackage();
}
}
let stgSceneState = GetStageSceneState();
if(stgSceneState == STAGE_STATE_FINISHED){
let stageResult = GetStageSceneResult();
alternative(stageResult)
case(STAGE_RESULT_CLEARED){
TEndScene();
break;
}
case(STAGE_RESULT_PLAYER_DOWN){
TEndScene();
break;
}
case(STAGE_RESULT_BREAK_OFF){
// TTitleScene();
TEndScene();
// ClosePackage();
break;
}
}
yield;
}
}
// PAUSE SCENE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function RunPauseScene{
RenderSceneToTransitionTexture();
PauseStageScene(true);
let pathScript = GetCurrentScriptDirectory ~ "system/New_Pause.dnh";
let idScript = LoadScript(pathScript);
StartScript(idScript);
while(!IsCloseScript(idScript)){
yield;
}
PauseStageScene(false);
let res = GetScriptResult(idScript);
return res;
}
// END SCENE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
task TEndScene{
if(IsReplay){
// TTitleScene();
return;
}
FinalizeStageScene();
while(GetVirtualKeyState(VK_OK) != KEY_FREE){yield;}
let dirModule = GetModuleDirectory();
let pathScript = GetCurrentScriptDirectory ~ "system/New_EndScene.dnh";
let idScript = LoadScript(pathScript);
StartScript(idScript);
while(!IsCloseScript(idScript)){
yield;
}
let result = GetScriptResult(idScript);
alternative(result)
case(RESULT_SAVE_REPLAY){
TReplaySaveScene();
}
case(RESULT_END){
// TTitleScene();
ClosePackage();
}
case(RESULT_RETRY){
TStageScene("","","");
}
}
// REPLAY SAVE SCENE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
task TReplaySaveScene{
let dirModule = GetModuleDirectory();
let pathScript = GetCurrentScriptDirectory ~ "system/New_ReplaySaveScene.dnh";
let idScript = LoadScript(pathScript);
StartScript(idScript);
while(!IsCloseScript(idScript)){
yield;
}
// TTitleScene();
ClosePackage();
}
function RenderSceneToTransitionTexture{
let textureName = GetTransitionRenderTargetName();
RenderToTextureA1(textureName, 0, 100, true);
}
-
Can you explain your problem in more detail? What script were you trying to run, if any? When and where does it crash?
For the record, for PH3 Locale Emulator shouldn't be necessary so if you turn that off I think you'll be fine.
I tried to run the EXRumia script, I'm on Windows 10, and every time I tried to run the Danmakufu it just crashes and left an error BMP. File. Had a Segurazo virus once, note that
-
Hello, been working on a coding a player for a while, I'm trying to figure out how to animate my character, which the tutorial I was using (Helepolis) didn't cover much, here's my code for rendering the player
https://pastebin.com/364tY5rd
For some reason, it doesn't seem to be animating, just staying on one static sprite based on the key presses. any ideas on why/ a better way to do it?
-
Hello, been working on a coding a player for a while, I'm trying to figure out how to animate my character, which the tutorial I was using (Helepolis) didn't cover much, here's my code for rendering the player
https://pastebin.com/364tY5rd
For some reason, it doesn't seem to be animating, just staying on one static sprite based on the key presses. any ideas on why/ a better way to do it?
The way you have it now, every single frame, you're defining a new variable under those two names initialised to the value 0 -- you don't want that.
Instead, you want to define animFrame and animFrame2 outside of the while loop, not inside.
-
The way you have it now, every single frame, you're defining a new variable under those two names initialised to the value 0 -- you don't want that.
Instead, you want to define animFrame and animFrame2 outside of the while loop, not inside.
Ah, it seems that was what I have overlooked, thanks!
-
Hi!
It's being a long time since I came here for the last time (I mean, it was still the old MotK forum...).
I have just a question... where is the danmakufu wiki with all the functions now? Last time I checked it it was here: http://dmf.shrinemaiden.org/wiki/Main_Page
But it's dead now. Please tell me all this usefull stuff is not lost for ever. Tell me that the danmakufu comunity is not dead.
-
Hi!
It's being a long time since I came here for the last time (I mean, it was still the old MotK forum...).
I have just a question... where is the danmakufu wiki with all the functions now? Last time I checked it it was here: http://dmf.shrinemaiden.org/wiki/Main_Page
But it's dead now. Please tell me all this usefull stuff is not lost for ever. Tell me that the danmakufu comunity is not dead.
Wiki is down permanently as noted in one of the forum transfer threads. If it is resurrected, it will be in a different form.
If you need the function reference, the wiki is saved on the Wayback Machine (https://web.archive.org/web/*/http://dmf.shrinemaiden.org/wiki/Main_Page) and many parts have already been saved and backed up to websites (e.g. https://sparen.github.io/ph3tutorials/docs.html) and into various plugins for IDEs.
-
Thanks for the answer. That's not a good news for the wiki but I'm glad some people and The WaybackMachine saved the functions list.
I'm gonna work on a .doc to save this in one more place. This list is too precious to be lost.
-
Hello
Is there a way or a work around to add optional parameters with a default value in functions or tasks ?
Thanks
-
Hello
Is there a way or a work around to add optional parameters with a default value in functions or tasks ?
Thanks
In default Danmakufu ph3, there is no way to do this, unfortunately. There is also no reliable way to check the type of an input or check if a value has been assigned, so you also can't perform null checks.
The only real case where defaults exist is for built-in systems like object values and CommonData.
-
Found this active branch which does allow overcharging functions and type checking https://github.com/Natashi/Touhou-Danmakufu-ph3sx-2
-
Hi, im starting with danmakufu and i have trouble with lasers that they dont show in the battle.
Here is all the code: https://pastebin.com/Cmc6gw5b
Thanks
-
Hi, im starting with danmakufu and i have trouble with lasers that they dont show in the battle.
Here is all the code: https://pastebin.com/Cmc6gw5b
Thanks
Are the graphic IDs you used defined in your shot sheet?
-
How important / Useless is the "Bullet Controll" Thing?
And what are the dhn archives?
-
How important / Useless is the "Bullet Controll" Thing?
And what are the dhn archives?
I'm not sure what you're referring to by Bullet Controll
As for DNH Archives, they are a way of compressing a bunch of files (e.g. images, sound) into a single file. It makes it harder for people to access the contents inside.
-
I was wondering why Rumia just shoots at her spawn position
For the "shoots when she spawned" use a wait(60); before the loop
task Fire{
let angleT = GetAngleToPlayer(objBoss);
wait(60);
loop(12){
CreateShotA1(bossX, bossY, 2, angleT, DS_BALL_S_RED, 5);
angleT += 360/12;
}
}
-
I'm just wondering if there's a way to make Rumia shoot for the entire length of the script
You're going to want to make your Fire task have a loop.
For starters, you can use the following to repeat some code over and over again.
while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0) {
// Firing bullets + some wait time goes here
}
-
Hi, I'm following Sparen's tutorial, but i noticed that it has no information about packages and the way they are handled; so I don't really know where to start to create one.
The question is: Should I use the ExRumia package as a reference? Is there some magical tutorial or something else that I can use to learn more about packages?
Thank you for your attention :cirnotan:
-
packages
What don't you understand about the ExRumia package? The most basic package lesson would simply cover something like it, since it contains mostly everything you need to run a game anyway.
-
There are some tasks that I can't understand well, like TStageScene() or RunPauseScene() for example; When are this kind of tasks executed in the package? I recently started to create stage scripts with bosses, so I know that maybe I need more experience but I'm just looking for some advice to start with packages because I'd like to do something bigger. I'll accept anything.
Thanks for the answer
-
There are some tasks that I can't understand well, like TStageScene() or RunPauseScene() for example; When are this kind of tasks executed in the package? I recently started to create stage scripts with bosses, so I know that maybe I need more experience but I'm just looking for some advice to start with packages because I'd like to do something bigger. I'll accept anything.
Thanks for the answer
Take a look at the package for how they are defined and used. I don't recommend working with packages until you have a firm understanding of how tasks and scripts work in Danmakufu.
-
I really dont understand how does sprite sheets work. I mean, i have 2 questions
1: Where can i find them?
i tried the "The sprite recourses" web (https://www.spriters-resource.com/pc_computer/touhoufuujinrokumountainoffaith/sheet/51906/) but in the image appears all the bosses, but i only need 1
2: The coordinates
Is there a way to know the sprite's coordinates to dont make it glitch in battle? (Same problem with shot sheets)
thanks
-
I really dont understand how does sprite sheets work. I mean, i have 2 questions
1: Where can i find them?
i tried the "The sprite recourses" web (https://www.spriters-resource.com/pc_computer/touhoufuujinrokumountainoffaith/sheet/51906/) but in the image appears all the bosses, but i only need 1
2: The coordinates
Is there a way to know the sprite's coordinates to dont make it glitch in battle? (Same problem with shot sheets)
thanks
1. You already have what you need. Any image editor can crop the image down to the boss you want
2. Most image editors will tell you the coordinates of a given pixel. In addition, in a sprite sheet, most sprites are the same size, so knowing the height and width of the area with the boss sprites is usually enough to determine the dimensions of a single sprite (e.g. width/#sprites)
-
Hello, I'm having troubles creating stage enemies; the thing is, I can create the stage enemies well, but is there a way to make the boss wait until the other enemies are defeated? I've tried some solutions by myself but still all the enemies appear with the boss and I can't make it work.
Another doubt I got is: In the StageEnemy creation, there's the following line: "SetDamageRateAtFrameEnm(objEnemy, 80, 50, 30);". This is a function/task that I'm not really sure what it does; the enemies still work but It would be nice if you can tell me its purpose.
Here's some code if you want to see:
Stage code: [attachment=1]
STGEnemy code: [attachment=2]
Thank you for your attention.
-
Hello, I'm having troubles creating stage enemies; the thing is, I can create the stage enemies well, but is there a way to make the boss wait until the other enemies are defeated? I've tried some solutions by myself but still all the enemies appear with the boss and I can't make it work.
Personally, I use this function from Ultima:
/* *************************************************************************
*void WaitForZeroEnemy() -- Waits for there to be no enemies on screen
************************************************************************* */
function WaitForZeroEnemy(){ //ULTIMA
while(length(GetAllEnemyID()) > 0){yield;}
}
-
Hello, I'm not so new to danmakufu but have stopped messing with it for a while and wanted to warm up again.
Recently I've been working on a simple function in PH3. Basically a function that extends the player whenever it gets a certain amount of points(Like PCB). The major problem I'm having is with the GetPoint function. It basically doesn't work, not returning the actual points collected.
I have tried checking if my function was written wrong. But I have noticed it works using GetGraze instead. I have also noticed that whenever I try to print the number of points collected(Using text functions), it basically doesn't update the actual count(Notice I am calling the function every frame). So I really wonder if the GetPoint function actually works on PH3...
Here is the function I am refering to(I have called it on the stage script btw): https://pastebin.com/cUxjiM2x
(Apologies if the post is messy, it's my first time posting here.)
-
Recently I've been working on a simple function in PH3. Basically a function that extends the player whenever it gets a certain amount of points(Like PCB). The major problem I'm having is with the GetPoint function. It basically doesn't work, not returning the actual points collected.
I have tried checking if my function was written wrong. But I have noticed it works using GetGraze instead. I have also noticed that whenever I try to print the number of points collected(Using text functions), it basically doesn't update the actual count(Notice I am calling the function every frame). So I really wonder if the GetPoint function actually works on PH3...
Here is the function I am refering to(I have called it on the stage script btw): https://pastebin.com/cUxjiM2x
Danmakufu doesn't actually automatically add points - you need to do so manually via AddPoint.
Personally, I would have a task running in the system script that's checking a CommonData value in order to handle extends, and I'd use a CommonData value to track your custom points.
-
Danmakufu doesn't actually automatically add points - you need to do so manually via AddPoint.
Personally, I would have a task running in the system script that's checking a CommonData value in order to handle extends, and I'd use a CommonData value to track your custom points.
I see, gonna check your common data tutorials, thanks for the help!
-
Hi, i need help with some bullets. I want to make a hammer fall when the other one is deleted, however, i tried it and this is how it ended: https://gyazo.com/8fcff2a6ef204c393af1559907373f65
Here is the whole code for if i did something wrong with the speed or delay: https://pastebin.com/EEULKn2r
Thanks for the help
-
Hi, i need help with some bullets. I want to make a hammer fall when the other one is deleted, however, i tried it and this is how it ended: https://gyazo.com/8fcff2a6ef204c393af1559907373f65
Here is the whole code for if i did something wrong with the speed or delay: https://pastebin.com/EEULKn2r
Thanks for the help
It's a bit embarrassing replying to such an old topic. Do you still need help? :cirnotan:
Note that I can't see your gyazo video as the link is invalid. Well, first off, your "move", "fire", and "fire2" tasks don't seem to be used anywhere. I would recommend not keeping unused tasks like these around your code.
Second,
ascent(i in 30 .. 3300)
{
if(Obj_IsDeleted(GoldHam)){break;}
let shotSpeed = rand(0.5,1.5);
let sx = ObjMove_GetX(GoldHam);
let sy = ObjMove_GetY(GoldHam);
CreateShotA1(sx, sy - 10, rand(0.5,1.5), rand(0,360), 226, 30);
yield;
}
You don't need an ascent loop for this. You could handle this code with a normal loop. Only use an ascent or descent loop when you need to use the iteration variable that comes with it. (in this case, that would be "i")
Now, I'm a bit confused, but are you trying to fire bullets when GoldHam is deleted? If so, then you will never be able to do this because of the following line: if(Obj_IsDeleted(GoldHam)){break;}
This line of code terminates the loop if GoldHam has been deleted. With this line of code, you'll never be able to spawn bullets because GoldHam is deleted, the loop terminates and shots from firing.
Instead, I would handle this with a "while" loop that runs as long as the GoldHam object has *not* been deleted. In this loop, I will save GoldHam's position to a variable and then "yield;". (if you dont put a yield in an infinite loop, DNH will freeze up as it tries to do infinite things all at once.) The yield also makes DNH stay parsing the loop until the condition becomes false (in this case, until GoldHam is deleted). Meanwhile, there's a reason GoldHam's position has to be saved and updated within this loop. By the time you fire shots, GoldHam has already been deleted. If you try to spawn another object at the X and Y position of an object that does not exist, it will instead spawn at the top left corner of the playing field. Because of this, you will have to save the hammer's last position in the "while" loop. I would do it like so:
let sx = 0;
let sy = 0;
while(!Obj_IsDeleted(GoldHam)){
sx = ObjMove_GetX(GoldHam);
sy = ObjMove_GetY(GoldHam);
yield;
}
CreateShotA1(sx, sy - 10, rand(0.5,1.5), rand(0,360), 226, 30);
Hopefully this is a clear example, but when GoldHam gets deleted, DNH will stop processing the while loop and will continue to what's directly below. At this point, it will spawn your new shot at the X and Y position GoldHam was at just before it got deleted.
Again, I hope I described this in a way that makes sense. If you still need help, I suggest you join the Bullet Hell Engines Discord server. (https://discord.gg/4wNvvPHxeU)
-
I have a question pertaining to (what appears to be) a (relatively) popular script, ExPorygon's ZUN Expanded Shotsheet (https://www.bulletforge.org/u/ozzy/p/zun-expanded-shotsheet-for-ph3 (https://www.bulletforge.org/u/ozzy/p/zun-expanded-shotsheet-for-ph3)).
After installing this script, I attempted to use it by #include-ing a specific one of its .txt files (as the readme told me to). However, once I tried to play the script and selected my character, Danmakufu froze for a few seconds and then closed itself.
According to this site (https://sites.google.com/site/sparensdanmakufututorials/dnh-0-12m-tutorials-part-3/014-intro-to-danmakufu-part-4#TOC-ERR-A01:-Danmakufu-crashes (https://sites.google.com/site/sparensdanmakufututorials/dnh-0-12m-tutorials-part-3/014-intro-to-danmakufu-part-4#TOC-ERR-A01:-Danmakufu-crashes)), the problem seems to have to do with system locale. However, my locale has been set to Japanese for some time now, so I have no idea what could be causing the problem.
Does anyone know what is causing this problem? (I would prefer not to switch to a different bullet script, as this one seems to be of the highest quality, and... I've already spent an hour or so making a reference sheet for the bullets used by this script.)
EDIT: I tried reverting my script back to when it used the default shots, but it still crashes Danmakufu just before the spell begins for no apparent reason. The part that makes it crash is as follows:
task MainTask{
wait(120);
while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
let angleT = GetAngleToPlayer(objBoss);
loop(13) {
CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 2,
angleT, DS_BALL_S_RED, 5);
angleT += 360/13;
}
}
}
EDIT 2: I found what was causing the crash... I forgot to add a yield in that task. My apologies.
-
Hi there! Just started coding in Danmakufu (basically a beginner), got a small Single script going, but I ran into a slight issue. While it may seem simple, I wasn't sure where to ask, so I'll ask here. How would I make a bullet that has gravity (as in, would fall down after a delay when initially shot upwards)? If it's a specific shot function, please direct me to the correct one, or if it requires extra steps, please provide some tips! Given I'm just starting out, I'm not familiar with all of the shot functions yet, so that's why I'm asking. Any help would be greatly appreciated!
-
Try using this (https://sparen.github.io/ph3tutorials/docs_standard.html#fxn_CreateShotA2 (https://sparen.github.io/ph3tutorials/docs_standard.html#fxn_CreateShotA2)) function. Have the bullet's Y speed accelerate to create the illusion of falling. Have the X speed decelerate instead so it dips down the longer it's there.
I'm a newbie too! I guess the regulars don't check this thread too often.
EDIT: Wait, I had some questions, too!
- How does one modify what sprites are used by default system stuff (like the border or the numbers used for the score)? I think the default dnh sprites for the items are grody and wish to replace them with different ones.
- Are there any scripts that replace the default lifebar system with the ring lifebar system?
- Same as above, but for a symbol- rather than number-based lives/bullets system? BulletForge doesn't seem to have anything relevant related to either.
-
Try using this (https://sparen.github.io/ph3tutorials/docs_standard.html#fxn_CreateShotA2 (https://sparen.github.io/ph3tutorials/docs_standard.html#fxn_CreateShotA2)) function. Have the bullet's Y speed accelerate to create the illusion of falling. Have the X speed decelerate instead so it dips down the longer it's there.
I'm a newbie too! I guess the regulars don't check this thread too often.
EDIT: Wait, I had some questions, too!
- How does one modify what sprites are used by default system stuff (like the border or the numbers used for the score)? I think the default dnh sprites for the items are grody and wish to replace them with different ones.
- Are there any scripts that replace the default lifebar system with the ring lifebar system?
- Same as above, but for a symbol- rather than number-based lives/bullets system? BulletForge doesn't seem to have anything relevant related to either.
I never noticed this until now, for some reason when I set my email notifications, this was set as spam? Thanks, email.
1. To modify the shotsheet, you would need to #include a different one, though you seem to have figured that out in your following message.
2. Not that I know of, you would have to do the coding for that yourself.
3. If you mean life/bomb fragments, that might be included in a HUD of some kind, though I don't know for sure, sorry.
I recommend joining this Discord server if you haven't already, you'll get answers to your questions a lot faster. https://discord.gg/4wNvvPHxeU
-
Not really a question per se, I'm just curious about how menus are generally implemented? How are the animations done and how are things customized?
-
Not really a question per se, I'm just curious about how menus are generally implemented? How are the animations done and how are things customized?
Basically just a matter of generating render objects and moving them around manually with tasks and stuff. Sadly in that regard you typically have to do the heavy lifting yourself, but outside of things like smoothing out paths and stuff with interpolation (which ph3sx now has functions for, handily) it's not too bad. Menu flow is the thing I've found to be trickier and being able to maintain things like state so you can go back to a previous menu without things breaking.
-
This is a silly error, but I don't know how to fix it. While reading Sparen's Danmakufu tutorials, I came across the replay save scene tutorial. The tutorial said to copy everything from the default replay save scene script to a custom replay save scene script, I did it so. Now, Everytime I go to the replay save scene, danmakufu throws me a weird brackets error, like this one at the picture.
https://imgur.com/MW4g0ln.png
If anyone needs the script, I'll be attaching it here at this topic(even though i'ts identical to the default replay save scene :meiling:)
(Also, don't mind these "squared" texts, it's a WINE error :cirnotan:)
-
Did you try to do exactly what the error says?
Although those "]" ";" or similar missing errors normally are not a thing and the real problem is another thing.
-
Hello once again! I just wanted to ask if someone knows how to smooth out ObjRender_SetPosition(), like with ObjMove_SetDestWithFrame(), etc. Or anything equivalent to "ObjMove_SetDest" that works with ObjRender. Like with this:
(focus on reimu's orb movement)
-
Hello guys! I've been thinking a lot about danmakufu scripts, and my question is: Is it posible to render danmakufu scripts/stages/packages outside ph3?
I mean, I've recently seen applications like this one (https://play.google.com/store/apps/details?id=com.knead.TouhouTNA02&hl=es_AR&gl=US (https://play.google.com/store/apps/details?id=com.knead.TouhouTNA02&hl=es_AR&gl=US)), but I don't really know if it's using ph3 or something else to run.
Thank you for your attention.
-
Hello guys! I've been thinking a lot about danmakufu scripts, and my question is: Is it posible to render danmakufu scripts/stages/packages outside ph3?
I mean, I've recently seen applications like this one (https://play.google.com/store/apps/details?id=com.knead.TouhouTNA02&hl=es_AR&gl=US (https://play.google.com/store/apps/details?id=com.knead.TouhouTNA02&hl=es_AR&gl=US)), but I don't really know if it's using ph3 or something else to run.
Thank you for your attention.
while i can't say this with 100% certainty (i don't have the source code) i'm fairly certain thousand night anamnesis is built on it's own engine. this is going by the assumption that building your own DNH interpreter that (presumably) perfectly mimics the original is not only far more difficult, but also far less practical than just writing your own game from scratch
-
Can render priority affect hitboxes? I don't think it should but well...
So, I was messing around with bullets that changed sizes, before realizing that my shrinking bullets completely hid the growing bullets until they were close to the player and led to some cheap deaths.
I used the Obj_SetRenderPriority function to give the growing bullets a priority of 1 and they started behaving... oddly. I'm not 100% sure what was going on, but I was definitely getting killed by invisible hitboxes. I set the priority to 0.6 instead and the problem went away. Any idea what could have possibly caused this?
Additionally, is there a list somewhere of the default render priority of each object?
Thanks!
-
Can render priority affect hitboxes?
Bullets will start rendering with (0,0) being the top left of the window rather than the top left of the playing field.
Maybe that will explain why hitboxes become "wonky" -- they aren't where the bullets seem to be.
-
You can interpolate it. A good start would be to do this over multiple frames, like this:
task OrbMove(obj,orbx,orby,destx,desty) {
let sx = orbx;
let sy = orby;
let frames = 10; //the amount of frames to move over
let incr_x = (destx - orbx) / frames;
let incr_y = (desty - orby) / frames;
loop(frames) {
sx += incr_x;
sy += incr_y;
ObjRender_SetPosition(obj,sx,sy);
yield;
}
}
You can do this in a more refined way, but this is a good starting point.
(Also I noticed you're using 0.12m... you should probably be using ph3. It's far newer lol)
Also, I realize I'm often not as attentive in here as I should be sometimes, but please keep your questions in the help thread as opposed to making new threads for every question :sweatangry:
For the sake of cleanliness, I'll merge these with the main help thread.
-
Hello guys! I've been thinking a lot about danmakufu scripts, and my question is: Is it posible to render danmakufu scripts/stages/packages outside ph3?
I mean, I've recently seen applications like this one (https://play.google.com/store/apps/details?id=com.knead.TouhouTNA02&hl=es_AR&gl=US (https://play.google.com/store/apps/details?id=com.knead.TouhouTNA02&hl=es_AR&gl=US)), but I don't really know if it's using ph3 or something else to run.
Thank you for your attention.
A bit delayed but...a couple things.
Firstly, ph3 and its variants only work on PCs for now. They are designed for Windows and can be used on Mac and Linux using a tool like Wine.
Apps like these are made from scratch and either use their own engines, or use something pre-made like GameMaker:Studio, Unity, Godot, etc.
There are frameworks/sample projects for those if you're interested in making shmup stuff, if you're interested in mobile development. I'll admit it's not been very explored since the shift in guidelines (which is due for a topic update on the FAQs, come to think of it...)
-
Hello! I'm currently working on a spell where I want to create a second hitbox that mirrors the player's x position on the stg frame. Is there a danmakufu command that can create a hitbox irrespective of the player's position?
I'm using default PH3, in case that helps.
-
Hi! I've been working with Danmakufu using Sparen's tutorials recently and realized some links are no longer good (Helepolis' videos are no longer up and the discord invite in the major info thread no longer works); are there still any ways of accessing these resources?