Comments (16)
Which part? Surface, Texture, Shape? Or do you mean the background?
from dgame.
Using the Spritesheet. It's not a big one, it works with the PNG files saved with GIMP.
from dgame.
Can you post your code (and maybe your image)? That would help a lot to reproduce what is happening.
from dgame.
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.
Ok, keep me up to date.
from dgame.
@joelcnz Could you solve the problem? Is it a problem with Dgame?
from dgame.
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.
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.
But indexing would be nice, too. Let me see what I can do this evening. ;)
from dgame.
Surface[string] sufs;
sufs["left"] = Suface("tankLeft.png");
sufs["right"] = Suface(tankRight.png");
I will investigate this. Thank you.
from dgame.
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.
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.selectFrameCan this be closed?
—
Reply to this email directly or view it on GitHub
#37 (comment).
from dgame.
Might want to be able to get the number of total frames.
I'll think about it. ;)
from dgame.
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.selectFrameCan this be closed?
—
Reply to this email directly or view it on GitHub
#37 (comment).
from dgame.
Yeah, don't code at night... I'll fix that soon.
from dgame.
Fixed
from dgame.
Related Issues (20)
- Iterating over SpriteSheet starts at index 1 and ends at index 0 HOT 13
- small issue on page HOT 2
- [Feature Request] A Window.draw overload with an offset HOT 4
- Dgame Does not render on multiple windows HOT 3
- Make Rect a template to allow for floating point HOT 1
- Necessary code doesn't execute when compiling in release mode HOT 3
- Shape color is being changed by unrelated objects HOT 5
- TTF_Init is not being called, formatting Text always errors "Font Invalid" HOT 5
- StopWatch Divide by 0 when trying to fill frame_ms HOT 1
- DerelictGL3 not able to find symbol ( glGetnTexImage ) HOT 3
- Window.wait Timeout is milliseconds, not seconds. HOT 1
- Collision detection HOT 4
- Wrong links in README.md? HOT 1
- Dgame crashing HOT 6
- Is this project still alive ? Couple bugs I ran into. HOT 8
- What about adding more built in colors? Like 400 plus . Color Enhancement idea . HOT 8
- Rect methods questions ? Add new method clamp ? HOT 1
- `object.Error@(0): Access Violation` on `DMD32` HOT 7
- D program quits unexpectedly when using Text HOT 11
- Text colors are wrong HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dgame.