Author Topic: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (locked)  (Read 269945 times)

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #300 on: April 14, 2012, 09:36:23 PM »
The solution isn't necessarily that application. The short answer is that you can't (unless a global variable applies), but if you modify the structure so that you aren't trying to "change a running task from the outside" then you can probably make your end goal. You have basically no details aside from "this is a piece of my code structure and I want to do this to it" though, so some more information would be helpful.

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

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #301 on: April 22, 2012, 09:16:50 AM »
I got some question:

1. What are the uses of CreateShotB1, CreateShotB2, CreateShotOA1 and CreateShotOB1?
2. How can I insert the Sound Effect in my script?

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #302 on: April 22, 2012, 04:27:14 PM »
I got some question:

1. Bullets with X-Velocity and Y-Velocity.
2. Lol I dunno. ask the guy who's comment is above yours.

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #303 on: April 22, 2012, 09:18:57 PM »
The B series are shortcuts for shot objects that use x-velocity and y-velocity, while the A series are shortcuts for bullets with an angle and a velocity.
CreateShotOA1(object, vel, angle, graphic, delay);
    Returns a shot object with specified angle and velocity at object's position.
CreateShotB1(xpos, ypos, xvel, yvel, graphic, delay);
    Returns a shot object at specified xy-position with specified x-velocity and y-velocity.
CreateShotB2(xpos, ypos, xvel, yvel, xacc, yacc, xmaxvel, ymaxvel, graphic, delay);
    Returns a shot object with xy-velocities that increase by specified accelerations until they hit the specified minimum or maximum speed limits.
CreateShotOB1(object, xvel, yvel, graphic, delay);
    Returns a shot object with specified xy-velocities at object's position.

Sounds should be the same as in 0.12; LoadSound(pathtosound); PlaySE(pathtosound);
Generally you load the sound early on, like in @Init, but you don't need to.

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

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #304 on: April 24, 2012, 01:19:58 AM »
Hey everyone. I'm not a programmer but I have a basic question about danmakufu that I hope someone can answer. You know the "gravity" effect that the last boss of Subterranean Animism uses for her final spellcard? It feels like you're constantly being pulled upwards or towards her. Anyway, I'm not asking how to code that because I'm not working on a project atm; I just want to know how difficult it is. Is it possible to create a similar "gravity" effect that attracts the player to, say, a moving enemy? Or is that more complex than it sounds and the SA spellcard accomplishes the same effect in a different way?
« Last Edit: April 24, 2012, 01:25:23 AM by eternal »

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #305 on: April 24, 2012, 01:33:37 AM »
Incredibly easy. Like, one line of code easy.
ObjMove_SetPosition(GetPlayerObjectID(), GetPlayerX() + cos(GetAngleToPlayer(object)-180) * speed, GetPlayerY() + sin(GetAngleToPlayer(object)-180) * speed);
« Last Edit: April 24, 2012, 01:39:13 AM by Drake »

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

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #306 on: April 24, 2012, 01:51:14 AM »
Whoa. Cool. For some reason I thought it would be difficult. Thanks!

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #307 on: April 25, 2012, 08:01:23 PM »
The solution isn't necessarily that application. The short answer is that you can't (unless a global variable applies), but if you modify the structure so that you aren't trying to "change a running task from the outside" then you can probably make your end goal. You have basically no details aside from "this is a piece of my code structure and I want to do this to it" though, so some more information would be helpful.
Yo, finally got up the code~
Code: [Select]
task maintask{
yield;
fire;
}

task fire{
wait(60);
loop{
shot(EnemyX,EnemyY,2,90,DS_BALL_M_RED,30);
wait(15);
ObjMove_SetAngle(shot,0);
wait(30);
}
yield;
}

task shot(x,y,speed,angle,graphic,delay){
let obj = ObjShot_Create(OBJ_SHOT);
ObjMove_SetPosition(obj,x,y);
ObjMove_SetSpeed(obj,speed);
ObjMove_SetAngle(obj,angle);
ObjShot_SetGraphic(obj,graphic);
ObjShot_SetDelay(obj,delay);
ObjShot_Regist(obj);
while(!Obj_IsDeleted(obj)){
yield;
}
}
I getz errors! D:

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #308 on: April 26, 2012, 04:12:39 AM »
Yeah, it's even more basic than I had imagined. You need to recognize that when you call shot(); and have that while-not-deleted loop, you would put your "after the bullet is fired" stuff in there.

Code: [Select]
task maintask{
yield;
fire;
}

task fire{
wait(60);
loop{
shot(EnemyX,EnemyY,2,90,DS_BALL_M_RED,30);
wait(45); //combined the two waits
}
//you currently don't need the yield here, the code never gets this far
}

task shot(x,y,speed,angle,graphic,delay){
let obj = ObjShot_Create(OBJ_SHOT);
ObjMove_SetPosition(obj,x,y);
ObjMove_SetSpeed(obj,speed);
ObjMove_SetAngle(obj,angle);
ObjShot_SetGraphic(obj,graphic);
ObjShot_SetDelay(obj,delay);
ObjShot_Regist(obj); //fires the shot!
wait(15); //after the shot is fired, wait 15 frames
ObjMove_SetAngle(shot,0); //and then modify the angle
//you don't actually need the while-not-deleted loop if you don't have any continually looping behaviour
}

Note that this is what you'd have done in 0.12. This is procedural code and works fine for this application. However, ph3 includes the capacity for OO code as well.

Code: [Select]
task maintask{
yield;
fire;
}

task fire{
wait(60);
let shot1;
loop{
shot1 = shot(EnemyX,EnemyY,2,90,DS_BALL_M_RED,30);
//note that in the shot() function, the shot is fired
wait(15);
ObjMove_SetAngle(shot1,0);
//this modifies the angle of the object referenced by the shot1 variable.
//shot1 was given the ID of the shot object you had created and returned in the function.
}
}

function shot(x,y,speed,angle,graphic,delay){ //note: this is now a function so you can return a value
let obj = ObjShot_Create(OBJ_SHOT);
ObjMove_SetPosition(obj,x,y);
ObjMove_SetSpeed(obj,speed);
ObjMove_SetAngle(obj,angle);
ObjShot_SetGraphic(obj,graphic);
ObjShot_SetDelay(obj,delay);
ObjShot_Regist(obj); //fires the bullet and registers the ID to be used outside of the local scope
return obj; //returns the object ID
}
This is the OO method, and it can create flexibility in other areas. You weren't able to do this in 0.12 because object IDs were not able to be accessed outside of the scope of the microthread.
« Last Edit: April 26, 2012, 04:14:54 AM by Drake »

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

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #309 on: April 26, 2012, 04:26:24 AM »
I'm pretty sure the second method is possible in 0.12m as well, but I don't see a reason why you would do that. It's less confusing for me if the bullet's logic is in its own task instead of being given to some other task to process.
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #310 on: April 26, 2012, 09:13:26 AM »
While I agree that in simple cases like this it's pretty silly, but I guess I'm talking to the more experienced people rather than fondue, and on a very general level rather than "here bullat". It probably seemed as if I'm advocating people using OO methods for simple applications like this, and that's my mistake. The way he worded his original question, I was anticipating it being something that could be solved by rearranging his code and using OO methods, so I just threw it out there anyways.
Passing around objects is extremely helpful when you're going for a game or anything with structures that communicate with each other. Plus I'm not limiting it to bullets either: this is for passing items, enemies, visual effects, etc. In 0.12 a large part of orchestrating effects and pretty much anything not-basic fell down to the gross overuse of commondata and setting global flags that affect the objects from within their threads when set, and then you have to manage the flags and stuff. Although there are some problems, ph3 gives birth to quite many possibilities, mainly in the scope of full games and other heavy management.
« Last Edit: April 26, 2012, 09:16:18 AM by Drake »

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

PJ

  • jesus christ it's all over the walls
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #311 on: April 26, 2012, 12:35:04 PM »
Aaaaaaaaa.

I'm going nuts over this.

Whenever I try to run a script with this shotdata, I get an error stating "shot_image is undefined."
Here's the header for the script.
Code: [Select]
#UserShotData

shot_image = GetCurrentScriptDirectory -"img/danmaku.png"
delay_rect = (480, 480, 512, 512)

I've also tried
Code: [Select]
shot_image = "./img/danmaku.png";
That obviously didn't work either.

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #312 on: April 26, 2012, 02:58:09 PM »
Yeah, it's even more basic than I had imagined. You need to recognize that when you call shot(); and have that while-not-deleted loop, you would put your "after the bullet is fired" stuff in there.

Code: [Select]
task maintask{
yield;
fire;
}

task fire{
wait(60);
loop{
shot(EnemyX,EnemyY,2,90,DS_BALL_M_RED,30);
wait(45); //combined the two waits
}
//you currently don't need the yield here, the code never gets this far
}

task shot(x,y,speed,angle,graphic,delay){
let obj = ObjShot_Create(OBJ_SHOT);
ObjMove_SetPosition(obj,x,y);
ObjMove_SetSpeed(obj,speed);
ObjMove_SetAngle(obj,angle);
ObjShot_SetGraphic(obj,graphic);
ObjShot_SetDelay(obj,delay);
ObjShot_Regist(obj); //fires the shot!
wait(15); //after the shot is fired, wait 15 frames
ObjMove_SetAngle(shot,0); //and then modify the angle
//you don't actually need the while-not-deleted loop if you don't have any continually looping behaviour
}

Note that this is what you'd have done in 0.12. This is procedural code and works fine for this application. However, ph3 includes the capacity for OO code as well.

Code: [Select]
task maintask{
yield;
fire;
}

task fire{
wait(60);
let shot1;
loop{
shot1 = shot(EnemyX,EnemyY,2,90,DS_BALL_M_RED,30);
//note that in the shot() function, the shot is fired
wait(15);
ObjMove_SetAngle(shot1,0);
//this modifies the angle of the object referenced by the shot1 variable.
//shot1 was given the ID of the shot object you had created and returned in the function.
}
}

function shot(x,y,speed,angle,graphic,delay){ //note: this is now a function so you can return a value
let obj = ObjShot_Create(OBJ_SHOT);
ObjMove_SetPosition(obj,x,y);
ObjMove_SetSpeed(obj,speed);
ObjMove_SetAngle(obj,angle);
ObjShot_SetGraphic(obj,graphic);
ObjShot_SetDelay(obj,delay);
ObjShot_Regist(obj); //fires the bullet and registers the ID to be used outside of the local scope
return obj; //returns the object ID
}
This is the OO method, and it can create flexibility in other areas. You weren't able to do this in 0.12 because object IDs were not able to be accessed outside of the scope of the microthread.
Drake your awesomeness has gone up by 76%
Now i have to help you out sometime :D

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #313 on: April 26, 2012, 03:09:32 PM »
Aaaaaaaaa.

I'm going nuts over this.

Whenever I try to run a script with this shotdata, I get an error stating "shot_image is undefined."
Here's the header for the script.
Code: [Select]
#UserShotData

shot_image = GetCurrentScriptDirectory -"img/danmaku.png"
delay_rect = (480, 480, 512, 512)

I've also tried
Code: [Select]
shot_image = "./img/danmaku.png";
That obviously didn't work either.
Had that problem before. I think the solution was making shot_image into Shot_Image.

PJ

  • jesus christ it's all over the walls
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #314 on: April 26, 2012, 08:20:30 PM »
Had that problem before. I think the solution was making shot_image into Shot_Image.
No go. Returns the very same error, with both of the words capitalized.

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #315 on: April 26, 2012, 09:39:30 PM »
1. GetCurrentScriptDirectory() is not defined for shot scripts.
2. Even if it was, you're using a minus symbol ( - ) and not a tilde ( ~ ) for concatenation there.
3. It is shot_image. Fondue probably means ShotData which is capitalized.
4. When you say "script", is this a new file you're using? How are you loading the shot script? Danmakufu saying shot_image is undefined makes me think that you're putting this in an include_script or something.

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

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #316 on: April 27, 2012, 03:51:23 AM »
I tried to a pattern like: enemy shot a bullet with a minus acceleration, when the bullet stops, other bullets will shot from that bullet. I tried using if command but it won't work. So what should I do?  :ohdear:
« Last Edit: April 27, 2012, 04:22:53 AM by numbuh1 »

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #317 on: April 27, 2012, 02:41:26 PM »
With ph3, I'm noticing that all the 2D Sprite objects appear to be a little blurry, even when the rects are set properly.  A notable example is the STG frame which I replaced directly from the default.  I took a screenshot to compare the raw image to the game itself, and the results are obvious.

http://dl.dropbox.com/u/38923366/ph3notcrisp.png

This may be a minor issue, but it wasn't present in .12m, and is making my OCD systems overload.
It seems that bullet graphics and text objects are the only things not suffering from this blur.

I even tried to draw it with Primitive 2D by setting the vertexs, but it looked no better.

Is there anything I can do, or is every non-text thing going to stand out like this forever?

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #318 on: April 27, 2012, 02:44:19 PM »

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #319 on: April 27, 2012, 03:16:15 PM »
I tried to a pattern like: enemy shot a bullet with a minus acceleration, when the bullet stops, other bullets will shot from that bullet. I tried using if command but it won't work. So what should I do?  :ohdear:
Code: [Select]
task bullet(x,y,speed,angle,accel,maxspeed,graphic,delay){
let obj=ObjShot_Create(OBJ_SHOT);
ObjMove_SetPosition(obj,x,y);
ObjMove_SetSpeed(obj,speed);
ObjMove_SetAngle(obj,angle);
ObjMove_SetAcceleration(obj,accel);
ObjMove_SetMaxSpeed(obj,maxspeed);
ObjShot_SetGraphic(obj,graphic);
ObjShot_SetDelay(obj,delay);
ObjShot_Regist(obj);
if(!Obj_IsDeleted(obj&&ObjMove_GetSpeed(obj)==0)){
CreateShotA1(ObjMove_GetX(obj),ObjMove_GetY(obj),2,90,DS_BALL_M_RED,30);
yield;
}
}
Make maxspeed zero to slow down and stop.
Make "accel" into any value you want. a negative (-) value will make obj decelerate.
Remember: A while statement is a loop while a condition is happening and an if statement will play only once when a condition happens.
Also, if you don't know how to task, i'm no help here :I

Gonna explain it.
The enemy will fire a bullet with the desired parameters. It will slow down, and as long it's not deleted and it's speed equals zero, a bullet will be fired from obj's position.
Edit the task for moar flexibility.
See Helepolis' danmakufu tutorials for more help.
« Last Edit: April 27, 2012, 03:42:05 PM by fonduemaster »

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #320 on: April 27, 2012, 07:44:36 PM »
Code: [Select]
task bullet(x,y,speed,angle,accel,maxspeed,graphic,delay){
let obj=ObjShot_Create(OBJ_SHOT);
ObjMove_SetPosition(obj,x,y);
ObjMove_SetSpeed(obj,speed);
ObjMove_SetAngle(obj,angle);
ObjMove_SetAcceleration(obj,accel);
ObjMove_SetMaxSpeed(obj,maxspeed);
ObjShot_SetGraphic(obj,graphic);
ObjShot_SetDelay(obj,delay);
ObjShot_Regist(obj);
if(!Obj_IsDeleted(obj&&ObjMove_GetSpeed(obj)==0)){
CreateShotA1(ObjMove_GetX(obj),ObjMove_GetY(obj),2,90,DS_BALL_M_RED,30);
yield;
}
}

Just a short tip: in ph3, CreateShot functions returns the object ID. So you could write that task as this:

Code: [Select]
task bullet(x,y,speed,angle,accel,maxspeed,graphic,delay){
let obj=CreateShotA1(x,y,speed,angle,graphic,delay);
ObjMove_SetAcceleration(obj,accel);
ObjMove_SetMaxSpeed(obj,maxspeed);
if(!Obj_IsDeleted(obj&&ObjMove_GetSpeed(obj)==0)){
CreateShotA1(ObjMove_GetX(obj),ObjMove_GetY(obj),2,90,DS_BALL_M_RED,30);
yield;
}
}

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #321 on: April 27, 2012, 08:02:30 PM »
Just a short tip: in ph3, CreateShot functions returns the object ID. So you could write that task as this:

Code: [Select]
task bullet(x,y,speed,angle,accel,maxspeed,graphic,delay){
let obj=CreateShotA1(x,y,speed,angle,graphic,delay);
ObjMove_SetAcceleration(obj,accel);
ObjMove_SetMaxSpeed(obj,maxspeed);
if(!Obj_IsDeleted(obj&&ObjMove_GetSpeed(obj)==0)){
CreateShotA1(ObjMove_GetX(obj),ObjMove_GetY(obj),2,90,DS_BALL_M_RED,30);
yield;
}
}
BOB SAGIT!
:V thanks anyway.
blaaaaa i always do wrong stuff  :(

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #322 on: April 28, 2012, 01:44:38 AM »
It won't work! Both bullet were shot at the same frame!  ???

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #323 on: April 28, 2012, 02:31:01 AM »
blah

It creates the bullet and then immediately after, checks if(!Obj_IsDeleted(obj&&ObjMove_GetSpeed(obj)==0)). Note that as it's written, it's checking if (obj&&ObjMove_GetSpeed(obj)==0) is deleted. Oops typo. Obviously there's some screwup in there somewhere and Obj_IsDeleted returns false and the decision goes through. Oops shot bullat.
Even if it was written properly, obviously the bullet isn't deleted right after it's shot so it skips straight to the next condition, and unless you started it at 0 speed, it would return false and not shoot the bullet. There is nothing after that since there are no loops. Putting an if statement in a task does not inherently loop the if statement per frame. What you want is
Code: [Select]
task bullet(x,y,speed,angle,accel,maxspeed,graphic,delay){
let obj=CreateShotA1(x,y,speed,angle,graphic,delay);
ObjMove_SetAcceleration(obj,accel);
ObjMove_SetMaxSpeed(obj,maxspeed);
while(!Obj_IsDeleted(obj)){
if(ObjMove_GetSpeed(obj)==0){
CreateShotA1(ObjMove_GetX(obj),ObjMove_GetY(obj),2,90,DS_BALL_M_RED,30);
}
yield;
}
}
Or better yet
Code: [Select]
task bullet(x,y,speed,angle,accel,maxspeed,graphic,delay){
let obj=CreateShotA1(x,y,speed,angle,graphic,delay);
ObjMove_SetAcceleration(obj,accel);
ObjMove_SetMaxSpeed(obj,maxspeed);
while(ObjMove_GetSpeed(obj) != 0){
yield;
}
CreateShotA1(ObjMove_GetX(obj),ObjMove_GetY(obj),2,90,DS_BALL_M_RED,30);
}
Since the former will keep firing extra bullets as long as the bullet speed is 0, if it somehow ends up that the bullet speed stays 0.
« Last Edit: April 28, 2012, 02:32:50 AM by Drake »

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

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #324 on: April 28, 2012, 02:57:14 AM »
blah

It creates the bullet and then immediately after, checks if(!Obj_IsDeleted(obj&&ObjMove_GetSpeed(obj)==0)). Note that as it's written, it's checking if (obj&&ObjMove_GetSpeed(obj)==0) is deleted. Oops typo. Obviously there's some screwup in there somewhere and Obj_IsDeleted returns false and the decision goes through. Oops shot bullat.
Even if it was written properly, obviously the bullet isn't deleted right after it's shot so it skips straight to the next condition, and unless you started it at 0 speed, it would return false and not shoot the bullet. There is nothing after that since there are no loops. Putting an if statement in a task does not inherently loop the if statement per frame. What you want is
Code: [Select]
task bullet(x,y,speed,angle,accel,maxspeed,graphic,delay){
let obj=CreateShotA1(x,y,speed,angle,graphic,delay);
ObjMove_SetAcceleration(obj,accel);
ObjMove_SetMaxSpeed(obj,maxspeed);
while(!Obj_IsDeleted(obj)){
if(ObjMove_GetSpeed(obj)==0){
CreateShotA1(ObjMove_GetX(obj),ObjMove_GetY(obj),2,90,DS_BALL_M_RED,30);
}
yield;
}
}
Or better yet
Code: [Select]
task bullet(x,y,speed,angle,accel,maxspeed,graphic,delay){
let obj=CreateShotA1(x,y,speed,angle,graphic,delay);
ObjMove_SetAcceleration(obj,accel);
ObjMove_SetMaxSpeed(obj,maxspeed);
while(ObjMove_GetSpeed(obj) != 0){
yield;
}
CreateShotA1(ObjMove_GetX(obj),ObjMove_GetY(obj),2,90,DS_BALL_M_RED,30);
}
Since the former will keep firing extra bullets as long as the bullet speed is 0, if it somehow ends up that the bullet speed stays 0.

Whoa! It works! Thanks so much!  :D

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #325 on: April 28, 2012, 08:18:00 AM »
With ph3, I'm noticing that all the 2D Sprite objects appear to be a little blurry, even when the rects are set properly.  A notable example is the STG frame which I replaced directly from the default.  I took a screenshot to compare the raw image to the game itself, and the results are obvious.

http://dl.dropbox.com/u/38923366/ph3notcrisp.png

This may be a minor issue, but it wasn't present in .12m, and is making my OCD systems overload.
It seems that bullet graphics and text objects are the only things not suffering from this blur.

I even tried to draw it with Primitive 2D by setting the vertexs, but it looked no better.
It does also happen in 0.12. Not many people even notice this, so uh good job
I haven't tested to see what causes what I've dubbed "blurry aids" in ph3, so if you want you can be the guinea pig or something lol
-Try keeping all images restricted to width and height of a power of two. 64, 128, 256, 512, etc. Whole images obviously; odd UV coordinates are fine, I think. In other words, always buffer the image size up to one of those.
-Try keeping a displayed image's center on a single pixel. If the render/sprite image width/height is odd you're fine, but if the image width/height is even, try moving the position a half-pixel over. Of course, both of these can cause issues with centering (like if the image spins etc) so usually I have to play around until something works.
-Try angling the image a bunch. The cardinals haven't ever caused this, 45 degree offsets sometimes does and sometimes not, and usually anything outside that blurs up the image so I never suggest keeping an image rotated at an odd angle for very long.

There were probably a few more causes but I can't recall any. Anything that might screw up normal rendering like stretching XY vertices or using SetScale and such will probably do this for obvious reasons, but those aren't nearly as problematic.
« Last Edit: April 28, 2012, 09:08:42 PM by Drake »

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

PJ

  • jesus christ it's all over the walls
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #326 on: April 29, 2012, 04:50:38 AM »
1. GetCurrentScriptDirectory() is not defined for shot scripts.
Tried both writing it as "script/blah/blah/blah" and GetCurrentScriptDirectory.

4. When you say "script", is this a new file you're using? How are you loading the shot script? Danmakufu saying shot_image is undefined makes me think that you're putting this in an include_script or something.
I used the function for loading shot data.

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #327 on: April 29, 2012, 06:35:25 AM »
Tried both writing it as "script/blah/blah/blah" and GetCurrentScriptDirectory.
Yes, you said that, I was just affirming that "script/folder/shotimage.png" is the correct method.

Quote
I used the function for loading shot data.
Alright, but how exactly are you loading it? Telling me you're using LoadEnemyShotData() doesn't help much. Can you paste the shot script on pastebin? The code section that you're using LoadBla() in?

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

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #328 on: April 29, 2012, 09:38:40 AM »
Excuse me for abusing this thread alot, and also not being sure I'm posting this in the right place, but is there any reccomendations on creating a custom shotsheet? Like any programs for making it and the shotsheet size?
Well I guess i'm expecting way too much from danmakufu already lol

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #329 on: April 29, 2012, 01:58:10 PM »
Excuse me for abusing this thread alot, and also not being sure I'm posting this in the right place, but is there any reccomendations on creating a custom shotsheet? Like any programs for making it and the shotsheet size?
Well I guess i'm expecting way too much from danmakufu already lol

You realize this was on the first page of threads right?
http://www.shrinemaiden.org/forum/index.php/topic,12412.0.html
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.