Author |
Message |
Metal Chao
Joined: Sat May 05, 2007 6:04 pm Posts: 2901
|
 Re: Art Dump
If we're talking about coding it in a game environment everything becomes much easier because you can use linear interpolation to move things between two points, rather than a set number of frames per second. The physics and real positions of things are updated at a capped rate per second (so that time doesn't speed up and slow down with your CPU speed) but the drawing of graphics are updated as many times as the computer can possibly manage, so your image will move 1 pixel at a time 1000 times on a good computer, 2 pixels at a time 500 times on a less good computer or 500 pixels at a time twice on a really awful computer.
It sounded to me like he meant "how do I make a gif" but if it was "how do I code this" it's much easier.
|
Sat Jan 28, 2012 12:01 am |
|
 |
madmax
Joined: Sun Apr 22, 2007 8:01 pm Posts: 378 Location: Nomadic
|
 Re: Art Dump
Adriaan wrote: metal chao wrote: madmax wrote: But that would take like 300 frames for a 100x300 size image, that's awful tedious to move each layer over a few pixels. Welcome to animating You can probably move more than 3 pixels at a time for a 300 pixel image though, just remember that the more pixels per second you are moving, the choppier the animation will be Instead of animating all frames manually you could simply code it to move the layers accordingly as well as repeating them when needed, that is assuming you're talking about parallax backgrounds in games. That's what I was asking about in the first place, I need to know exactly how to code such a thing, of course I know I can sit there and move each layer manually if I have all the time in the world to spend on it.
|
Sat Jan 28, 2012 12:54 am |
|
 |
Metal Chao
Joined: Sat May 05, 2007 6:04 pm Posts: 2901
|
 Re: Art Dump
If you know how to draw objects to the screen it shouldn't be hard at all. Have your object move x pixels every update tick (relative to the character), and keep track of how far it has travelled so far. Edit your draw code so that this particular object draws itself twice, once at its actual position and then again at that position - the screen width + how far it has moved so far. Once the stored integer for how far it has gone is equal to or exceeds the width of the layer, have it snap back to its original position.
Then just make more than one of these, have them move at varying speeds and draw them in the correct order when you initialise your objects.
Last edited by Metal Chao on Sat Jan 28, 2012 1:09 am, edited 1 time in total.
|
Sat Jan 28, 2012 1:00 am |
|
 |
Adriaan
Data Realms Elite
Joined: Mon Oct 12, 2009 11:19 pm Posts: 797 Location: The Netherlands
|
 Re: Art Dump
madmax wrote: That's what I was asking about in the first place, I need to know exactly how to code such a thing, of course I know I can sit there and move each layer manually if I have all the time in the world to spend on it. I don't know what you're programming in, but generally you code the background images to move to the left according to the amount the character move's to the right, which you'll want to multiply/divide by different factors for each layer and vice versa. The images have a far left and far right screen coordinate, so you by comparing those positions you can detect wether or not part of the screen is uncovered by that layer. If it is you draw two instances of the same image, the second one starting on the far left or far right side of the first one when the first one is respectively leaving part of the screen on the left or right uncovered (providing your texture is wrappeable/tileable). Edit: Ninja'd 
|
Sat Jan 28, 2012 1:04 am |
|
 |
madmax
Joined: Sun Apr 22, 2007 8:01 pm Posts: 378 Location: Nomadic
|
 Re: Art Dump
Ok you lost me, I basically thought there was some sort of pre-written script for making a scrolling image. I've never coded in my life so I can't be arsed to figure it out.
|
Sat Jan 28, 2012 1:11 am |
|
 |
Metal Chao
Joined: Sat May 05, 2007 6:04 pm Posts: 2901
|
 Re: Art Dump
If you want to make an animated gif you'll have to do it by hand I'm afraid. Or download Flash, but it didn't play nicely with bitmap files without a bit of effort last I used it.
|
Sat Jan 28, 2012 1:13 am |
|
 |
madmax
Joined: Sun Apr 22, 2007 8:01 pm Posts: 378 Location: Nomadic
|
 Re: Art Dump
Nice, did you hand whittle it or Dremel etc.? Poplar's pretty good for such a thing. I've whittled a few replica guns with white pine, not the greatest wood for carving but it works.
|
Sat Jan 28, 2012 2:17 am |
|
 |
madmax
Joined: Sun Apr 22, 2007 8:01 pm Posts: 378 Location: Nomadic
|
 Re: Art Dump
Nice of you to go to such trouble for a hand made gift. I would like to see the bouquet sometime.
|
Sat Jan 28, 2012 5:48 am |
|
 |
Sly-UX1XN
Joined: Sat Oct 01, 2011 9:06 pm Posts: 125 Location: london
|
 Re: Art Dump
Some of my most recent (ever) hand drawn art....because im ♥♥♥♥ at digital art.
Please give feedback.
|
Sun Jan 29, 2012 2:17 pm |
|
 |
Lizardheim
DRL Developer
Joined: Fri May 15, 2009 10:29 am Posts: 4107 Location: Russia
|
 Re: Art Dump
 This seems oddly familiar...
|
Sun Jan 29, 2012 6:56 pm |
|
 |
Emogotsaone
Joined: Mon Mar 07, 2011 2:18 am Posts: 717
|
 Re: Art Dump
|
Sun Jan 29, 2012 10:37 pm |
|
 |
madmax
Joined: Sun Apr 22, 2007 8:01 pm Posts: 378 Location: Nomadic
|
 Re: Art Dump
Tiny Daniel Plainview from There Will be Blood.  CnC welcome.
|
Mon Jan 30, 2012 8:26 am |
|
 |
Yoman987
Joined: Fri Apr 04, 2008 12:06 am Posts: 196 Location: In front of keyboard, staring at monitor. (WA, Oz)
|
 Re: Art Dump
Lizardheim wrote: [img] This seems oddly familiar... Ooh! Ooh! Me! Me! I know! It's Mario, isn't it? No, it's Metroid. Looks awesome
|
Mon Jan 30, 2012 2:15 pm |
|
 |
madmax
Joined: Sun Apr 22, 2007 8:01 pm Posts: 378 Location: Nomadic
|
 Re: Art Dump
Handsome lovely gentleman  And I'm working on yet another one of these landscapes  Sly-UX1XN wrote: Please give feedback.
Your characters have really short legs and lack depth, the soldier is nice but he too suffers from bad anatomy. Drawing on lined paper makes everything look like a classroom doodle.
Last edited by madmax on Tue Jan 31, 2012 2:15 am, edited 2 times in total.
|
Tue Jan 31, 2012 12:28 am |
|
 |
Izen
Joined: Sat Oct 22, 2011 12:56 am Posts: 1474 Location: At the corner of unoriginality and boring
|
 Re: Art Dump
Haha, no but seriously guys, stop making my art skills look horribly inadequate.
|
Tue Jan 31, 2012 2:09 am |
|
 |
|