Author Topic: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry  (Read 243891 times)

FlareDragon

  • Gensokyo's Infernal Hellstorm
  • When will you come to Gensokyo, Satsuki Rin?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #720 on: September 14, 2015, 09:12:00 PM »
While making reflective bullets (which make for a fun maths problem >w<), I'm coming up with a weird issue with getting the frame's positions: GetStgFrameLeft() gives me a position a fair distance right from the left of frame, with GetStgFrameWidth() giving me a distance further right of it as well (inside the frame). The frame itself seems to work fine since the player's hitbox hits the exact edges of the frame, but the reflected bullets reflect some distance from where they should (makes for an annoying safe area). Funnily enough, GetStgFrameTop() and GetStgFrameHeight() seem to work fine. Anyone know what's wrong?
Normal 1CC's: SoEW, LLS, MS, EoSD, PCB, IN, PoFV, MoF, SA, UFO, GFW, TD, HM, DDC, ULiL, LoLK(PD), CtC |IaMP|
Hard 1CC's: EoSD, PCB, MoF, IN(B), TD, LoLK(PD), |???|
Lunatic 1CC's: None
Extra 1CC's: SoEW, MS, EoSD, PCB, IN, PoFV, MoF(NB), SA, UFO, GFW, TD, DDC, CtC, LoLK, |???|

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #721 on: September 14, 2015, 09:30:06 PM »
@ FlareDragon, that is something odd indeed. I do know that you can edit the frame width/height of your game + also decide when the player will "hit" the edge of the frame. But I've never really paid attention to this. Let me try this out tomorrow and see what the results are. I have a spellcard with reflecting lasers/bullets.

@ Fluffy, the shown code / explanation is bit insufficient to really see what you're doing and how you're trying to load the player. You need to post more core, or preferred the exact code where you try to load the player and related scripts. Keep in mind, the order should be in core:
- InitializeStageScene
- SetStagePlayerScript
- SetStageIndex
- SetStageMainScript
- StartStageScene

If your player is not found. Then it is really not found and I don't remember running into such things.

Also why the #Player you speak of?  Nowhere in my own 'Hou Enbu' I use the #Player header in my scripts. Not even in my spell cards.

FlareDragon

  • Gensokyo's Infernal Hellstorm
  • When will you come to Gensokyo, Satsuki Rin?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #722 on: September 14, 2015, 09:45:09 PM »
Okay. I've discovered something about it: The GetStgFrameWidth() returns a 40, like it's supposed to (According to how it's set up), but it looks like the distance the shot reflects is 40 from the frame border instead of the window, which puts it at 80 from the window - double what it's supposed to be. Similarly, reflection off the top is actually offset the same way: double the distance from the top of the window than it should be.
I have a feeling that means I'm not supposed to be using GetStgFrame(Left/Top/Width/Height) when determining where objects inside (as opposed to on top of) are suppose to be (such as where a shot goes to).
However, it doesn't explain why GetStgFrameWidth gives me 480 when it's set to 520 (aside from the fact that the dissonance is exactly the width of the window's left to the frame's left)

EDIT: Well, that's pretty inconsistent. I'm supposed to be using 0 as opposed to GetStgFrame(Left/Top) for objects in the frame, but using GetStgFrame(Width/Height) gives me the right relative number (the intersection was because of the length of the shot VS the actual position of the shot). Something new everyday :/
« Last Edit: September 14, 2015, 09:49:43 PM by FlareDragon »
Normal 1CC's: SoEW, LLS, MS, EoSD, PCB, IN, PoFV, MoF, SA, UFO, GFW, TD, HM, DDC, ULiL, LoLK(PD), CtC |IaMP|
Hard 1CC's: EoSD, PCB, MoF, IN(B), TD, LoLK(PD), |???|
Lunatic 1CC's: None
Extra 1CC's: SoEW, MS, EoSD, PCB, IN, PoFV, MoF(NB), SA, UFO, GFW, TD, DDC, CtC, LoLK, |???|

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #723 on: September 14, 2015, 09:54:12 PM »
The script in question is play.dnh, and I'm following your directions as far as I know. All of the relevant player scripts exist; otherwise, I'd be getting another error. The unusual thing is that only player0.dnh loads properly; trying to use any other file as the player script crashes.

(And #Player is used to tell the package script which player scripts are valid to use. You probably (should have) used in in the package header.)

Edit: fixed. It turns out that the other scripts were encoded in UTF-8, not Shift-JIS. Derp, I wish Danmakufu would somehow allow UTF-8 encoded files.
« Last Edit: September 15, 2015, 02:47:37 AM by Fluffy8x »
foo = foldl $ flip ($)
Highest difficulty 1CCed for each game, by shot type in the original order. (-: never 1CCed on any difficulty, or never used; E: easy, N: normal, H: hard, L / U: lunatic / unreal.)
EoSD [NNNE] PCB [EE--N-] IN [NEEE + Ex Border] PoFV [Mystia N, Mystia E no charge] MoF [EN--H- + Ex Marisa B] SA [N-----] UFO [----EN] TD [NENE] DDC [EE-EHE + Ex Marisa B & Sakuya A] LoLK [PD --N- Legacy ---N] EE [N- + Ex Yabusame] EMS [N-- + Ex Yabusame] RMI [NHN + Ex YaoSuku]
Avelantis (demo) Easy YuukiB 426,077,200

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #724 on: September 15, 2015, 12:42:29 AM »
Okay. I've discovered something about it: The GetStgFrameWidth() returns a 40, like it's supposed to (According to how it's set up), but it looks like the distance the shot reflects is 40 from the frame border instead of the window, which puts it at 80 from the window - double what it's supposed to be. Similarly, reflection off the top is actually offset the same way: double the distance from the top of the window than it should be.
I have a feeling that means I'm not supposed to be using GetStgFrame(Left/Top/Width/Height) when determining where objects inside (as opposed to on top of) are suppose to be (such as where a shot goes to).
However, it doesn't explain why GetStgFrameWidth gives me 480 when it's set to 520 (aside from the fact that the dissonance is exactly the width of the window's left to the frame's left)

EDIT: Well, that's pretty inconsistent. I'm supposed to be using 0 as opposed to GetStgFrame(Left/Top) for objects in the frame, but using GetStgFrame(Width/Height) gives me the right relative number (the intersection was because of the length of the shot VS the actual position of the shot). Something new everyday :/
The drawing origin depends on the render priority of the object being drawn. If its priority is between 20 and 80 inclusive (more specifically GetStgFrameRenderPriorityMinI() and GetStgFrameRenderPriorityMaxI()) then the origin is at the corner of the play area (STG frame); if it's outside these values the origin is the corner of the window. Using GetStgFrameLeft/Top is mostly for positioning things relative to the frame itself, like the score display. GetStgFrameWidth/Height gets the dimensions of the play area, so you can use it in both contexts.
« Last Edit: September 15, 2015, 12:44:46 AM by Drake »

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

FlareDragon

  • Gensokyo's Infernal Hellstorm
  • When will you come to Gensokyo, Satsuki Rin?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #725 on: September 15, 2015, 02:28:51 AM »
The drawing origin depends on the render priority of the object being drawn. If its priority is between 20 and 80 inclusive (more specifically GetStgFrameRenderPriorityMinI() and GetStgFrameRenderPriorityMaxI()) then the origin is at the corner of the play area (STG frame); if it's outside these values the origin is the corner of the window. Using GetStgFrameLeft/Top is mostly for positioning things relative to the frame itself, like the score display. GetStgFrameWidth/Height gets the dimensions of the play area, so you can use it in both contexts.
Ahh. This makes perfect sense. I'll certainly have to remember this in the future. Thanks, Drake ^w^
Normal 1CC's: SoEW, LLS, MS, EoSD, PCB, IN, PoFV, MoF, SA, UFO, GFW, TD, HM, DDC, ULiL, LoLK(PD), CtC |IaMP|
Hard 1CC's: EoSD, PCB, MoF, IN(B), TD, LoLK(PD), |???|
Lunatic 1CC's: None
Extra 1CC's: SoEW, MS, EoSD, PCB, IN, PoFV, MoF(NB), SA, UFO, GFW, TD, DDC, CtC, LoLK, |???|

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #726 on: September 16, 2015, 04:27:42 PM »
Maybe this questions is not for a ph3? but
Why most of all scripts slow down fps?
Problem with Ph3 Engine?
Or problem with my PC?
It's really annoying?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #727 on: September 16, 2015, 04:38:25 PM »
Maybe this questions is not for a ph3? but
Why most of all scripts slow down fps?
Problem with Ph3 Engine?
Or problem with my PC?
It's really annoying?

It is most likely a poor graphics card and/or unoptimized code.

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #728 on: September 16, 2015, 04:53:52 PM »
It is most likely a poor graphics card and/or unoptimized code.

Oh  :wat:
Earlier all scripts worked properly. Anyway,
What should I do now?
« Last Edit: September 16, 2015, 07:18:31 PM by Zhan_fox »

ExPorygon

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
    • Ephemeral Entertainment
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #729 on: September 16, 2015, 06:55:34 PM »
It is most likely a poor graphics card and/or unoptimized code.
It was my understanding that the graphics card barely matters for Danmakufu. It's mostly the CPU strength.

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #730 on: September 16, 2015, 07:08:35 PM »
Maybe this questions is not for a ph3? but
Why most of all scripts slow down fps?
Problem with Ph3 Engine?
Or problem with my PC?
It's really annoying?

There's 3 possibilities:
1. There's either too many curvy lasers;
2. Bomb-resistant bullets might lag upon using bombs onto them; (Take Lefkada's Youmu's bomb as an example. I experienced heavy lag upon using the bomb on a completely bomb-resistant spell)
3. Too many bullets onscreen, like 2000 bullets or so. That is either an issue with your PC or an issue with Danmakufu.

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #731 on: September 16, 2015, 07:34:49 PM »
It was my understanding that the graphics card barely matters for Danmakufu. It's mostly the CPU strength.

Earlier all scripts worked properly. But now most of them lag 30~50fps. Does it mean that CPU strength decreased? If yes, if there any solution to increase CPU strength?

There's 3 possibilities:
1. There's either too many curvy lasers;
2. Bomb-resistant bullets might lag upon using bombs onto them; (Take Lefkada's Youmu's bomb as an example. I experienced heavy lag upon using the bomb on a completely bomb-resistant spell)
3. Too many bullets onscreen, like 2000 bullets or so. That is either an issue with your PC or an issue with Danmakufu.

Thanks for advices! Taking them for a note. But as I said above, all scripts worked properly…

Edit: Wow, I increased CPU power, and it made Danmakufu more working. But there's still some minuses, like there's something else~
« Last Edit: September 16, 2015, 08:17:28 PM by Zhan_fox »

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #732 on: September 16, 2015, 10:29:16 PM »
Maybe this questions is not for a ph3? but
Why most of all scripts slow down fps?
Problem with Ph3 Engine?
Or problem with my PC?
It's really annoying?

Danmakufu isn't exactly the most performance pretty engine. In fact, it is pretty poor with performance ratings. Lag comes from an excessive amount of something. In dnh this can be having too many bullets (1000+), too many sprites, tasks, etc... Also keep in mind that dnh is not a multi-threaded engine, and collision, drawing logic, etc... is handled on a single thread.

With that being said, your computer's overall performance does play a part in this. Can it do all of the calculations needed within 16 milliseconds? The answer is reflected by what the average fps says. Mkm, traded performance for flexibility but didn't add anything to help the performance side. The best thing you can do is use your own engine or an alternative, whatever that may be.
« Last Edit: September 16, 2015, 10:31:03 PM by Sage Ω (Ultima) »

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #733 on: September 17, 2015, 12:53:45 AM »
If scripts were running at 60 before and now they're running slower, check to see if your computer's power options are set to use a power plan that cuts performance to save power. I remember I had a laptop with a "balanced" power plan set and it crippled performance badly with DNH.

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #734 on: September 17, 2015, 04:17:33 AM »
Is there any reason (performance or otherwise) not to use a mesh for the entire background?
foo = foldl $ flip ($)
Highest difficulty 1CCed for each game, by shot type in the original order. (-: never 1CCed on any difficulty, or never used; E: easy, N: normal, H: hard, L / U: lunatic / unreal.)
EoSD [NNNE] PCB [EE--N-] IN [NEEE + Ex Border] PoFV [Mystia N, Mystia E no charge] MoF [EN--H- + Ex Marisa B] SA [N-----] UFO [----EN] TD [NENE] DDC [EE-EHE + Ex Marisa B & Sakuya A] LoLK [PD --N- Legacy ---N] EE [N- + Ex Yabusame] EMS [N-- + Ex Yabusame] RMI [NHN + Ex YaoSuku]
Avelantis (demo) Easy YuukiB 426,077,200

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #735 on: September 17, 2015, 08:37:07 PM »
Danmakufu isn't exactly the most performance pretty engine. In fact, it is pretty poor with performance ratings. Lag comes from an excessive amount of something. In dnh this can be having too many bullets (1000+), too many sprites, tasks, etc... Also keep in mind that dnh is not a multi-threaded engine, and collision, drawing logic, etc... is handled on a single thread.

With that being said, your computer's overall performance does play a part in this. Can it do all of the calculations needed within 16 milliseconds? The answer is reflected by what the average fps says. Mkm, traded performance for flexibility but didn't add anything to help the performance side. The best thing you can do is use your own engine or an alternative, whatever that may be.

Thank a lot for more detail description. I didn't know most of information that you said. But now, when I know, I'll try to solve problem.

If scripts were running at 60 before and now they're running slower, check to see if your computer's power options are set to use a power plan that cuts performance to save power. I remember I had a laptop with a "balanced" power plan set and it crippled performance badly with DNH.

Yes I did it. But it didn't remove  fps lag

Edit: I fixed it. So funny, I had a dream, where ZUN personally explains me how I have to fixed it x)
« Last Edit: September 18, 2015, 08:56:12 PM by Zhan_fox »

Aka Kyuketsuki

  • Team αlternative Σnding
  • Making it rain
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #736 on: September 26, 2015, 02:50:58 PM »
Hi ! I want to ask something : If we have 5 tasks (Attack1, Attack2, Attack3, Attack4, Attack5), how do I call one of these tasks randomly ?
As if the script can begin either with Attack2 or even Attack5, but with random ?

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #737 on: September 26, 2015, 03:09:25 PM »
Hi ! I want to ask something : If we have 5 tasks (Attack1, Attack2, Attack3, Attack4, Attack5), how do I call one of these tasks randomly ?
As if the script can begin either with Attack2 or even Attack5, but with random ?
Note sure if best method but:

I tested whether I can add tasks inside an array but Danmakufu doesn't likes that so that is out of the question I think.

Possible solution: Somewhere when your script kicks off or when you want to make the randomized attack --> Create a loop and use the function rand (don't forget to round it to get a int) to randomize a variable (integer) and then perform statements. Example: If randAttack == 0  >> Attack1  if randAttack == 1 >> etc. Decide the delay (yield / wait) in which the rand function needs to pick a new number in the loop.

Perhaps not the most award winning method but works.

Aka Kyuketsuki

  • Team αlternative Σnding
  • Making it rain
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #738 on: September 26, 2015, 04:06:57 PM »
Note sure if best method but:

I tested whether I can add tasks inside an array but Danmakufu doesn't likes that so that is out of the question I think.

Possible solution: Somewhere when your script kicks off or when you want to make the randomized attack --> Create a loop and use the function rand (don't forget to round it to get a int) to randomize a variable (integer) and then perform statements. Example: If randAttack == 0  >> Attack1  if randAttack == 1 >> etc. Decide the delay (yield / wait) in which the rand function needs to pick a new number in the loop.

Perhaps not the most award winning method but works.

Ah yes, thank you, it works very well ! :D

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #739 on: September 26, 2015, 05:19:44 PM »
Is there any reason (performance or otherwise) not to use a mesh for the entire background?

Quoting myself in case people didn't see my question.
foo = foldl $ flip ($)
Highest difficulty 1CCed for each game, by shot type in the original order. (-: never 1CCed on any difficulty, or never used; E: easy, N: normal, H: hard, L / U: lunatic / unreal.)
EoSD [NNNE] PCB [EE--N-] IN [NEEE + Ex Border] PoFV [Mystia N, Mystia E no charge] MoF [EN--H- + Ex Marisa B] SA [N-----] UFO [----EN] TD [NENE] DDC [EE-EHE + Ex Marisa B & Sakuya A] LoLK [PD --N- Legacy ---N] EE [N- + Ex Yabusame] EMS [N-- + Ex Yabusame] RMI [NHN + Ex YaoSuku]
Avelantis (demo) Easy YuukiB 426,077,200

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #740 on: September 26, 2015, 06:17:12 PM »
Quoting myself in case people didn't see my question.
Not sure what you're trying to ask here. Mesh for the entire background? Any specific reason why you would prefer one single mesh for entire background? I remember someone had inserted a detailed Pagoda mesh as test and there was no FPS drop or something. Though I cannot remember the youtube video.

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #741 on: September 26, 2015, 11:42:05 PM »
Not sure what you're trying to ask here. Mesh for the entire background? Any specific reason why you would prefer one single mesh for entire background? I remember someone had inserted a detailed Pagoda mesh as test and there was no FPS drop or something. Though I cannot remember the youtube video.

One of the collaborators wanted to do the background in Blender then export it to an .mqo file.
foo = foldl $ flip ($)
Highest difficulty 1CCed for each game, by shot type in the original order. (-: never 1CCed on any difficulty, or never used; E: easy, N: normal, H: hard, L / U: lunatic / unreal.)
EoSD [NNNE] PCB [EE--N-] IN [NEEE + Ex Border] PoFV [Mystia N, Mystia E no charge] MoF [EN--H- + Ex Marisa B] SA [N-----] UFO [----EN] TD [NENE] DDC [EE-EHE + Ex Marisa B & Sakuya A] LoLK [PD --N- Legacy ---N] EE [N- + Ex Yabusame] EMS [N-- + Ex Yabusame] RMI [NHN + Ex YaoSuku]
Avelantis (demo) Easy YuukiB 426,077,200

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #742 on: September 27, 2015, 08:20:54 AM »
As long as you're not creating overly complex meshes with immense number of polygons and not trying to perform complicated movement in Danmakufu I don't see an issue.

My Touhou Hou Enbu actually had free to use 3D car models (YOU WOULDN'T DOWNLOAD A CAR?). These cars decorated the 3rd stage by moving around. There is a significant impact for low / medium end computers (fps drop).  And those cars had aprox 3000 triangles or something. The actual mqo files are in the official release and the code is existent but disabled.


GuardianTempest

  • Adorably Awkward Android
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #743 on: September 27, 2015, 02:21:40 PM »
I have a complex request, I'm currently hustling a fangame demo for use in my thesis. Are there any tutorials for:
  • Character dialogue
  • Spell Card declarations (namely the visual and sound effects)
  • Automatically running a script on startup that bypasses Danmakufu's default menu, much like Helepolis' game.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #744 on: September 27, 2015, 02:28:10 PM »
I have a complex request, I'm currently hustling a fangame demo for use in my thesis. Are there any tutorials for:
  • Character dialogue
  • Spell Card declarations (namely the visual and sound effects)
  • Automatically running a script on startup that bypasses Danmakufu's default menu, much like Helepolis' game.

Dialogue: No. You will need to build your own system of render and text objects, or you will need to use someone else's

Spell Card Declarations: You'll have to be a bit more specific here. If you are referring to cut ins, all you are basically doing is rendering text and images on-screen with a sound effect or two. There are a number of existing cut in libraries (GTbot and Helepolis's come to mind), but you can make one yourself using standard text objects and render objects.

Bypass the start menu: Include the path to your package in th_dnh.def, like so:
Code: [Select]
//--------------------------------------------------------------
package.script.main = script/Digital Earth Conquest/DEC_Package_Main.dnh


//--------------------------------------------------------------

window.title = DIGITAL EARTH: CONQUEST

GuardianTempest

  • Adorably Awkward Android
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #745 on: September 28, 2015, 05:29:56 AM »
I see, thank you for the response.

EDIT: I knew I forgot something! Is there a tutorial on character select screens?
« Last Edit: September 29, 2015, 04:59:24 AM by GuardianTempest »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #746 on: September 29, 2015, 05:50:48 AM »
I see, thank you for the response.

EDIT: I knew I forgot something! Is there a tutorial on character select screens?
Unfortunately there is no such tutorial  :ohdear:. You'll have to design it all yourself, including difficulty select screen, stage select screens or any form of Menu system.

GuardianTempest

  • Adorably Awkward Android
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #747 on: September 29, 2015, 01:19:41 PM »
One long trip at the IRC later...

Situation: A single script causes program crash
Plan: Identify What in these single scripts are messing up their inclusion in plural scripts.
Relevant Code: Plural Script File, Single Script File (with minor revisions)

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #748 on: September 29, 2015, 01:50:06 PM »
One long trip at the IRC later...

Situation: A single script causes program crash
Plan: Identify What in these single scripts are messing up their inclusion in plural scripts.
Relevant Code: Plural Script File, Single Script File (with minor revisions)

You must add to the 0th lifebar instead of the 2nd (in the plural). Additionally,

Code: [Select]
let objScene = GetEnemyBossSceneObjectID();

#include"script/default_system/Default_ShotConst.txt"
#include"script/default_system/Default_Effect.txt"

These three lines should be removed. The first of the three is likely causing the crash (there *is* no boss scene before you create it later in the plural), while the other two are completely irrelevant to a Plural script because you probably won't control boss explosions inside, and you never create bullets in a plural script.

GuardianTempest

  • Adorably Awkward Android
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #749 on: September 29, 2015, 04:05:58 PM »
What? I thought I already got ri- oh yeah, outdated paste. I already did that in the current one and still doesn't work.
Code: [Select]
#TouhouDanmakufu[Plural]
#ScriptVersion[3]
#Title["Sandbox File 08"]
#Text["Tutorial Thing - Plural Scripts"]
// Note: Default game field is 384 x 448

//Variables, constants and inclusions
// Empty

@Event{
}

@Initialize{
TPlural;
}

@MainLoop{
        yield;
}

// Tasks ###################

task TPlural{
let dir=GetCurrentScriptDirectory();
let obj=ObjEnemyBossScene_Create();
ObjEnemyBossScene_Add(obj,0,dir~"SandboxFile2.txt");
ObjEnemyBossScene_LoadInThread(obj);
ObjEnemyBossScene_Regist(obj);
while(!Obj_IsDeleted(obj)){
yield;
}
CloseScript(GetOwnScriptID());
}