first grass tile

Forum for the creative side of the game development process: art, music, storyline, gameplay, concepts, etc. Any sort of relevant discussion is welcome here.

Moderator: PC Supremacists

Post Reply
pythip
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 33
Joined: Sat Apr 24, 2010 11:25 pm

first grass tile

Post by pythip »

This is my first attempt at a tile, I used gimp to create this, what are your thoughts about this tile? alright for a first try, or should I quit while I'm ahead, and how do I make it so that it doesn't look like there are diagonal lines down the screen when I render it?

code I used to display image

Code: Select all

#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
int main (int argc, char *argv[])
{
	const int SCREEN_WIDTH = 640;
	const int SCREEN_HEIGHT = 480;
	SDL_Surface *buffer = NULL;//creates the buffer
	SDL_Surface *grass = NULL;//creates the buffer
	SDL_Init(SDL_INIT_VIDEO);
	buffer = SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, 32, SDL_SWSURFACE);
	bool done = false;
	SDL_Event event;
	SDL_WM_SetCaption("Window", NULL);
	grass =  IMG_Load("grass1.png");
	while(!done)
	{
SDL_FillRect(buffer,NULL,0x000000);
	for (int y = 0; y < SCREEN_HEIGHT; y+=32)
	{	
		for (int x = 0; x<SCREEN_WIDTH; x+=32)
		{
		SDL_Rect area = { x, y,32,32};	
		SDL_BlitSurface( grass, NULL,buffer , &area );
		}
	}
	SDL_Flip(buffer);
		while(SDL_PollEvent(&event))
		{
			if (event.type == SDL_QUIT)
			{
				done = true;
			}
		}	
	}
SDL_FreeSurface(grass);
	SDL_Quit();
	return 0;
}
Attachments
grass1.png
grass1.png (1.47 KiB) Viewed 1995 times
Live-Dimension
Chaos Rift Junior
Chaos Rift Junior
Posts: 345
Joined: Tue Jan 12, 2010 7:23 pm
Favorite Gaming Platforms: PC - Windows 7
Programming Language of Choice: c++;haxe
Contact:

Re: first grass tile

Post by Live-Dimension »

It looks pretty dammed good, though I wonder how you made it. It doesn't exactly look like pixel art. If not, will the rest of your games graphics suit the style of the grass?

I went and tiled it in photoshop, hope you don't mind. With the vertical lines, are you talking about the ones showing up on here? If so, then the tile needs more work, get arid of that black stripe.
tile.png
tile.png (4.93 KiB) Viewed 1987 times
I had a VERY quick look at your code and the mathematics seems to check out, but there could still be an error in it. Someone with better SDL experience will need to help you there.
Image
pritam
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 991
Joined: Thu Nov 13, 2008 3:16 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Amiga, PSOne, NDS
Programming Language of Choice: C++
Location: Sweden

Re: first grass tile

Post by pritam »

I think it looks good, a little bit repetitive but that's alright after some touching up.
pythip
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 33
Joined: Sat Apr 24, 2010 11:25 pm

Re: first grass tile

Post by pythip »

@Live-Dimension, I basically just used different filters to get different effects.

This is my second attempt, which is just the first one, but I did some more work on it. I think one of my problems with the first one was there was too many shades of colours in it, made it too hard for me to make it the way I like it. This new one still has some of the diagonal thing, but since there are a lot brighter colours, I don't think it stands out as much, I think this one works better, any thoughts?
grass2.png
grass2.png (1.41 KiB) Viewed 1916 times
pritam
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 991
Joined: Thu Nov 13, 2008 3:16 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Amiga, PSOne, NDS
Programming Language of Choice: C++
Location: Sweden

Re: first grass tile

Post by pritam »

It lacks some contrast, but definetly works.
Post Reply