Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Stardust

#1
Great!
Thanks a lot for your help guys!

I think it'd be worth mentioning this pitfall in the documentation though, cause I wrote my code based on the example given for the DynamicSprite and it was rendered to the room's background. Vicious trap.


Anyways, thanks!
I changed the thread icon to a happy face.
#2
It was set to proper alpha blending
I just tried classic to see what it does but I get the exact same result.
#3
QuoteAGS Editor .NET (Build 3.3.2.0)
v3.3.2, September 2014

It says also says "Editor version 3.3"

And yes, my game is 32bits and I imported the sprite with the alpha channel. I suppose it wouldn't be displayed right as an object otherwise?
Thanks for the fast reply!
#4
Hey there

I need to display an image on the screen which I need to be able to rotate, given any angle I want.
From the manual, I figured the only way to do this is to put the image as an object into the scene, then create a DynamicSprite from it, rotate it, and render it.

The problem I have is that when I use a DynamicSprite, the rendering is all messed up.



The middle image ("expected"), is what I get when I add the image to the scene as an object (the result I want).
The image on the right, is what I get when I use a DynamicSprite. As you can see, the edges don't look right. It seems a DS has a trouble dealing with alpha.

Here's my code:

Code: ags

    DynamicSprite* dsBigRocket;

    DrawingSurface* surface = Room.GetDrawingSurfaceForBackground();
        
    dsBigRocket = DynamicSprite.CreateFromExistingSprite(oBigRocket.Graphic, true);

    surface.DrawImage(
        1024 / 2 - dsBigRocket.Width / 2, 
        768 / 2 - dsBigRocket.Height / 2, 
        dsBigRocket.Graphic, 
        0);
        
    surface.Release();


I've also tried copying the transparency mask after creating the DynamicSprite but I get the same result.

What I my doing wrong?
Is there any other way to freely rotate an image and have it rendered correctly? I've been searching through the manual but couldn't find anything...


Thankies
SMF spam blocked by CleanTalk