Author Topic: Dnh 0.12m & ph3 video tutorials [New: Using Wine to Run Touhou Games ]  (Read 44041 times)

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
In this thread I will post youtube video tutorials. Each video might contain downloadable script and possible images.
(All links are non-HD as it is no use to add both urls in the post. Just click on the HD button at youtube and it will pop up as HD.)

--------- General Tutorials for 0.12m & ph3 ---------
[弾幕風 Tutorial] Configuring AppLocale and Notepad++ tweaking



--------- PH3 Tutorials ---------
By: Sparen
These tutorials focus on intermediate and advanced patterns, bullet behaviour and other useful things you should know about ph3! Sparen's tutorials are unique as he programs them in Mac environment and Sublime Text editor. If you have any questions regarding this, ask him about it!
[1] Touhou Danmakufu ph3 Tutorial - Spawning Danmaku in Circles and Ellipses
[2] Touhou Danmakufu ph3 Tutorial - Utilizing Delay Lasers and more
[3] Touhou Danmakufu ph3 Tutorial - Using Ascent Loops and More
[4] Touhou Danmakufu ph3 Tutorial - Reflecting Bullets off of Sides and Walls
[5] Touhou Danmakufu ph3 Tutorial - Using Wine to Run Touhou Games

By: Helepolis
A total newbie/beginner to Danmakufu? No worries, these tutorials will guide you through the very basics of ph3. Even if you've never programmed before, you'll get to know how to in these tutorials.
1 [弾幕風 PH3 Tutorial] Introduction to danmakufu
2 [弾幕風 PH3 Tutorial] Improving the boss and danmaku
3 [弾幕風 PH3 Tutorial] Animating our boss
4 [ 弾幕風 PH3 Tutorial ] A spell card has been declared!

[ 弾幕風 PH3 Tutorial ] 3D stages 【Part 1】  
[ 弾幕風 PH3 Tutorial ] 3D stages 【Part 2】
[ 弾幕風 PH3 Tutorial ] Camera use for 3D stages
[ 弾幕風 PH3 Tutorial ] Custom Player Script 【Part 1】 
[ 弾幕風 PH3 Tutorial ] Custom Player Script 【Part 2】

Resources for the tutorials
Script for tutorial 01
Script for tutorial 02
Script for tutorial 03
Script for tutorial 04
Cirno boss img
Blizzard overlay

3D stage floor texture
3D stage wall texture
3D fog bg texture
3D floor texture with Z / X marking
Marisa player sprite


--------- 0.12m Tutorials ---------
The old but accessible tutorials for 0.12m (old engine). These tutorials will guide you through the basics of learning Danmakufu version 0.12m. If you're completely new to Danmakufu, it would be highly advisable to start in ph3 as 0.12m is no longer updated by the author, MKM-san.
[ 弾幕風 Tutorial L.01 ] Enter the dra- eh Danmaku
[ 弾幕風 Tutorial L.02 ] Enemy appearance!
[ 弾幕風 Tutorial L.03 ] Background, enemy cutin and collision 

Script for tutorial 1
Script for tutorial 2
Script for tutorial 3
Cirno boss img

--------- Advanced stuff ---------
[ 弾幕風 Tutorial ] MainLoop style scripting
[ 弾幕風 Tutorial ] CreateShotA & circular patterns
[ 弾幕風 Tutorial ] Animating your bosses 
[ 弾幕風 Tutorial ] Object bullets ( introduction )
[ 弾幕風 Tutorial ] Object bullets behaviour
[ 弾幕風 Tutorial ] A complete spellcard part I
[ 弾幕風 Tutorial ] A complete spellcard part II
[ 弾幕風 Tutorial ] Familiars
[ 弾幕風 Tutorial ] Effect Objects
[ 弾幕風 Tutorial ] Custom player script part I
[ 弾幕風 Tutorial ] Custom player script part II
« Last Edit: December 29, 2016, 02:39:34 PM by Helepolis »

puremrz

  • Can't stop playing Minecraft!
Re: A tutorial video is born ( and more will follow )
« Reply #1 on: October 07, 2009, 10:22:59 AM »
Oh, nice idea. A video is much easier to understand than just text alone.
However, even though you say this is for ultimate beginners, the very first thing you explain is how to use tasks. Shots built in Tasks aren't as easy to understand as shots built in the Mainloop, it's better to explain the simplest way first, then work your way to tasks.

For example:

Code: [Select]
if(frame==60){
CreateShot01(GetCenterX,GetCenterY,2,90,RED01,0);
frame=0;
}

...Is much easier to understand for new people than that long wall of text you used to build the task.
I think Lesson 1 should explain this ^ and basic variable use first.
Tasks would be nice for a 3rd lesson or something.

Also, why no circle around the 9 of 90 degrees? :<
Full Danmakufu game "Juuni Jumon - Summer Interlude" is done!
By the same person who made Koishi Hell 1,2 (except this game is serious)
Topic: http://www.shrinemaiden.org/forum/index.php/topic,9647.0.html

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: A tutorial video is born ( and more will follow )
« Reply #2 on: October 07, 2009, 11:02:18 AM »
Oh, nice idea. A video is much easier to understand than just text alone.
However, even though you say this is for ultimate beginners, the very first thing you explain is how to use tasks. Shots built in Tasks aren't as easy to understand as shots built in the Mainloop, it's better to explain the simplest way first, then work your way to tasks.

...Is much easier to understand for new people than that long wall of text you used to build the task.
I think Lesson 1 should explain this ^ and basic variable use first.
Tasks would be nice for a 3rd lesson or something.
You are correct. I first planned to introduce it with the MainLoop but then I changed my mind. But because this immediately involves the 'wait function.' it would be wrong to focus on 'if(frame==60)' method. I also don't claim this is THE best way. It is just an alternative way for scripting. The whole idea is to give beginners an overview of their code and using the counting variable can be confusing when you extend your script with more things (especially people with no programming background, it requires more explanation for what). And this is where tasks ( in my opinion ) prevail against the classic counting method. The pure sense overview.

An interesting debate I would like to have with people, as I know, very few script with the tasking method.


Also, why no circle around the 9 of 90 degrees? :<
Avoiding the cliche =P


Also, I forgot to explain perhaps more basic stuff such as the x,y layout of the field and the exact explanation for all directions in danmakufu. But I plan to tackle those with smaller tutorials. This was probably the largest so far. What I plan next for each tutorial is a series of stand-alone.

I dont want to make a tutorial where you like start with lesson 1 and HAVE to follow them in order to reach something. That is extremely boring imo and would kill the fun. So to keep it flexible I will make stand-alone tutorials which act two ways; contintuation of the previous and standalone info. The following is planned:

- Enemy appearance (sprites)
- Enemy movement
- Background
- Advanced bullets (CreateLaser01, CreateLaserA, CreateShotA etc. . )
- Sfx and music

Then I will probably take it into some serious spellcard creating. Like combining all above to create a functional spellcard. Which will all together form the basics.

note how I left out more advanced techniques like object bullets, dialogues, plural, advanced effects. Because they are not needed yet.

Primula

  • EARL TYPE 222
Re: A tutorial video is born ( and more will follow )
« Reply #3 on: October 07, 2009, 02:52:25 PM »
Thanks a lot!!! Can I have the sample spellcard? ^.^

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: A tutorial video is born ( and more will follow )
« Reply #4 on: October 07, 2009, 03:36:09 PM »
Thanks a lot!!! Can I have the sample spellcard? ^.^

Here it is:  Ls.1 spellcard

( I will probably list them all eventually somewhere )

Re: A tutorial video is born ( and more will follow )
« Reply #5 on: October 07, 2009, 10:52:07 PM »
very nicely done. shame i already cracked the basics, but it seems much easier to understand than the tutorials here. good job :)

CK Crash

  • boozer
Re: A tutorial video is born ( and more will follow )
« Reply #6 on: October 07, 2009, 10:57:03 PM »
Do one about trigonometry (sin/cos/tan) and one about arrays. Because I love trig and arrays trig can be used for any smooth wave effect, even with graphics or bullets, and is necessary for object lasers. Arrays are useful when combined with ascent to control a set of objects.

Solais

  • Developer fairy
  • is working for a game developer now.
Re: A tutorial video is born ( and more will follow )
« Reply #7 on: October 08, 2009, 11:39:25 AM »
Wow, it's really great and easy to understand. At least it's easier that the tutorials, because while I know how to do a few things, I just couldn't get into learning how to use tasks (because I'm lazy). Now, with this single video, I got to know how to do them, and it looks so simple and convenient!
Actually, this video sparked my interest in continuing my learning of Danmakufu.

Mugen Hut

Re: A tutorial video is born ( and more will follow )
« Reply #8 on: October 08, 2009, 11:56:11 AM »
I think it's a good idea to make this a sticky, but then, what do I know? :V


Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: A tutorial video is born ( and more will follow )
« Reply #9 on: October 08, 2009, 12:02:41 PM »
Do one about trigonometry (sin/cos/tan) and one about arrays. Because I love trig and arrays trig can be used for any smooth wave effect, even with graphics or bullets, and is necessary for object lasers. Arrays are useful when combined with ascent to control a set of objects.
I hope someone can help me out with this as I only know how to make easy waving patterns and bullets ( like ovals, circles or half circles ).

I think it's a good idea to make this a sticky, but then, what do I know? :V

A bit early for it yet. When I get more tutorials posted I will ask Stuffman to sticky it. Don't worry.

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu video tutorials [Update: Intro tutorial]
« Reply #10 on: October 08, 2009, 04:27:26 PM »
Added to the tutorial thread index.

Despite tasks being somewhat inefficient codewise, they do seem like they'd be easier to understand for the average person. Also, while using tasks for object bullets can create a lot of slowdown, just having one task that's running all your stuff shouldn't create any noticable drag. I remember at one point when Helepolis had an infinite task creation loop it took almost a minute before the slowdown started getting noticable.

If someone can wrap their head around arrays and regular MainLoop they should do it, though.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu video tutorials [Update: Intro tutorial]
« Reply #11 on: October 08, 2009, 06:30:00 PM »
Despite tasks being somewhat inefficient codewise, they do seem like they'd be easier to understand for the average person. Also, while using tasks for object bullets can create a lot of slowdown, just having one task that's running all your stuff shouldn't create any noticable drag. I remember at one point when Helepolis had an infinite task creation loop it took almost a minute before the slowdown started getting noticable.

If someone can wrap their head around arrays and regular MainLoop they should do it, though.

Ye that was with the effect object for the burning aura, but that was a problem in the coding structure. Even my own scripts have like perhaps maximum of three-four looping tasks. So far, didn't had any trouble with them. I will perhaps one day go crazy and create a dozen of tasks to see what happens to the framerate.

Added to the tutorial thread index.
Thanks.
« Last Edit: October 08, 2009, 06:31:33 PM by Helepolis »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu video tutorials [Update: 3rd tutorial]
« Reply #12 on: October 11, 2009, 05:33:41 PM »
Added 3rd tutorial. Explaining enemy collision, movement, cutin and background drawing. Please give youtube time to render HD quality.

I have to go now so I will update my youtube channel later on.

Re: Danmakufu video tutorials [Update: 3rd tutorial]
« Reply #13 on: October 11, 2009, 10:41:34 PM »
The first spell card wont work for me, i copied the code directly from the link and i get a GetCenterY error, after changing that, i get a mainTask error, then a yield; error

Re: Danmakufu video tutorials [Update: 3rd tutorial]
« Reply #14 on: October 12, 2009, 02:47:17 AM »
Im nearly certain i did it exactly like you said and it dosent work, please help!

Code: [Select]
#TouhouDanmakufu
#Title[Fantasy Seal Lol not]
#Text[blahblah]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main{

@Initialize{
SetLife(1000);
SetMovePosition01(GetCenterX,GetCenterY,5);

mainTask;
}

@MainLoop{

}

@DrawLoop{

yield;
}

@BackGround{

}

@Finalize{

}


task mainTask{
yield;
fire;
}

task fire{
loop{
CreateShot01(GetEnemyX,GetEnemyY,3,90,ORANGE02,10);

wait(60);
yield;
}


function wait(w){
loop(w){yield;}
}

}

Re: Danmakufu video tutorials [Update: 3rd tutorial]
« Reply #15 on: October 12, 2009, 03:34:29 AM »
yield; goes in the @MainLoop, not the @DrawLoop, canobiecrazy.

Re: Danmakufu video tutorials [Update: 3rd tutorial]
« Reply #16 on: October 12, 2009, 03:42:05 AM »
Hm I fixed that and it still dosent work...

Code: [Select]
#TouhouDanmakufu
#Title[Fantasy Seal Lol not]
#Text[blahblah]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main{


@Initialize{
SetLife(1000);
SetMovePosition01(GetCenterX,GetCenterY,5);

mainTask;
}

@MainLoop{

yield;

}

@DrawLoop{

}

@BackGround{

}

@Finalize{

}


task mainTask{
yield;
fire;
}

task fire{
loop{
CreateShot01(GetEnemyX,GetEnemyY,3,90,ORANGE02,10);

wait(60);
yield;
}


function wait(w){
loop(w){yield;}
}

}

Re: Danmakufu video tutorials [Update: 3rd tutorial]
« Reply #17 on: October 12, 2009, 03:55:44 AM »
You didn't close your loop with a }

Re: Danmakufu video tutorials [Update: 3rd tutorial]
« Reply #18 on: October 12, 2009, 04:25:01 AM »
You didn't close your loop with a }

Thank you so much!!!

Re: Danmakufu video tutorials [Update: 3rd tutorial]
« Reply #19 on: October 19, 2009, 10:40:21 AM »
Thanks, helepolis!
I'm going to try to understand these tutorials  :V

SukiSynth

  • Your average mature 13 years-old kid~
  • UFO's hype is going to kill me. SAVE ME TOUHOU 13
Re: Danmakufu video tutorials [Update: 3rd tutorial]
« Reply #20 on: October 22, 2009, 10:43:23 PM »
First tutorial not working.  Trying to understand what's wrong. :/

Code: [Select]
#TouhouDanmakufu
#Title[Tutorial Spellcard 1]
#Text[Test]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main{


        @Initialize{
                SetLife(1000)
                SetMovePosition01(GetCenterX, GetCenter Y,5); 

                mainTask;

        }       

        @MainLoop{

        }       yield;

        @DrawLoop{

        }

        @BackGround{

        }

        @Finalize{

        }


        // main task, activates
        task mainTask{
                yield;
                fire;
        }

       
        task fire{
               loop{   // regular createshot
                       CreateShot01(GetEnemyX, GetEnemyY,3,90,RED01,10);

                       // wait 60 frames  (equal 1 second)
                       wait(60);

                       yield;
               }

        }

        // wait function which simulates the same effect as if(frame==?)
        function wait(w){
                loop(w){yield;}
        }
 
Avec des ''si'', on mettrait Paris en bouteille.

CK Crash

  • boozer
Re: Danmakufu video tutorials [Update: 3rd tutorial]
« Reply #21 on: October 22, 2009, 10:56:14 PM »
Your yield; is OUTSIDE @MainLoop for some reason.

Zengar Zombolt

  • Space-Time Tuning Circle - Wd/Fr
  • Green-Red Divine Clock
Re: Danmakufu video tutorials [Update: 3rd tutorial]
« Reply #22 on: October 22, 2009, 10:57:21 PM »
Well, GetCenterY has an extra space as well.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu video tutorials [Update: 3rd tutorial]
« Reply #23 on: October 23, 2009, 05:14:31 PM »
It amazes me people keep doing the first tutorial wrong. while all you need to do is like watch and type over 95% of the time. ( I even set a bigger front to show it )

I remember person in pm ( not calling names :3 ) wrote Alpha wrong ( as Aplha ) and general semicolon errors. Please read them calmy :V

PS 4th tutorial will be posted today or tommorow if my headache stops so I can record some narrator wav files.

SukiSynth

  • Your average mature 13 years-old kid~
  • UFO's hype is going to kill me. SAVE ME TOUHOU 13
Re: Danmakufu video tutorials [Update: 3rd tutorial]
« Reply #24 on: October 23, 2009, 11:50:27 PM »
Holly Molly I feel dumb sometimes.  Thanks.
Avec des ''si'', on mettrait Paris en bouteille.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu video tutorials [Update: 4th tutorial]
« Reply #25 on: October 26, 2009, 06:46:49 AM »
Ooh, almost forgot to notify, 4th tutorial is uploaded, explains CreateShotA and spawning patterns in a circle.


Re: Danmakufu video tutorials [Update: 4th tutorial]
« Reply #26 on: October 31, 2009, 11:17:14 PM »
Heh, thanks, Helepolis. I managed to make my first spellcard thanks to you!

Just a question: I've been playing with CreateShotA and set the dir+= to 360/60 in the while loop and I get a half circle of bullets. Is there a limit as to the the number of bullets you can have in a circle?

CK Crash

  • boozer
Re: Danmakufu video tutorials [Update: 4th tutorial]
« Reply #27 on: October 31, 2009, 11:27:30 PM »
If you want a full circle:

change in angle each loop X the number of loops = 360

Since you're adding 360/60 to dir everytime you shoot, you should make it loop 60 times.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu video tutorials [Update: 5th tutorial]
« Reply #28 on: November 08, 2009, 04:54:34 PM »
Creating another tutorial because I am bored. It will cover: Animating sprites. Which is lovely for bosses aswell as for any general usage of SetGraphicRect.

Please wait warmly :3


Tutorial uploaded and ready. It minor explains how to use the @DrawLoop to set up an animation ranges for sprite graphics. Basically the whole idea is understanding usage of SetGraphicRect in certain situations. Also this goes for familiars, stage enemies and any other kind of drawing simple.

Solais

  • Developer fairy
  • is working for a game developer now.
Re: Danmakufu video tutorials [Update: 5th tutorial]
« Reply #29 on: November 08, 2009, 06:49:57 PM »
GOOD JOB HELEPOLIS!!

Really, even though I'm using danmakufu for a while now, there's still some little details and stuff what I can learn from them. And including your own meme, that was hilarious.