~Hakurei Shrine~ > Rika and Nitori's Garage Experiments

Evolution of Danmakufu

Pages: (1/3) > >>

Henry:

As a Danmakufu user, I think many of us have some opinion about Danmakufu. I hope it is a good place to let people discuss how it can be improved.

I shall share some of my ideas:

1.
--- Code: ---let x,y;
--- End code ---
doesn't work in Danmakufu, but DOES work in C.
2. I hope the for loop can be used in Danmakufu because it is really useful

Helepolis:

I am not a programming guru but what is the difference between a 'for' loop and a 'while' loop anyway? and as far as I know the regular 'loop' function is pretty godlike in danmakufu. And don't forget that Danmakufu is based on C, not nessecary C. Besides this is a bad evolution post.

And aside the discussion about improvement, is it possible to even modify current engine of Danmakufu? Is there source code? Want real evolotion? Give us scriptable MoF/SA/UFO engine with more ShotData abilities as maximum of 255 IDs suck.



Thaws:

What's the difference between for loops and ascent loops?


--- Quote from: Helepolis on July 21, 2009, 04:07:43 PM ---I am not a programming guru but what is the difference between a 'for' loop and a 'while' loop anyway?

--- End quote ---
I think 'for' loop is pretty much ascent loops in danmakufu. I use ascents alot, because I can have a temporary varible for bullet spamming at varying angles more conviently as I don't have to declare it beforehand, and it increases itself by 1 each time it loops automatically.
It's basically a more limited 'while' loop for things like those you know how many times it'll loop already.

Suikama:

for loops work something like this:

--- Code: ---for (a in b){do something;}
--- End code ---
So let's say b is something like number of pixels in a picture. The loop will then run once for every pixel in the picture, and the variable "a" will be assigned to the current pixel of each loop.

while loops work something like this:

--- Code: ---while (a){do something;}
--- End code ---
or

--- Code: ---while (a == True){//or FALSE
    do something;
    }
--- End code ---
Basically while loops use booleans, and will continue to loop while the overall statement is TRUE, and stop when it becomes FALSE. If you don't give the while loop something that will eventually become FALSE, it will run forever and crash.

for loops are essentailly while loops that end once it has looped for every object. So for the given examples it might look something like this:

--- Code: ---while (a < b){
    do something;
    a++;
    }
--- End code ---
Of course this wouldn't really work if the variables a and b weren't numbers, so you would have to do it differently for other things. Thus it would be easier to just up a for loop.

Hope that helps (and that I didn't mess up somewhere...)

Naut:


--- Quote from: Henry on July 21, 2009, 01:37:00 PM ---1.
--- Code: ---let x,y;
--- End code ---
doesn't work in Danmakufu, but DOES work in C.[/code]
--- End quote ---


--- Code: ---let x; let y;
--- End code ---
too much to type? Don't even need to type them on separate lines.


--- Quote from: Henry on July 21, 2009, 01:37:00 PM ---2. I hope the for loop can be used in Danmakufu because it is really useful

--- End quote ---

loop, while, ascent and decent are too much of a bother....? I'm sure you can manipulate them fairly easily to achieve what you're looking for.


Honestly, I'm more concerned with being able to manipulate the boundries of the field, freely editing what operates around the edge of the screen (points and whatnot, add your own, remove another section, etc) and being able to set the drawing layer of everything I create on the game inside a spell card script (being able to say that the player will be drawn on layer 7 instead of layer fucking 3).

Pages: (1/3) > >>

Go to full version