Author Topic: A replacement for Danmakufu?  (Read 246123 times)

Re: A replacement for Danmakufu?
« Reply #300 on: October 27, 2009, 03:58:11 AM »
Cos / Sin

Every trig function comes from sin and cos somehow so yeah

These men know their Trig

Re: A replacement for Danmakufu?
« Reply #301 on: October 27, 2009, 04:43:19 AM »
Needs atai() |3

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: A replacement for Danmakufu?
« Reply #302 on: October 27, 2009, 04:51:18 AM »

Re: A replacement for Danmakufu?
« Reply #303 on: October 27, 2009, 06:33:37 AM »
That can be an easter egg :V
It'd...do something Cirno related.

Re: A replacement for Danmakufu?
« Reply #304 on: October 27, 2009, 10:51:21 AM »
But what about arctangent? :-
Don't forget atan2

DarkslimeZ

  • A REIMU SLIME APPEARED.
  • COMMAND?
    • Eternal Temporality
Re: A replacement for Danmakufu?
« Reply #305 on: October 27, 2009, 03:34:53 PM »
Needs atai() |3

Is it bad that I read that as "atoi()" the first time

FUCK YOU C++

Anyway, what about MOD/XM files, Cheese? They're pretty fucking awesome. You can save the trouble of defining loop points and doing it in the song itself. It's pretty much the shit.

[14:12] <~BoredTSO> you need to have enough fissile material in a certain density to reach supercriticality

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #306 on: October 28, 2009, 01:46:25 AM »
Cos / Sin

umm ... no.  That's tan.

arctan is the reverse - goes from the result of tan back to the source (which can be used to get the angle).

Have fun.



Don't forget atan2

atan2 is a quite useful function (even if it is just a shortcut'd form of arctan), so of course it should be there.



FUCK YOU C++

Umm ... perhaps tone down the hostility towards one of the most prolific programming languages in existence? :V



Anyway, what about MOD/XM files, Cheese? They're pretty fucking awesome. You can save the trouble of defining loop points and doing it in the song itself. It's pretty much the shit.

Also, FYI - pulled straight from the SDL.NET wiki, audio formats that are supported:
  • WAVE files (.wav)
  • VOC files (.voc, I believe)
  • MIDI files (.mid, .midi)
  • MikMod (.mod, .s3m, .it, .xm)
  • Ogg Vorbis (.ogg)

According to the list SDL.NET's documentation gives, MOD/XM files are supported.





Also, quick brainstorm while I was at work.  I thought it would be quite empowering to allow the scripters to override the default, built-in scripts if they so desire.

Take, for example, the idea of coding an Ikaruga-type game.  With this functionality in place, all you would need to do is override the default bullet collision functions (so that they check player/bullet color, etc), and then every bullet you fire (even ones of the default bullet type) will behave accordingly*!

What do you guys think?  It sounds useful to me.

* (except if you make a custom bullte type that declares its own collision functions with the player, and doesn't call back to the built-in ones)


PS - internet fucking sucks here.
to quote Naut:
"I can see the background, there are too many safespots."
:V

Re: A replacement for Danmakufu?
« Reply #307 on: October 28, 2009, 01:54:24 AM »
umm ... no.  That's tan.

It's actually cotangent. Tangent is sin/cos. Arctan is it's reverse though, yes.

Still on the topic of trig, make it so we can use radians. Far more useful, even if confusing to some.

Also, quick brainstorm while I was at work.  I thought it would be quite empowering to allow the scripters to override the default, built-in scripts if they so desire.

Take, for example, the idea of coding an Ikaruga-type game.  With this functionality in place, all you would need to do is override the default bullet collision functions (so that they check player/bullet color, etc), and then every bullet you fire (even ones of the default bullet type) will behave accordingly*!

What do you guys think?  It sounds useful to me.

I was under the impression this was already possible, though it was likely my imagination. So uh, yes! That would be awesome.
« Last Edit: October 28, 2009, 01:56:37 AM by Naut »

Re: A replacement for Danmakufu?
« Reply #308 on: October 28, 2009, 01:59:38 AM »
I have an uttermost important request:
Support for more keys
Seriously...  The only extra key we have in danmakufu is C.
Support for a few more keys to activate abilities and such would be nice.

Re: A replacement for Danmakufu?
« Reply #309 on: October 28, 2009, 02:00:14 AM »
It's actually cotangent. Tangent is sin/cos. Arctan is it's reverse though, yes.

Still on the topic of trig, make it so we can use radians. Far more useful, even if confusing to some.
Does this mean there will be pi? :p

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #310 on: October 28, 2009, 02:13:02 AM »
It's actually cotangent. Tangent is sin/cos. Arctan is it's reverse though, yes.

Er, right.  Stupid me.



Still on the topic of trig, make it so we can use radians. Far more useful, even if confusing to some.

Right now the engine uses radians in its entirety, actually.  Was considering adding the option to switch it to degrees (probably as a per-object flag, so one object switching it doesn't ruin things on another object), but I don't see that as too important at the moment.



Does this mean there will be pi? :p

I could certainly define a constant for pi, so that you can just reference it easily.



I was under the impression this was already possible, though it was likely my imagination. So uh, yes! That would be awesome.

Right now, it is only possible if you create a new object type of base type Enemy_Shot, where you define the custom behavior.

This would allow the scripter to redefine the default behavior, such that it affects all Enemy_Shot object types automatically (again, unless it's re-overridden later).



I have an uttermost important request:
Support for more keys
Seriously...  The only extra key we have in danmakufu is C.
Support for a few more keys to activate abilities and such would be nice.

Would be really easy to add support for.  Just need to add more bits to the input enumeration and define some controls to trigger them.  Would probably take all of a minute to add to the code. :D

Main question is - how many buttons are we talking about?  When I was developing SphereTide gunner, there were a couple people who commented that four buttons (slow, shot, and two bomb-related buttons) was pushing on too much.  Now, that's certainly part opinion, but what I'm getting at is that it might be asking a bit much of the player to expect them to keep track of eight different buttons in addition to movement.
to quote Naut:
"I can see the background, there are too many safespots."
:V

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: A replacement for Danmakufu?
« Reply #311 on: October 28, 2009, 02:47:47 AM »
Is it bad that I read that as "atoi()" the first time
A TOY. (a truck.)

Re: A replacement for Danmakufu?
« Reply #312 on: October 28, 2009, 03:04:24 AM »
Would be really easy to add support for.  Just need to add more bits to the input enumeration and define some controls to trigger them.  Would probably take all of a minute to add to the code. :D

Main question is - how many buttons are we talking about?  When I was developing SphereTide gunner, there were a couple people who commented that four buttons (slow, shot, and two bomb-related buttons) was pushing on too much.  Now, that's certainly part opinion, but what I'm getting at is that it might be asking a bit much of the player to expect them to keep track of eight different buttons in addition to movement.

All of them. We're not expecting people to remember every button. Let player script have all the buttons needing definition. Have types like SHOT and BOMB, let the user define them at the beginning like KeyState(Shift, SLOWMOVE); or KeyState(Z, SHOT);, this way if the player wants to map out a completely different control interface, it is possible. Perhaps you can default everything to Touhou style, but let the controls be easily overwritten.

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #313 on: October 28, 2009, 03:39:19 AM »
All of them. We're not expecting people to remember every button. Let player script have all the buttons needing definition. Have types like SHOT and BOMB, let the user define them at the beginning like KeyState(Shift, SLOWMOVE); or KeyState(Z, SHOT);, this way if the player wants to map out a completely different control interface, it is possible. Perhaps you can default everything to Touhou style, but let the controls be easily overwritten.

I think you're misinterpreting what was said.  Lishy, by my understanding, was asking for more buttons at once for player input (more than Danmakufu's up/down/left/right/shot/focus/bomb/"extra"); you seem to be talking about being able to reconfigure the controls (which, of course, will be allowed in Musuu no Danmaku once I implement it).
to quote Naut:
"I can see the background, there are too many safespots."
:V

Re: A replacement for Danmakufu?
« Reply #314 on: October 28, 2009, 04:34:51 AM »
Here's a thought: Being able to use your freaking keyboard to type in the name for the high score and replay, instead of selecting letters with the arrow keys. And maybe have a key to toggle between arrow keys/keyboard mode too, for good measure.

Actually, while I'm at it, why not extend the number of characters you can use when typing in the name of a replay or high score entry beyond what it is in danmakufu and the official touhou games?
« Last Edit: October 28, 2009, 04:36:22 AM by Prime 2.0 »
The SoEW patch has had its second release, come and get it!

Montblanc

  • I'll drive my toe into your eye socket,
  • And I'll Spin in it~
Re: A replacement for Danmakufu?
« Reply #315 on: October 28, 2009, 08:24:50 AM »
Quote from: Ragnikarth
I may or may not be the first to make a full game out of this. (right now it's "Should I use danmakufu or wait for this")

I'm almost certain multiple people are already planning this.

xD Hell, I JOINED this site solely for interest in making a game with this program.

PT8Sceptile

  • All hail Giant Catfish!
Re: A replacement for Danmakufu?
« Reply #316 on: October 28, 2009, 07:30:17 PM »
Still on the topic of trig, make it so we can use radians. Far more useful, even if confusing to some.
Right now the engine uses radians in its entirety, actually.

YESSSSSSSSSSSSSS!

Seriously, this is one thing I don't like in DMF. Accursed 360/6.28 factors when doing crazy angular velocity calculations like circular homing. This will make my life so much easier!

Yes, atan2 is mandatory. Even slightly advanced coding is hard without it.

On topic of mathematical stuff, you do have exponentiation and roots (at least the square one) in? Since the Pythagorean theorem does have it's uses...

And I WILL be making a game with this, at least according to my current plans. It's so far planned that I have a storyline and characters pretty much set in stone and I'm currently making BGMs (I suck at composing, don't expect much), sprites (I'm medicore at spriting, don't expect much) and the bulletsheet (seriously, seeing how medicore my sprites/BGMs are, the danmaku better up the game quality a lot...)

Here's a thought: Being able to use your freaking keyboard to type in the name for the high score and replay, instead of selecting letters with the arrow keys. And maybe have a key to toggle between arrow keys/keyboard mode too, for good measure.

Seriously, why hasn't anyone thought of this before. Such a huge timesaver. Definitely implement once the more important stuff is out of the way (does it even have a scoreboard yet).

Re: A replacement for Danmakufu?
« Reply #317 on: October 28, 2009, 07:35:04 PM »
On topic of mathematical stuff, you do have exponentiation and roots (at least the square one) in? Since the Pythagorean theorem does have it's uses...

Exponents are included in basic mathematical functions... Even though you can still mimic exponents with multiplication, so it's not like it matters.

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #318 on: October 29, 2009, 01:32:26 AM »
Here's a thought: Being able to use your freaking keyboard to type in the name for the high score and replay, instead of selecting letters with the arrow keys. And maybe have a key to toggle between arrow keys/keyboard mode too, for good measure.

That's a good idea.  It'll be a bit down the road before this sees implementation, but I do agree that it'd be easier than the current model.  We may want a fallback for Touhou/Danmakufu style entry, though, to facilitate players who are using a controller*.

* Before you say "just put the damn controller on the desk and type" - keep in mind some people have arcade-style controllers that already are sitting on their desk, taking up the whole space where the keyboard usually would be.



Actually, while I'm at it, why not extend the number of characters you can use when typing in the name of a replay or high score entry beyond what it is in danmakufu and the official touhou games?

This is certainly feasible.  Do we want to set a limit, or do we just let the player enter as much as they want (with the risk of it, say, going off the side of the screen)?



YESSSSSSSSSSSSSS!

Seriously, this is one thing I don't like in DMF. Accursed 360/6.28 factors when doing crazy angular velocity calculations like circular homing. This will make my life so much easier!

Got it.  Switch everything to degrees.  No problem. :V
(Of course, I'm joking)



On topic of mathematical stuff, you do have exponentiation and roots (at least the square one) in? Since the Pythagorean theorem does have it's uses...

Exponents are not in there yet, since I forgot to put them in when I was implementing the other math stuff.  Go me.  They will, of course, be implemented pretty soon.



(does it even have a scoreboard yet).

Right now it shows the score as a number in the program's title bar, assuming you give it the -dt command line option (which enables debug info in the title bar).  Actual scoreboard stuff will be added in at some, probably-sooner-than-later point.
to quote Naut:
"I can see the background, there are too many safespots."
:V

MCXD

  • Test
  • Light Sign "Heaven Engine"
Re: A replacement for Danmakufu?
« Reply #319 on: October 29, 2009, 09:21:04 AM »
As I am not a trigonometry major and probably younger than a lot of you, I haven't the foggiest idea what all this crazy arcsine junk is, and RADIANS... well lets not even go there.

Point is, I hope you give the option to use radians. Some of the less in-the-know people would much prefer to use degrees.

Stuffman

  • *
  • We're having a ball!
Re: A replacement for Danmakufu?
« Reply #320 on: October 29, 2009, 09:28:12 AM »
What the heck is a radian?

MCXD

  • Test
  • Light Sign "Heaven Engine"
Re: A replacement for Danmakufu?
« Reply #321 on: October 29, 2009, 09:30:27 AM »
What the heck is a radian?

To the best of my knowledge, radians are basically degrees for people who are TOO COOL FOR SCHOOL.

By that I mean physicists and university professors.

Also: http://en.wikipedia.org/wiki/Radians

Stuffman

  • *
  • We're having a ball!
Re: A replacement for Danmakufu?
« Reply #322 on: October 29, 2009, 09:45:56 AM »
Fffff

So how would you make a shot circle with radians if a circle can't be broken into an even number of them? 360 can be neatly divided so many ways!

MCXD

  • Test
  • Light Sign "Heaven Engine"
Re: A replacement for Danmakufu?
« Reply #323 on: October 29, 2009, 09:58:17 AM »
Coming from someone who knows nothing: 2pi rad is 360 degrees, so 2pi/10 rad or pi/5 rad is 36 degrees, for example.

Thus, in Danmakufu:

Code: [Select]
ascent(i in 0..num)
{
CreateShot01(GetX, GetY, 2, rad(2*pi/num)*i, RED01, 10);
}

If we assume rad(x) makes the program read x as radians, or something.

I bet I'm totally wrong, since I really don't see the advantage over using radians when you can just divide in 360 instead of 2pi. Maybe I'm missing the point because I know nothing about the subject? Also, it doesn't NEED to be broken into an 'even number of them'. You can still divide a ring into 31 bullets in Danmakufu, despite 31 not being a factor of 360.
« Last Edit: October 29, 2009, 10:01:08 AM by MCXD »

Re: A replacement for Danmakufu?
« Reply #324 on: October 29, 2009, 01:11:44 PM »
So how would you make a shot circle with radians if a circle can't be broken into an even number of them? 360 can be neatly divided so many ways!
Which is why some programs use [0,511] since that divides even better.

Re: A replacement for Danmakufu?
« Reply #325 on: October 29, 2009, 07:33:44 PM »
Um, we will be able to use either radians or degrees based on preferance, right? I'm having difficulty wrapping my head around why we have radians, let alone how they'd be more useful than degrees.

Hat

  • Just an unassuming chapeau.
  • I will never be ready.
Re: A replacement for Danmakufu?
« Reply #326 on: October 29, 2009, 08:26:40 PM »
I think radians are good for lazy people if you like working with even divisions of 360 and don't want to do some quick mental math. i.e. "Hm, I don't know what 360/46 is, so I'll just make my angle increments equal to pi/23".

I'd like the option, but I like sticking with degrees. What would it default to, NC?

CK Crash

  • boozer
Re: A replacement for Danmakufu?
« Reply #327 on: October 29, 2009, 11:07:12 PM »
Let it default to degrees, and have a simple function switch it to radians for the rest of the script. In the rare event that someone wants to use both degrees and radians for something, it would also be nice to have a conversion function, like "let InRadians = Radian(x);" and "let InDegrees = Degree(x);".

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: A replacement for Danmakufu?
« Reply #328 on: October 30, 2009, 02:22:11 AM »
As I am not a trigonometry major and probably younger than a lot of you, I haven't the foggiest idea what all this crazy arcsine junk is, and RADIANS... well lets not even go there.

Point is, I hope you give the option to use radians. Some of the less in-the-know people would much prefer to use degrees.

Um, we will be able to use either radians or degrees based on preferance, right? I'm having difficulty wrapping my head around why we have radians, let alone how they'd be more useful than degrees.

I think radians are good for lazy people if you like working with even divisions of 360 and don't want to do some quick mental math. i.e. "Hm, I don't know what 360/46 is, so I'll just make my angle increments equal to pi/23".

I'd like the option, but I like sticking with degrees. What would it default to, NC?

I do think it would be good to have the option for using either for the trig functions/angle/etc.
As far as a default, it seems most people want degrees as the default, it seems that most people want degrees.  The plan is to have a command to switch it, which will be remembered for each object (so set it once in initialize and you're good to go).

Let it default to degrees, and have a simple function switch it to radians for the rest of the script. In the rare event that someone wants to use both degrees and radians for something, it would also be nice to have a conversion function, like "let InRadians = Radian(x);" and "let InDegrees = Degree(x);".

... something like that.  Not sure of the necessity of the conversion functions; it's a rather simple math:
radians = pi * degrees / 180;
degrees = 180 * radians / pi;

On a related thought - does anyone see any usefulness in having a function that returns whether radians or degrees is currently selected?


All of the internal math functions use radians normally, by the way.  The code will automatically convert the angles if you have degrees selected.



Fffff

So how would you make a shot circle with radians if a circle can't be broken into an even number of them? 360 can be neatly divided so many ways!

Hint - angles don't need to be integers ;)



Coming from someone who knows nothing: 2pi rad is 360 degrees, so 2pi/10 rad or pi/5 rad is 36 degrees, for example.

Thus, in Danmakufu:

Code: [Select]
ascent(i in 0..num)
{
CreateShot01(GetX, GetY, 2, rad(2*pi/num)*i, RED01, 10);
}

If we assume rad(x) makes the program read x as radians, or something.

I bet I'm totally wrong, since I really don't see the advantage over using radians when you can just divide in 360 instead of 2pi. Maybe I'm missing the point because I know nothing about the subject? Also, it doesn't NEED to be broken into an 'even number of them'. You can still divide a ring into 31 bullets in Danmakufu, despite 31 not being a factor of 360.

Your math looks good.

Radians vs degrees is a really academic argument at best.  Only real advantage either way is that, with radians, an arc of x radians on a unit circle has length of x.  That and radians involve pi.  Seriously, how can you go wrong with pi?



Family stuff eating my early weekend time, so no update tonight.  Did give a bit of thought to the details on the implementation of arrays in the execution engine, though.  Hopefully that counts for something. :)
to quote Naut:
"I can see the background, there are too many safespots."
:V

Zengar Zombolt

  • Space-Time Tuning Circle - Wd/Fr
  • Green-Red Divine Clock
Re: A replacement for Danmakufu?
« Reply #329 on: October 30, 2009, 02:41:05 AM »
On a related thought - does anyone see any usefulness in having a function that returns whether radians or degrees is currently selected?
Nah, I don't think so, because it would be a bitch to work with both at the same time, and you pick one at the start like you said.