Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / [VB] Sprite

Author
Message
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 26th Dec 2006 11:10
Im trying to show a sprite using this

Dim mySprite As DarkSprite = New DarkSprite(100, 100, New DarkImage("[path to image]"))

mySprite.Show

But I cant see it. Even mySprite.Width returns -1. Why??

--
Niels Henriksen
Working on a RPG right now
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 26th Dec 2006 14:17
not sure, but have you Sync'd?

Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 26th Dec 2006 17:13
Yes... I have Sync'd

Dim ss As DarkSprite = New DarkSprite(100, 100, New DarkImage("{image path}"))
Console.WriteLine("Sprite width: " & ss.Width)

oDBImage.LoadImage("{image path}", 1)
oDBSprite.Sprite(1, 100, 200, 1)
Console.WriteLine("Sprite width: " & oDBSprite.SpriteWidth(1))
DarkCore.Sync()


All returns width on sprite to -1 and dont show sprites..???

--
Niels Henriksen
Working on a RPG right now
kBessa
17
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 26th Dec 2006 20:35
Hi Neils! I'm glad to see you're using DarkEngine. My work was not a waste of time

I don't know what you could be doing wrong. Can we have more of the code? I wrote a small test program in VB.NET using only DarkEngine and it work flawlessly. Here's and image and the project can be downloaded. Hope it helps

Attachments

Login to view attachments
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 26th Dec 2006 23:31
Hello kBessa

I was waiting for your DarkEngine and when it came it was x-mas..

I have started to write a button class as you can see in another post from me.

When we was finished with eating and presents, then I could start to play with it. It is so wunderful to use. That is real programming now. I had a problem with DPpro because its not OOP. Now I can program as I was taught in school (for programmers).

I solved the problem. My image was JPG and I changed that to PNG and now its working.

--
Niels Henriksen
Working on a RPG right now
kBessa
17
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 27th Dec 2006 06:20
Yeah, I always "hated" DBPro because it lacks OOP.

I tested, it really doesn't work with JPG. Maybe a DGDK.NET bug? Strange...

Hope DarkEngine is doing it's job, contact me if you have any problems or think it is lacking something. I need some feedback to continue working on it. By now, I'm documenting it and planning other plugins.

Login to post a reply

Server time is: 2024-09-28 23:15:48
Your offset time is: 2024-09-28 23:15:48