Author Topic: Things You Want to See in Danmakufu?  (Read 9089 times)

K+ ~ Bake-Danuki

Things You Want to See in Danmakufu?
« on: September 06, 2013, 01:27:02 AM »
Have you ever thought 'Why doesn't the engine already have this?'?
That's what this is about.

Personally, I would like to see

(ID) parameter is obviously explained

Bullet(ID) - Able to Call Bullets like objects
GetBulletX(ID) - Bullet's X
GetBulletY(ID) - Bullet's Y
GetBulletAngle(ID) - Bullet's Angle
DeleteBullet(ID) - Deletes the Bullet
touch - basically collisions

Example:

if(GetBulletX(ID) == GetPlayerX){
speed = 0.1;
}

this would look for the bullet ID's X until it's the player's and then slows to extremely slow

if(GetBulletX(ID == GetPlayerX & GetBulletY(ID) == GetPlayerY-30){
speed = 0.1;
}
this would wait until the bullet was right in front of the player and then it would slow it down

if(Bullet(ID) touch GetX & Bullet(ID) touch GetY){
DeleteBullet(ID);
}

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: Things You Want to See in Danmakufu?
« Reply #1 on: September 06, 2013, 01:31:02 AM »
That's what obj shots are for.

K+ ~ Bake-Danuki

Re: Things You Want to See in Danmakufu?
« Reply #2 on: September 06, 2013, 01:39:11 AM »
But that's the point, why learn all the object shots when they could just use these with CreateShot01 and stuff

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Things You Want to See in Danmakufu?
« Reply #3 on: September 06, 2013, 01:42:27 AM »
But that's the point, why learn all the object shots when they could just use these with CreateShot01 and stuff
Personally, I haven't dabbled much into Obj_shots, but this looks way more complicated and disorganized. Even so, still less manipulable.

Edit: Ph3 basically has what you're saying you want... :v
« Last Edit: September 06, 2013, 01:47:54 AM by PhantomSong »

gtbot

  • Master of ScreenSplit
Re: Things You Want to See in Danmakufu?
« Reply #4 on: September 06, 2013, 01:47:19 AM »
all of those exist

all of those are made more accessible in ph3 (if only because the default CreateShots returns the bullet object, but you could just make a similar function in 0.12m)

Bullet(ID) - not sure what you mean here, but with ph3 you can get the bullet IDs of all bullets
GetBulletX(ID) - Obj_GetX(ID) / ObjMove_GetX(ID)
GetBulletY(ID) - Obj_GetY(ID) / ObjMove_GetY(ID)
GetBulletAngle(ID) - Obj_GetAngle(ID) / ObjMove_GetAngle(ID)
DeleteBullet(ID) - ObjShot_FadeDelete(ID)
touch - check the size between the bullet and if the distance is shorter than either length, is colliding (this is a lot easier in ph3 with a recent update)

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: Things You Want to See in Danmakufu?
« Reply #5 on: September 06, 2013, 01:47:28 AM »
There isn't anything to learn. They work in the same way as any other bullet, the only difference is that you can create special functions such as wall reflecting bullets or homing bullets the always move towards the player ect...

Object shots are pretty much doing the everything you do in CreateShotXX but the long way. Everything you listed are all functions that Obj shots have.

K+ ~ Bake-Danuki

Re: Things You Want to See in Danmakufu?
« Reply #6 on: September 06, 2013, 02:01:13 AM »
Oh, durr  :(, well thanks but I'll wait until 0.13 is finished and learn object bullets in 0.12m :V
but thanks for the explanation

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Things You Want to See in Danmakufu?
« Reply #7 on: September 06, 2013, 07:41:32 AM »
K+ I hope you're joking here (trollish way). If you are indeed really serious with the sentence: "But that's the point, why learn all the object shots when they could just use these with CreateShot01 and stuff"

Like gtbot also explained: CreateShotXX / etc are probably hardcoded object bullets as well. Did you really think that that the built in parameters such as acceleration, change of colour/graphic were standard? Everything in 0.12m can be reproduced or rewritten by making object bullets. So most likely the CreateShotXX functions are actually in fact object bullets. Why learn them? Because Objects don't only end at shots. They also go for effects. In ph3, they go for pretty much everything. Sound, boss, graphics, shots. One word: Flexibility. Predefined shots limit your usage with the bullet. Why would you get limited? Objects give you more freedom (note, logically limited to possibilities of the engine).

No idea what you meant with "I'll wait until 0.13 is finished", but there is no 0.13. Unless you meant ph3, which is pretty much finished and can be used to produce full games.
« Last Edit: September 06, 2013, 07:43:55 AM by Helepolis »

K+ ~ Bake-Danuki

Re: Things You Want to See in Danmakufu?
« Reply #8 on: September 06, 2013, 08:26:08 PM »
yeah...sorry about that.  the end result of going to the bathroom and leaving your laptop on this website with a friend who doesn't know much about this coding.
he decided it would be a good idea to write that and not tell me, i guess he was trying to finish my logic...

In all honesty I thought pre13 was 0.13, and I didn't know it's almost done, as far as I heard, it was still in early stages (like the alphas)
but thank you for the explanation, I plan to learn ph3 soon so, sorry about this...

(off to pre13 and whatever version's most recently out to learn!)

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: Things You Want to See in Danmakufu?
« Reply #9 on: September 06, 2013, 09:15:38 PM »
Ph3 is nearly done. I think it's only missing a few functions like CutIn and concentration, and maybe some other stuff that doesn't work 100% like SetScore, or whatever the ph3 equivalent is called.(it doesn't actually add the spell card bonus)

I am curious as to why things like CutIn still aren't in or why they were disabled in the first place.

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: Things You Want to See in Danmakufu?
« Reply #10 on: September 06, 2013, 09:33:10 PM »
I am curious as to why things like CutIn still aren't in or why they were disabled in the first place.
Atleast it's better than in 0.12m.
By "disabled", you mean they got rid of the built-in function? Because spawning some moving images and text isn't that difficult.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: Things You Want to See in Danmakufu?
« Reply #11 on: September 06, 2013, 09:42:41 PM »
Atleast it's better than in 0.12m.
By "disabled", you mean they got rid of the built-in function? Because spawning some moving images and text isn't that difficult.

It is better, but yeah, I don't see why stuff like dedicated enemy scripts were removed. It's not that a cutin function difficult to make, but easier to use when you already have it in there I guess.


Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Things You Want to See in Danmakufu?
« Reply #12 on: September 06, 2013, 09:46:25 PM »
Concentration effect is in there. See the Rumia scripts for examples. CutIn isn't a priority to begin with to be honest (one can easily script oneself). There is a lot of things which aren't properly finished in Danmakufu ph3. It is nowhere near finished, though it isn't quite unstable either and like I said: it pretty much provides everything what 0.12m does in terms of functions/usage.

It is better, but yeah, I don't see why stuff like dedicated enemy scripts were removed.
The same reason why everything is turned into objects. Improve flexibility of coding and events. The way it is now is actually way more better, as scripts can listen to input of events/triggers using the Event system. It saves a lot of hassle to fool around with CommonData and perma-loops in the background, checking non-stop for change of this data.


Edit
Oh, Drake posted after me while editing my post.

EDIT 2:
Damn it, in being tired, I accidental edited your post but re-edited it back. Have no fear!
« Last Edit: September 06, 2013, 09:56:06 PM by Helepolis »

Drake

  • *
Re: Things You Want to See in Danmakufu?
« Reply #13 on: September 06, 2013, 09:51:41 PM »
Ph3 is nearly done. I think it's only missing a few functions like CutIn and concentration
Those aren't necessary by any means and likely will never be implemented.

and maybe some other stuff that doesn't work 100% like SetScore, or whatever the ph3 equivalent is called.(it doesn't actually add the spell card bonus)
That can be explained by not looking in the default system files and looking at how the events actually work. Adding spell bonus works fine. (Although there are other things that don't entirely work)

I am curious as to why things like CutIn still aren't in or why they were disabled in the first place.
They weren't disabled they were just never added.

I don't see why stuff like dedicated enemy scripts were removed.
They weren't though? If you mean how every script follows the same base and how you have to load them rather than being provided a function doing it for you, then that's an incredibly good thing.
« Last Edit: September 06, 2013, 09:58:43 PM by Drake »

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

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: Things You Want to See in Danmakufu?
« Reply #14 on: September 06, 2013, 10:06:52 PM »
I guess I didn't look at it that way. I always assume the easier the better, but know that I think about it I prefer having things more flexible and generally being in control of things that I couldn't control in 0.12m like the magic circle function or HUD.

K+ ~ Bake-Danuki

Re: Things You Want to See in Danmakufu?
« Reply #15 on: September 07, 2013, 12:07:33 AM »
Ok, post update off topic, I tried Danmakufu pre13: a MASSIVE failure.
I'm staying in 0.12 for now
What happened to GetX, GetY, GetAngleToPlayer?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Things You Want to See in Danmakufu?
« Reply #16 on: September 07, 2013, 01:20:51 AM »
Ok, post update off topic, I tried Danmakufu pre13: a MASSIVE failure.
I'm staying in 0.12 for now
What happened to GetX, GetY, GetAngleToPlayer?

They've been renamed.

ObjMove_GetX
ObjMove_GetY
...GetAngleToPlayer is defined in Helepolis's Tutorial.

Shadow

  • Forever waiting for tomorrow
  • ...
Re: Things You Want to See in Danmakufu?
« Reply #17 on: September 07, 2013, 01:26:09 AM »
ObjMove_GetX, ObjMove_GetY, and GetAngleToPlayer are all object-based functions, and are equally usable by both enemy and bullet objects. Really, the major difference is that you are offered a new degree of freedom in your scripts by giving you all of these functions and turning virtually everything into manipulable objects--it might seem confusing at first, but all in all with the flexibility given, it is worth it.

In a different, more on-topic vein, I really wish lasers supported blending modes other than just ADD_RGB. More specifically subtractive blending, as "dark" lasers would be pretty awesome to have with just a single function call.

gtbot

  • Master of ScreenSplit
Re: Things You Want to See in Danmakufu?
« Reply #18 on: September 07, 2013, 01:30:05 AM »
ObjMove_GetX(objEnemy)
ObjMove_GetY(objEnemy)
GetAngleToPlayer(objEnemy) (this one isn't limited to the main boss anymore)

Did you check out the sample scripts? GetAngleToPlayer isn't used there (atan2 is used instead), but getting the boss x/y coordinates was shown there.

And if you absolutely wanted the functions (sort of) remade, (but these should only be used as a transition to ph3, using them beyond that wouldn't be a good habit)
Code: [Select]
function GetX{return ObjMove_GetX(GetEnemyBossObjectID[0]);}
function GetY{return ObjMove_GetY(GetEnemyBossObjectID[0]);}
function GetAngleToPlayerO{return GetAngleToPlayer(GetEnemyBossObjectID[0]);}

I would highly recommend learning ph3, given how much more flexible it is. The one thing I wish it had that 0.12m has is TimeStop and a real TimeSlow, but that can be disregarded in favor of everything else.

Drake

  • *
Re: Things You Want to See in Danmakufu?
« Reply #19 on: September 07, 2013, 02:12:15 AM »
did you even try looking at the docs or wiki

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

K+ ~ Bake-Danuki

Re: Things You Want to See in Danmakufu?
« Reply #20 on: September 07, 2013, 02:13:45 AM »
I checked the wiki but it reffered me to 0.12m info...idk how.
And I tried modifying ExRumia01.txt (tasks  :ohdear: )
Heh.  I'll give it another shot but 0.12m was much simpler and that's the one I know best... is there a tutorial for the new CreateShot's (renamed and stuff)?

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Things You Want to See in Danmakufu?
« Reply #21 on: September 07, 2013, 02:20:03 AM »
I checked the wiki but it reffered me to 0.12m info...idk how.
And I tried modifying ExRumia01.txt (tasks  :ohdear: )
Heh.  I'll give it another shot but 0.12m was much simpler and that's the one I know best... is there a tutorial for the new CreateShot's (renamed and stuff)?
There's the Wiki and Hele's PH3 tutorials

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Things You Want to See in Danmakufu?
« Reply #22 on: September 07, 2013, 07:58:07 AM »
K+, I am having a feeling you're looking at the wrong pages or wrong wiki. First, make sure you have ph3 pre15 downloaded, saves you trouble.

Second: http://dmf.shrinemaiden.org/wiki/Category:Danmakufu_ph3   <- Favourite this ph3 wiki overview. It is like your personal library shelf.

Third: Keep this page in mind: http://dmf.shrinemaiden.org/wiki/0.12m/ph3_Function_Equivalents   <-- Shows the equivalents of 0.12m functions ported into ph3. It is not entirely up2date yet. The official japanese website is.

Fourth: You should really really check out the Rumia sample scripts because they contain everything you need for basics. My video tutorial covers this as well.

You're giving us questionable feeling of actually not reading things and just randomly asking things. Hope this feeling is false and you're just simply looking at wrong places. Also this thread has become too much Q&A . We don't open personal help-me-threads. Your original opening post was to discuss "things to be seen in danmakufu" but we already answered each and every one of them so far.

Do not turn this into "Help me", as the stickies are meant for those. Keep this at debate/discussion level.

K+ ~ Bake-Danuki

Re: Things You Want to See in Danmakufu?
« Reply #23 on: September 07, 2013, 03:06:31 PM »
Ok.  Yeah, I guess I was ending up on the wrong pages :ohdear:

But anyway back on topic!

Personally I'd really like to see:
an expanded (past 255) shotsheet (if not already done and possible)
the more modifyable (?) frame and a way to change the boundaries of the play area (Touhou Medley needs it  :V )

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: Things You Want to See in Danmakufu?
« Reply #24 on: September 07, 2013, 04:48:17 PM »
Ph3 allows for more than 255 shots. You can change the stg frame one of two ways in 0.12m, either edit the actual file inside th_dnh.dat or use an effect object.
Though you would have to make a new HUD since the new frame will be placed on top of everything else.

Ph3 you can simply change the file inside of the default_system folder. You can change the size/position of the game area using SetStgFrame in ph3.

K+ ~ Bake-Danuki

Re: Things You Want to See in Danmakufu?
« Reply #25 on: September 07, 2013, 05:00:47 PM »
Ok, I wasn't aware of that HUD change available in pre13 (maybe I'll learn it now  :V )

Also:
I'd like to see a way to play videos as Backgrounds.  (Bad Apple medley  :P )

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Things You Want to See in Danmakufu?
« Reply #26 on: September 07, 2013, 10:15:17 PM »
Ok, I wasn't aware of that HUD change available in pre13 (maybe I'll learn it now  :V )

Also:
I'd like to see a way to play videos as Backgrounds.  (Bad Apple medley  :P )

Load all of the images in an array, then call those image IDs in @Background. It's been done before. Just use a counter. And a reeeeeeeeally long string of .png files.

Drake

  • *
Re: Things You Want to See in Danmakufu?
« Reply #27 on: September 07, 2013, 10:42:26 PM »
please don't actually do that

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

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Things You Want to See in Danmakufu?
« Reply #28 on: September 07, 2013, 11:34:47 PM »
please don't actually do that

B/c the longer the array, the longer it takes to index, right?

Drake

  • *
Re: Things You Want to See in Danmakufu?
« Reply #29 on: September 08, 2013, 12:23:23 AM »
If DNH's underlying structure for arrays was a sort of usual dynamic array, then the longer it would take to create the array as the size gets larger, since you can't specify how large the array will be on instantiation and then it would have to restructure by doubling and copying or whatever when it reaches max internal size, which would happen somewhat "often" with large enough arrays. However, arrays in DNH don't seem to even be usual dynamic arrays because apparently the larger the element's index the longer it takes to retrieve, leading me to believe it's a type of linked structure. So on top of addition/deletion taking a lot of time, memory access also doesn't take the expected O(1) time for arrays, which yes, would mean that the longer the video the crappier it would run even without considering other factors.

The "easier" way is just naming the images better and bypassing the need for the array
Code: [Select]
//make render object
ascent(i in 0..numfiles){
   img = dir ~ atoi(i) ~ ".png";  //where files are named 0.png, 1.png, etc
   //load, change texture, draw
}
or something

But more than that, creating massive arrays for such a purpose is a terrible idea, and really you shouldn't even want to play a video in the background in DNH, never mind using a dumb workaround like drawing individual png frames.

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