Giter Club home page Giter Club logo

Comments (16)

Dgame avatar Dgame commented on May 24, 2024

Which part? Surface, Texture, Shape? Or do you mean the background?

from dgame.

joelcnz avatar joelcnz commented on May 24, 2024

Using the Spritesheet. It's not a big one, it works with the PNG files saved with GIMP.

from dgame.

Dgame avatar Dgame commented on May 24, 2024

Can you post your code (and maybe your image)? That would help a lot to reproduce what is happening.

from dgame.

joelcnz avatar joelcnz commented on May 24, 2024

I don't think it's real problem. Looks like I can fix it with GIMP.

The attachment is the graphic which the transparency doesn't work for.

On Sat, Mar 21, 2015 at 10:40 PM, Randy Schütt [email protected]
wrote:

Can you post your code (and maybe your image)? That would help a lot to
reproduce what is happening.


Reply to this email directly or view it on GitHub
#37 (comment).

from dgame.

Dgame avatar Dgame commented on May 24, 2024

Ok, keep me up to date.

from dgame.

Dgame avatar Dgame commented on May 24, 2024

@joelcnz Could you solve the problem? Is it a problem with Dgame?

from dgame.

joelcnz avatar joelcnz commented on May 24, 2024

Looks like it happens with a curtain viewers saving an image (choose
transparency colour, and I click on which one I want). But it works with
GIMP alright, I don't feel I have to work around it. I don't think it's
worth fixing.

Another thing. Could you put in indexing with the sprite sheets. Access
each texture with a number. The thing there already doesn't work very well
and doesn't work hardly any way.

Just one other thing, this crashes the program.

Surface[string] sufs;
sufs["left"] = Suface("tankLeft.png");
sufs["right"] = Suface(tankRight.png");

On Mon, Mar 23, 2015 at 4:07 AM, Randy Schütt [email protected]
wrote:

@joelcnz https://github.com/joelcnz Could you solve the problem? Is it
a problem with Dgame?


Reply to this email directly or view it on GitHub
#37 (comment).

from dgame.

Dgame avatar Dgame commented on May 24, 2024

You can use setTextureRect and slideTextureRect
Example: You image consist of your 'tankLeft' and 'tankRight' (the left tank is on the left part, the right tank on the right part of the image). Let us assume each of them has a size of 64x64 pixel. Now we declare a new Spritesheet Spritesheet s = new Spritesheet(your_texture, Rect(0, 0, 64, 64));
Now you can move the rect over the image. First you will see the left part but after you called s.slideTextureRect(); you will see the right part. And after a further call you will see (again) the left part.

from dgame.

Dgame avatar Dgame commented on May 24, 2024

But indexing would be nice, too. Let me see what I can do this evening. ;)

from dgame.

Dgame avatar Dgame commented on May 24, 2024

Surface[string] sufs;
sufs["left"] = Suface("tankLeft.png");
sufs["right"] = Suface(tankRight.png");

I will investigate this. Thank you.

from dgame.

Dgame avatar Dgame commented on May 24, 2024

Seems you've discovered a bug: http://forum.dlang.org/thread/[email protected]%2F
and regarding indexing: http://dgame-dev.de/?package=graphic&module=Spritesheet#Spritesheet.selectFrame

Can this be closed?

from dgame.

joelcnz avatar joelcnz commented on May 24, 2024

Might want to be able to get the number of total frames.

I'd say, this issue can be closed.

On Tue, Mar 24, 2015 at 11:52 AM, Randy Schütt [email protected]
wrote:

Seems you've discovered a bug:
http://forum.dlang.org/thread/[email protected]%2F
and regarding indexing:
http://dgame-dev.de/?package=graphic&module=Spritesheet#Spritesheet.selectFrame

Can this be closed?


Reply to this email directly or view it on GitHub
#37 (comment).

from dgame.

Dgame avatar Dgame commented on May 24, 2024

Might want to be able to get the number of total frames.

I'll think about it. ;)

from dgame.

joelcnz avatar joelcnz commented on May 24, 2024

I don't think your, select frame, is working properly. I've got a 4 frames
sprite sheet, but I can't access the forth one, (with selectFrame).

Also, shouldn't the first frame number be 0, not 1.

One other thing. I think 'int' is cleaner (in a way), than ubyte. For
example: selectFrame(cast(ubyte)(idx + 1));

On Tue, Mar 24, 2015 at 12:18 PM, Joel Christensen [email protected]
wrote:

Might want to be able to get the number of total frames.

I'd say, this issue can be closed.

On Tue, Mar 24, 2015 at 11:52 AM, Randy Schütt [email protected]
wrote:

Seems you've discovered a bug:
http://forum.dlang.org/thread/[email protected]%2F
and regarding indexing:
http://dgame-dev.de/?package=graphic&module=Spritesheet#Spritesheet.selectFrame

Can this be closed?


Reply to this email directly or view it on GitHub
#37 (comment).

from dgame.

Dgame avatar Dgame commented on May 24, 2024

Yeah, don't code at night... I'll fix that soon.

from dgame.

Dgame avatar Dgame commented on May 24, 2024

Fixed

from dgame.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.