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 / Loading too much X/

Author
Message
Yitzu
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location:
Posted: 27th Apr 2010 03:57
Ok, im making 2d game, im just starting, and i havent made too much.

And there r this images i load into it, the backgrounds of the first stage, which i transform into sprites for easier use of them.

The problem im having is that they load waaayyy too much, their kinda big, i know, but, isnt there anything i can do with this images to make them load faster, idk, any drawing tip or any coding way to load it or sprite it. Well, u guys r the experts, thx

Attachments

Login to view attachments
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 27th Apr 2010 10:19
Wow. That is gigantic. Well, if it is absolutely crucial that you maintain that ridiculous resolution, you could store it in a format that requires less of an overhead to load. .DDS files load very quickly but take up large amounts of space on the hard drive.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 27th Apr 2010 18:40
First I'll say I love the look of it. It looks like it's going to be fun.

Next I'll say there are better ways to accomplish your goals.

There's a series of tutorials in the newsletters for making a 2D platformer. Check those out. You'll be able to get some good ideas from that.

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 27th Apr 2010 20:09
That's truly ridiculous lol! It's not surprising it takes so long to load - it's 168MB!!!

You have to ask, why on earth is it so big????

Even if your game was running in 1024x768 screen mode it only needs to be 768 pixels high - the rest won't fit on the screen. At 768 pixels high, it's just under 20MB.

TDK

The Viking
15
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Asgard
Posted: 28th Apr 2010 03:21
well, another thing you can do is make them into tiles instead. If you make a small tile of the sand and a small tile of the sky, then that there will cut out most of the size of that image. You could then move them along accordingly. Same with the mountains, it looks like you have a few that are repeating behind there. If you make them tiles, you could even have the foreground move quicker than the mountains in the background.

www.myspace.com/norseblod
Yitzu
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location:
Posted: 28th Apr 2010 03:55
Actually, the mountains already do that i just uploaded the three images of the background together so u guys could see it completely.

So... the size... mmm...

Right now, im working on a mac to make my images for the game, im using adobe illustrator and adobe photoshop, i think that if i copy this image to adobe illustrator, i can make it smaller without affecting its quality (Which was why I didn't change it XD)
So... ill try doing that, i think it should work. (Actually i though the size of the image didnt affect that because in my code, i change its size with, "Size sprite", but now i see it actually slows it XP)

Ok, thx guys, always good advices

Quote: "
First I'll say I love the look of it. It looks like it's going to be fun.
"


Ty, that rly motivates me to continue
But actually its just like a test image, the original image of the game will have more details like shadows, lights and other things which i can make with adobe photoshop, rly cool
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 28th Apr 2010 18:50
I think The Viking is right. Tiling is going to save you a lot of load time, memory, and headaches..

Take your image of the mountains and trim it down to 1 screen width.

Make your trees all separate images so you can reuse them and put them where ever you want. With a good sound effect you could even make them fall over if it gets hit by a big vehicle or something. (picturing some lumberjack out in the forest yelling TIMBER while the tree is cracking and splintering at it's base and falling..)

I don't know if the sand is background or the surface the player will be running around on, but you can do the same with it. If it's background, make a screen width piece of it for tiling.

Yitzu
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location:
Posted: 29th Apr 2010 01:08
Mmmm... nice, ill make the mountains fit in 2 screen width because they move as u move the character. And, with the blue sky, ill just use a code to paint the background.
Nice tips
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 29th Apr 2010 18:35
Actually, make it fit just one screen. Then make a copy of it. As the first one scrolls you paste the 2nd one right next to it. (tiling)

Login to post a reply

Server time is: 2024-09-28 16:31:58
Your offset time is: 2024-09-28 16:31:58