Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

slooksterPSV

macrumors 68040
Original poster
Apr 17, 2004
3,544
306
Nowheresville
Here's a screenshot with better graphics:

Also I need your guys' help - Should I start a Website to keep you guys informed on how this project is coming along or should I put all my focus on the project?

PM me, email me, or ask me to post a new thread with a Poll and let's see who thinks I should and or shouldn't.

Also I've put sound in the project as well.
 

Attachments

  • Picture 2.png
    Picture 2.png
    53.6 KB · Views: 107

savar

macrumors 68000
Jun 6, 2003
1,950
0
District of Columbia
slooksterPSV said:
Here's a screenshot with better graphics:

Also I need your guys' help - Should I start a Website to keep you guys informed on how this project is coming along or should I put all my focus on the project?

PM me, email me, or ask me to post a new thread with a Poll and let's see who thinks I should and or shouldn't.

Also I've put sound in the project as well.

This is looking pretty cool.

I downloaded the last version you posted, two comments:

1) the sprites are awfully small...why not make the sprites significantly largeR? What resolution do you think peple are most likely to run your game at?

2) The collision detection is a little wonky...it can be hard to walk through certain places where there is clearly a path.
 

DavidLeblond

macrumors 68020
Jan 6, 2004
2,351
683
Raleigh, NC
slooksterPSV said:
Here's a screenshot with better graphics:

Also I need your guys' help - Should I start a Website to keep you guys informed on how this project is coming along or should I put all my focus on the project?

PM me, email me, or ask me to post a new thread with a Poll and let's see who thinks I should and or shouldn't.

Also I've put sound in the project as well.

Sure, toss up a Wordpress page or something so I can RSS it.
 

slooksterPSV

macrumors 68040
Original poster
Apr 17, 2004
3,544
306
Nowheresville
savar said:
This is looking pretty cool.

I downloaded the last version you posted, two comments:

1) the sprites are awfully small...why not make the sprites significantly largeR? What resolution do you think peple are most likely to run your game at?

2) The collision detection is a little wonky...it can be hard to walk through certain places where there is clearly a path.
I know, I need someone to draw me Graphics though. I just used him bc it was easiest to get. I think its default.bmp or... char1.bmp? I don't remember but if someone wants to make graphics, use that as a whatcha-ma-call-it. Unless I can do full screen then I'd leave the sprite like it is.
 

slooksterPSV

macrumors 68040
Original poster
Apr 17, 2004
3,544
306
Nowheresville
http://www.filefactory.com/?472582 - C[Slice] Version 0.2.5 beta
See readme.rtf for updates.

Updates:
=====
Added sound - via wav
Added music - via ogg/vorbis
Added configuration file
Added build icon
Added fullscreen or window support - change config file in data directory to choose either or.

S key to play sound
M key to play music
P key to stop music
 

savar

macrumors 68000
Jun 6, 2003
1,950
0
District of Columbia
slooksterPSV said:
I know, I need someone to draw me Graphics though. I just used him bc it was easiest to get. I think its default.bmp or... char1.bmp? I don't remember but if someone wants to make graphics, use that as a whatcha-ma-call-it. Unless I can do full screen then I'd leave the sprite like it is.

Yeah, as a developer, getting good artwork is very difficult.

Maybe try posting in the graphics forum here to see if anybody wants to collaborate?
 

deputy_doofy

macrumors 65816
Sep 11, 2002
1,466
410
slooksterPSV said:
Here's a screenshot with better graphics:

Also I need your guys' help - Should I start a Website to keep you guys informed on how this project is coming along or should I put all my focus on the project?

PM me, email me, or ask me to post a new thread with a Poll and let's see who thinks I should and or shouldn't.

Also I've put sound in the project as well.

I haven't downloaded this, but it looks really cool. Would love to know how you coded the 2D graphics. I have lots of RPG ideas, but tend to get stuck when trying to figure out how to do any graphics.
 

slooksterPSV

macrumors 68040
Original poster
Apr 17, 2004
3,544
306
Nowheresville
deputy_doofy said:
I haven't downloaded this, but it looks really cool. Would love to know how you coded the 2D graphics. I have lots of RPG ideas, but tend to get stuck when trying to figure out how to do any graphics.
I took these two images: (see below)
1 = Grass
2 = Water
The rectangle if its a #2 by means of programming is... well here's the code:
Code:
//Copied from cLevel.h
//... -- previous code
	void Load(char* level)
	{
		int x = 0;
		int y = 0;
		cTile *temp;
		ifstream input_stream(level);
		int dummy;
		int input_tile_type;
		input_stream >> wtile_width;
		input_stream >> wtile_height;
		area_width = wtile_width*TILE_WIDTH;
		area_height = wtile_height*TILE_HEIGHT;
		input_stream >> dummy;
		
		int tiletotal = wtile_width*wtile_height;
		
		for(int n = 0; n <= wtile_width+2; n++)
		{
			temp = new cTile(m_Bitmap, n/2, n*2, 1);
		}
		delete temp;
		
		for(int t = 0; t < tiletotal; t++)
		{
			input_stream >> input_tile_type;
			m_Tiles[t] = new cTile(m_Bitmap, x, y, (int)input_tile_type);
			x += TILE_WIDTH;
			if(x >= area_width)
			{
				x = 0;
				y += TILE_HEIGHT;
			}
		}
		
		input_stream >> player_start_x;
		input_stream >> player_start_y;
		
		input_stream.close();
	}
		
	void Draw()
	{
		int tiletotal = wtile_width*wtile_height;
		//leveltemp = SDL_DisplayFormat(m_Window);
		for(int t = 0; t < tiletotal; t++)
		{
			m_Tiles[t]->Draw(m_Window);
		}
		//SDL_UpdateRect(leveltemp, 0, 0, 0, 0);
		//SDL_BlitSurface(m_Temp, &camera, m_Window, &dest);
	}
//... more code after

//cTile.h
//... code before
	void Draw(SDL_Surface* window)
	{
		static int x = -1;
		x++;
		if(RectOnRectCollision(camera, box))
		{
			HandleUpdate(box.x-camera.x, box.y-camera.y, m_Tile, window, &tile);
		}
	}
//... more code after
//Camera is a global SDL_Rect

EDIT: HERE'S HOW I DID THE PLAYER GRAPHICS
Code:
//cPlayer.h
//... Code before
	void Draw(SDL_Surface* window, Direction dir, bool mp)
	{

	static int player = 0;
	static Direction d;
 
	if(mp){
		switch (dir)
		{
			case UP:
				//player = 0;
				break;
			case DOWN:
				//player = 2;
				break;
			case LEFT:
				//player = 3;
				break;
			case RIGHT:
				//player = 1;
				break;
			case NONE:
				break;
			case UP_RIGHT:
				dir = UP;
				break;
			
		}
		d = dir;
		
			if(dir == UP || dir == DOWN || dir == RIGHT || dir == LEFT){
				player += 1;
				if(player > 2) {
					player = 0;
				}
			}
		}
		SDL_Rect destination = { center_X-camera.x, center_Y-camera.y, 24, 36};
		SDL_Rect source      = { CHAR_WIDTH*player, CHAR_HEIGHT*d, CHAR_WIDTH, CHAR_HEIGHT };			
		HandleUpdate(r_Player.x-camera.x, r_Player.y-camera.y, c_Player, window, &source);
    }
//... Code after

Here are the two images I used:
 

Attachments

  • Basis.png
    Basis.png
    33.8 KB · Views: 117
  • chara1.bmp
    216.1 KB · Views: 113

slooksterPSV

macrumors 68040
Original poster
Apr 17, 2004
3,544
306
Nowheresville
https://forums.macrumors.com/showthread.php?p=2538884#post2538884

I've given up the project, its too complex where I don't know a darn thing about memory allocation (yes I know of calloc, malloc, realloc).
There's just too much to work with, and I've been working at a new job a lot so I'm giving up this project. It's open source so go ahead and make some RPG's using my code. Modify it, use it, reuse it, copy it, go for it, just be sure to give props to Aaron Cox for the base-code: http://www.aaroncox.net/ ok? Thanks you guys, it was fun to get it this far, but its just too complex for me.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.