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.

Newcomers DBPro Corner / Need to shake some bones

Author
Message
Katyman
FPSC Reloaded TGC Backer
11
Years of Service
User Offline
Joined: 5th Oct 2012
Location: Katy, Texas USA
Posted: 9th Jun 2015 18:19
Good Day! I am stuck with what should be an easy piece of code but I just can't find a solution. I have an transparent PNG of a skeleton and in my program I want to move into a graveyard and see him dancing beside his grave. Problem is I can't find a way to do this with current DBPro commands. I even checked for code online. It needs to look like he is standing alone next to the grave and moving. Is there a way to turn this into an animated object to be placed in an x,y,z coordinate and have the ability to clone more into different positions and levels?

When old programmers die...do they decompile?

Attachments

Login to view attachments
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 9th Jun 2015 23:49 Edited at: 9th Jun 2015 23:59
[EDIT]

I would capture each image separately and then work with it from there. You could re-texture a plain within your loop for the animation effect.

Alternately, you might find a website or freeware that will turn a series of pix into an AVI, then you could use PLAY ANIMATION TO IMAGE

Katyman
FPSC Reloaded TGC Backer
11
Years of Service
User Offline
Joined: 5th Oct 2012
Location: Katy, Texas USA
Posted: 10th Jun 2015 02:10
Here is a sample code I am playing with. The "Startup" background is my own and a snapshot of my game. I get the skeleton to dance but not in the environment. I want to be able to add it into the game as an individual sprite or object. Basically want it to dance on the losers' grave LOL.


When old programmers die...do they decompile?

Attachments

Login to view attachments
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 10th Jun 2015 05:33
You mentioned x,y,z, coordinates, so I assume this is a 3D game then?

Katyman
FPSC Reloaded TGC Backer
11
Years of Service
User Offline
Joined: 5th Oct 2012
Location: Katy, Texas USA
Posted: 10th Jun 2015 06:14
That is correct. I am trying to develop an animated sprite or a form of animated object for a scene where if you lose a skeleton dances on your grave. But it is a 3D world.

When old programmers die...do they decompile?
Katyman
FPSC Reloaded TGC Backer
11
Years of Service
User Offline
Joined: 5th Oct 2012
Location: Katy, Texas USA
Posted: 10th Jun 2015 19:42 Edited at: 10th Jun 2015 19:46
OK I am getting closer but I am having that newbie problem with the background and the object not syncing together.



I got the Skeleton as an Animated GIF now on a Box Object. Now I have to get it to blend with the scenery. Can anyone help?

When old programmers die...do they decompile?

Attachments

Login to view attachments
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 10th Jun 2015 20:41 Edited at: 10th Jun 2015 20:44
if I remember correctly, you lose control of the animation speed when using GIF (?). I've always avoided them in dbpro.

otherwise, if you have the matrix1utils:

...will play your (oddly-sized original image) sprite to a plane.

meanwhile, not sure what you mean by:
Quote: "Now I have to get it to blend with the scenery."

?

...but, your do/loop code is quite odd where you're syncing twice and re-loading the same bitmap over and over?

it reflects that you have little dbpro coding experience and I suggest you review some of the piles of code throughout this forum for proper usage examples. ie, you're going about it the wrong way which will lead to unnecessary frustration (trust me, I learned the hard way, too).

you may be content in being able to slap something together to quickly getting it on screen but the experience in doing it this way will not lend itself toward any less frustration in the future.

sorry for the rant - I'm trying to save you some heartache.
Katyman
FPSC Reloaded TGC Backer
11
Years of Service
User Offline
Joined: 5th Oct 2012
Location: Katy, Texas USA
Posted: 10th Jun 2015 22:06
Thank you, I appreciate the input. Life is always about trial and error. That's how we learn; from our mistakes.

When old programmers die...do they decompile?
Katyman
FPSC Reloaded TGC Backer
11
Years of Service
User Offline
Joined: 5th Oct 2012
Location: Katy, Texas USA
Posted: 11th Jun 2015 02:34
UPDATE: With a few size adjustments and adding POSITION OBJECT command I was successful in integrating the code into my program and now I have skeleton(s) dancing over graves. Thank you again!!!

When old programmers die...do they decompile?

Attachments

Login to view attachments
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 11th Jun 2015 10:11 Edited at: 11th Jun 2015 10:11
i must say, the thread title is what caused me click it. my first thought was, "i wonder if someone is making a game where skeletons are playing dice".

glad to see i wasn't too far off, and glad to see you achieved your goal

Login to post a reply

Server time is: 2024-04-19 03:34:24
Your offset time is: 2024-04-19 03:34:24