My first game: A Zombie RPG

Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.

Moderator: PC Supremacists

User avatar
EdBoon
Chaos Rift Junior
Chaos Rift Junior
Posts: 258
Joined: Fri May 28, 2010 10:44 pm
Current Project: Top down multiplayer shooter using unity 3D
Favorite Gaming Platforms: 360, SNES, ps1
Programming Language of Choice: C++, C#
Location: Atlanta, GA
Contact:

Re: My first game: A Zombie RPG

Post by EdBoon »

eatcomics wrote:Dude this looks great! I absolutely can't wait to see more :D Keep up the awesomeness

*sub'd

BTW I FUCKING LOVE THE OFFSPRING!!!
carry on
are you watching the right videos?? lol

anyway what i meant by i hear the girls of atlanta calling me actually meant a morning of uncertainty and solitude haha. blackouts, worthless!!!

XianForce wrote:So your using pixel perfect collisions? I'm curious as to how good that is, in terms of effective vs efficient. I know it works well, but I would imagine that as you add more and more elements to check again, it will very quickly become unrealistic as a collision system.

But then again, I've never extensively used pixel-perfect, so let me know how it works out =D!
hmm not familiar with that, i just wrote it myself quick ... actually its pretty ugly.... But I agree, I can see that it will quickly be VERY inefficient once there is more than 2 retarded looking zombies in the mix

Code: Select all

int iLikeToHaveCollision( BITMAP* bmp1 , BITMAP* bmp2 , Player & rOne, Enemy & rEnemy, int w1, int h1, int w2, int h2)
{
	
	//check to see if they are even close enough to intersect
	if ( rOne.GetItsX() > rEnemy.GetHisX() - w1 && rOne.GetItsX() - w2 < rEnemy.GetHisX() 
		&& rOne.GetItsY() > rEnemy.GetHisY() -h1 && rOne.GetItsY() - h2 < rEnemy.GetHisY())
	{
	// take difference in locations to make origin 0,0 for reference
	int xOffset = 0;
	int yOffset = 0;
	if (rOne.GetItsX() > rEnemy.GetHisX())
		xOffset = rOne.GetItsX() - rEnemy.GetHisX();
	else
		xOffset = -rOne.GetItsX() + rEnemy.GetHisX();
	if(rOne.GetItsY() > rEnemy.GetHisY())
		yOffset = rOne.GetItsY() - rEnemy.GetHisY();
	else
		yOffset = -rOne.GetItsY() + rEnemy.GetHisY();


	int **bmp1Array;
	int **bmp2Array;
	
	bmp1Array = new int*[w1];
	bmp2Array = new int*[w2];
	
	for (int i = 0; i < h1; ++i)
		bmp1Array[i] = new int[h1];
	for (int i = 0; i < h2; ++i)
		bmp2Array[i] = new int[h2];


	 // De-Allocate memory to prevent memory leak



	for(int j = 0 ; j < h1; j++)
	{
		for(int i = 0 ; i < w1; i++)
		{
			if (getr(getpixel(bmp1,i,j)) != 255 && 
			getg(getpixel(bmp1,i,j)) != 0 && 
			getb(getpixel(bmp1,i,j)) != 255)
			{
				bmp1Array[i][j] = 1;
			}
			else
				bmp1Array[i][j] = 0;
		}

	}
	for(int j = 0 ; j < h2; j++)
	{
		for(int i = 0 ; i < w2; i++)
		{
			if (getr(getpixel(bmp2,i,j)) != 255 && 
			getg(getpixel(bmp2,i,j)) != 0 && 
			getb(getpixel(bmp2,i,j)) != 255)
			{
				bmp2Array[i][j] = 1;
			}
			else
				bmp2Array[i][j] = 0;
		}

	}

	for(int j = 0 ; j < h1; j++)
	{
		for(int i = 0 ; i < w1; i++)
		{
			if (bmp1Array[i][j])
			{
				if( i <= w1 - xOffset && j <= h1 - yOffset && bmp2Array[i + xOffset-1][j + yOffset-1])
				{
					
					// De-Allocate memory to prevent memory leak
					for (int i = 0; i < h1; ++i)
						delete [] bmp1Array[i];

					delete [] bmp1Array;

					for (int i = 0; i < h2; ++i)
						delete [] bmp2Array[i];

					delete [] bmp2Array;
					return 1;
				
				}

			}
				
	
		}
	}
	for(int j = 0 ; j < h2; j++)
	{
		for(int i = 0 ; i < w2; i++)
		{
			if (bmp1Array[i][j])
			{
				if( i <= w2 - xOffset && j <= h2 - yOffset && bmp2Array[i + xOffset-1][j + yOffset-1])
				{
					
					// De-Allocate memory to prevent memory leak
					for (int i = 0; i < h1; ++i)
						delete [] bmp1Array[i];

					delete [] bmp1Array;

					for (int i = 0; i < h2; ++i)
						delete [] bmp2Array[i];

					delete [] bmp2Array;
					return 1;
				
				}

			}
				
	
		}
	}
	// De-Allocate memory to prevent memory leak
	for (int i = 0; i < h1; ++i)
		delete [] bmp1Array[i];
	delete [] bmp1Array;
	for (int i = 0; i < h2; ++i)
		delete [] bmp2Array[i];
	delete [] bmp2Array;
	}
	return 0;


}
//wait, delete how many times?

im actually kind of excited about the story line i have going now,, ahhhhhh!!!! maybe that will jump to phase 1 and 2 ;)
Last edited by EdBoon on Mon Jun 14, 2010 9:08 pm, edited 1 time in total.
Undead Empire -> http://bit.ly/dYdu3z
Gamerscore Tracker -> http://bit.ly/vI4T4X
Undead Empire: Hellfire -> http://bit.ly/1AgC4ZY
facebook.com/BigRookGames twitter.com/BigRookGames
youtube.com/user/bigrookdigital
User avatar
EdBoon
Chaos Rift Junior
Chaos Rift Junior
Posts: 258
Joined: Fri May 28, 2010 10:44 pm
Current Project: Top down multiplayer shooter using unity 3D
Favorite Gaming Platforms: 360, SNES, ps1
Programming Language of Choice: C++, C#
Location: Atlanta, GA
Contact:

Re: My first game: A Zombie RPG

Post by EdBoon »

oops on the double post
Last edited by EdBoon on Mon Jun 14, 2010 9:09 pm, edited 2 times in total.
Undead Empire -> http://bit.ly/dYdu3z
Gamerscore Tracker -> http://bit.ly/vI4T4X
Undead Empire: Hellfire -> http://bit.ly/1AgC4ZY
facebook.com/BigRookGames twitter.com/BigRookGames
youtube.com/user/bigrookdigital
K-Bal
ES Beta Backer
ES Beta Backer
Posts: 701
Joined: Sun Mar 15, 2009 3:21 pm
Location: Germany, Aachen
Contact:

Re: My first game: A Zombie RPG

Post by K-Bal »

Argh, use code tags ;)
XianForce
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 767
Joined: Wed Oct 29, 2008 8:36 pm

Re: My first game: A Zombie RPG

Post by XianForce »

Well, if you find pixel-perfect is too inefficient, the very first part of your code can act as collision detection, I think. It looks like a simple bounding box collision detection.
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: My first game: A Zombie RPG

Post by eatcomics »

EdBoon wrote: are you watching the right videos?? lol

anyway what i meant by i hear the girls of atlanta calling me actually meant a morning of uncertainty and solitude haha. blackouts, worthless!!!
Yeah... and uh I knew what you meant about the girls :D
Image
User avatar
EdBoon
Chaos Rift Junior
Chaos Rift Junior
Posts: 258
Joined: Fri May 28, 2010 10:44 pm
Current Project: Top down multiplayer shooter using unity 3D
Favorite Gaming Platforms: 360, SNES, ps1
Programming Language of Choice: C++, C#
Location: Atlanta, GA
Contact:

Re: My first game: A Zombie RPG

Post by EdBoon »

I was away most of the weekend so didn't get to do anything but I did a bit today after work. Just a little of the intro story line. At some point I will work on decent(for my ability) sprite sheets unless I find someone but for now i'm just throwing in images. Added a function to show dialog text on screen, will clean up cosmetics a little later.


The video is a bit hard to see unless in 720p.


<object width="660" height="525"><param name="movie" value="http://www.youtube.com/v/m9IXUJNYupw&hl ... ram><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/m9IXUJNYupw&hl ... 6&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="660" height="525"></embed></object>[/youtube]

I'll probably throw up a video a week now, any suggestions let me know, thanks!
Last edited by EdBoon on Mon Jun 14, 2010 9:02 pm, edited 1 time in total.
Undead Empire -> http://bit.ly/dYdu3z
Gamerscore Tracker -> http://bit.ly/vI4T4X
Undead Empire: Hellfire -> http://bit.ly/1AgC4ZY
facebook.com/BigRookGames twitter.com/BigRookGames
youtube.com/user/bigrookdigital
User avatar
short
ES Beta Backer
ES Beta Backer
Posts: 548
Joined: Thu Apr 30, 2009 2:22 am
Current Project: c++, c
Favorite Gaming Platforms: SNES, PS2, SNES, SNES, PC NES
Programming Language of Choice: c, c++
Location: Oregon, US

Re: My first game: A Zombie RPG

Post by short »

lol creative day 6
My github repository contains the project I am currently working on,
link: https://github.com/bjadamson
User avatar
epicasian
Chaos Rift Junior
Chaos Rift Junior
Posts: 232
Joined: Mon Feb 22, 2010 10:32 pm
Current Project: Gigazilla Engine
Favorite Gaming Platforms: Dreamcast, SNES, PS2, PC
Programming Language of Choice: C/++
Location: WoFo, KY

Re: My first game: A Zombie RPG

Post by epicasian »

hahahaha the short name of the virus was great!
K-Bal
ES Beta Backer
ES Beta Backer
Posts: 701
Joined: Sun Mar 15, 2009 3:21 pm
Location: Germany, Aachen
Contact:

Re: My first game: A Zombie RPG

Post by K-Bal »

Nice Update :lol:
User avatar
Milch
Chaos Rift Junior
Chaos Rift Junior
Posts: 241
Joined: Sat Jul 11, 2009 5:55 am
Programming Language of Choice: C++
Location: Austria, Vienna

Re: My first game: A Zombie RPG

Post by Milch »

Lol at the virus name :D
Looks good so far, sub'd.
Follow me on twitter!
User avatar
GroundUpEngine
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 835
Joined: Sun Nov 08, 2009 2:01 pm
Current Project: mixture
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Location: UK

Re: My first game: A Zombie RPG

Post by GroundUpEngine »

Rofl, nice one :lol:
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: My first game: A Zombie RPG

Post by eatcomics »

"We call it JFAIL for short" LOL

Awesome update man :D
Image
User avatar
EdBoon
Chaos Rift Junior
Chaos Rift Junior
Posts: 258
Joined: Fri May 28, 2010 10:44 pm
Current Project: Top down multiplayer shooter using unity 3D
Favorite Gaming Platforms: 360, SNES, ps1
Programming Language of Choice: C++, C#
Location: Atlanta, GA
Contact:

Re: My first game: A Zombie RPG

Post by EdBoon »

I know I said only weekly videos now but I felt like sharing. I changed a little bit since the last video, I revised a lot of the functions to work better, like collision, distance, etc. I decided to use Mappy to make things easier. I'm not ready to write a tile program just yet :D I can't take credit for the character sprites either, it was out of a book (the CD of course) called Game Programming All In One(It's actually a decent book for Allegro) since I'm a rook at the game side of programming. You can tell I messed with some of the sprite frames until I remembered how terrible my artistic side is. I Am still working on the story line on paper, but want to get all the functions and everything working and not specific to the game so I can use the engine again. You can see he gets faster through the level, i increased his speed to test out how much it should increase per level gained or if you have to use your skill point to increase speed.

I am currently trying to figure out an algorithm to make the enemies move more like zombies. It's obvious I'm just using a seek function to follow the x and y coordinates of the player once I get into range of them, but it seems too easy to shoot them, they line up for you pretty much. Hmmm.... I'm sure i'll come up with something...

Also I'm messing around with another enemy similar to a licker from Resident Evil but more like the one from the movie, it will move sideways to you instead of directly towards you, crawling on walls, getting closer each time it 'dives' sideways. That will probably be this weekend.

More of the Jejunum virus coming soon!

The map will be different but it will hold the same style. Any ideas/suggestions/comments/criticism/etc... all very welcome :bow:

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/_KRJanGqAk4&hl ... ram><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/_KRJanGqAk4&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>[/youtube]
Undead Empire -> http://bit.ly/dYdu3z
Gamerscore Tracker -> http://bit.ly/vI4T4X
Undead Empire: Hellfire -> http://bit.ly/1AgC4ZY
facebook.com/BigRookGames twitter.com/BigRookGames
youtube.com/user/bigrookdigital
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: My first game: A Zombie RPG

Post by dandymcgee »

That looks really good.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
EdBoon
Chaos Rift Junior
Chaos Rift Junior
Posts: 258
Joined: Fri May 28, 2010 10:44 pm
Current Project: Top down multiplayer shooter using unity 3D
Favorite Gaming Platforms: 360, SNES, ps1
Programming Language of Choice: C++, C#
Location: Atlanta, GA
Contact:

Re: My first game: A Zombie RPG

Post by EdBoon »

another update...

so I got multiple enemies working and their seek and collision detection with the main character, collision with themselves is there, just not working completely right.. I also did some other stuff..

blah, tired, going to bed :P



<object width="873" height="525"><param name="movie" value="http://www.youtube.com/v/2UjT2XEo2dg&hl ... ram><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/2UjT2XEo2dg&hl ... 6&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="873" height="525"></embed></object>[/youtube]
Undead Empire -> http://bit.ly/dYdu3z
Gamerscore Tracker -> http://bit.ly/vI4T4X
Undead Empire: Hellfire -> http://bit.ly/1AgC4ZY
facebook.com/BigRookGames twitter.com/BigRookGames
youtube.com/user/bigrookdigital
Post Reply