Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

XaOs

Dynamic / static images

This topic is 6157 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! Just a little question that has been bothering me for quite some time lately...... I presume the most of you have played Worms!! How do they make the background so dynamic...... Like when you shot on the ground with a gun of any kind, you remove some of the background, and if you walk in the hole, you don''t walk where the background used to be, but you fall down into the hole!! If someone just could point me into the right direction... I don''t need code or anything, but i will need a little hint on how the proceed when loading in the image as a background!! btw: I am using a simple quad for the background.......and i find it rather hard to remove some parts of it!! I was thinking of using pure pixels, but unfortenately i don''t know how to do that... Hope someone can help me out a little bit here.... Take Care! - -- ---[XaOs]--- -- -

Share this post


Link to post
Share on other sites
Advertisement
I am using an array for that problem...
at level-load you compute the value of every pixel in the map, and after that you can easiliy change/read the values...
-So if it is empty(0), you can walk through this pixel, every other value got it''s special meaning!
--> Hope that helps...

SnAkE''s Programming Resources

Share this post


Link to post
Share on other sites
hmmm....never actually thought of that!!
But this will involve a quite big array though.....
Say i want a screen that scrolls 10 times both left and right!!
If each array is 800x600 (Image size), that would be 80000x60000!!

Witch i imaging will make my fps drop to the floor as a dead dog!!!!!

Thanks anyway....this will work fine for a small image though..

How is it going with your game? Any luck?
I am not at home no, and nor will i be before the 28th,so if you got a rush with the music....i guess i''d better hurry up then!!

Take Care!

- -- ---[XaOs]--- -- -

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
>Say i want a screen that scrolls 10 times both left and right!!
>If each array is 800x600 (Image size), that would be 80000x60000!!

?? If I got you right, then you want to scroll 10 800x600 screens to the left aswell as to the right ? That would be 20 800x600 screens, or an 16000x600 array. That''s roughly 10Mb and shouldn''t be a problem.
A 80000x60000 map would be quite unplayable

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!