Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - JohnB

Pages: [1]
1
SFML projects / Re: Game: survival , creative , multiplayer
« on: April 10, 2012, 10:43:50 pm »
Will do as soon as I get to a computer i am using a android.

2
SFML projects / Re: Game: survival , creative , multiplayer
« on: March 28, 2012, 11:54:57 pm »
I have picked up a few helpers and one artist now. I would say the first playable release will be in august, showcasing the player movement and what not.

I am also building a simple webserver into the game. I understand how to develop web pages(html/javascript/php/mysql) and all but not so much about what I should include in the headers of webpage. So far I find the only important part to be the content type and length.

3
Graphics / Re: Copying a texture from one RenderTexture to another
« on: March 28, 2012, 07:28:20 pm »
you could just use memcpy

4
Graphics / Re: Too many sprites?
« on: March 28, 2012, 05:29:27 pm »
just a suggestion only create the sprites visible on screen. then depending on the game position, change their image and subrect if necessary.

5
SFML projects / Re: Game: survival , creative , multiplayer
« on: March 26, 2012, 01:13:04 am »
http://www.youtube.com/watch/?v=cl_Wt_azr_4

That is a link to the video of my map system so far. The map is just a quick thrown together map. The grass falls if no block is under it at 1 block every 1.5 seconds. Sorry I used hypercam to record so its all thrown off. Anyways, the grass's falling property is only present on the test. It will actually be a property of sand. I also am using a Update every second method right now, but it is only temporary. In the next update the game will only update blocks that are being affected or are adjacent to affected blocks.

6
General / Re: [Help] Creating a Map
« on: March 25, 2012, 07:54:01 pm »
Erm... I am still having a problem....
Here is my Block.h and GrassBlock.h

I define Draw as a virtual function... But when I go through the Block[][] and call Draw, it calls it on the block side. Even though the value stored in teh array is a GrassBlock, or StoneBlock, or even WoodBlock it all calls the Draw of the Block class.

Code: [Select]
#pragma once
#include "SFML/Graphics.hpp"

class Block
{
public:
void SetBoundingBox(int offSetX, int offSetY, int width, int height);
void SetPosition(int x, int y);

Block();

virtual void Initialize(sf::Image &image);
virtual void Update(sf::RenderWindow &window);
virtual void Draw(sf::RenderWindow &window);

virtual bool ContainsPoint(int x, int y); //doesn't check if the edges are hit
virtual bool CollidesWithPoint(int x, int y); //checks edges and inside
void output();

bool active;
protected:
sf::Sprite blockSprite;
int hardness, objId, health, maxHealth;
int offsetX, offsetY, width, height; //bounding box
int positionX, positionY;
};

Code: [Select]
#pragma once
#include "Block.h"

class GrassBlock : public Block
{
public:
void Initialize(sf::Image &image);
void Draw(sf::RenderWindow &window);
void Update(sf::RenderWindow &window);
};

7
General / Re: [Help] Creating a Map
« on: March 25, 2012, 05:17:08 pm »
Thanks, didn't know if there was a better way.

8
General / [Help] Creating a Map
« on: March 25, 2012, 04:57:11 am »
I have a class called Block and a bunch of other classes extend this class. I have a problem however... I want to store all the blocks into an array. However, I am having a problem. The plan is to have the max number of blocks in the game 256 width 512 height. I want to efficiently store these into an array or any method to hold them.


Should I make a list of addresses pointing to them or what?

9
SFML projects / Game: survival , creative , multiplayer
« on: March 21, 2012, 05:45:24 pm »
I am making a game apart of a scholarship. The rules are to create a game and all developers be credited. I figured this would be a fun project too and have already got it planned out.

It is multplayer based and the game is played as so.

The player will have so much time to gather resources and build a fortress with his/her teammates. After said time the team will lose build mode and fight the other team. Users will use guns, magic, and other weapons/gear.

During the war time terrain/forts can be damaged by stray fire/explosions. Winning team gets money and can buy perks/weapons/vehicles.

For this project I am taking on a small team of anyone who can properly use the library given they actually want to have some experience from it. We will learn together but I do expect members of the team to better themselves.

Pages: [1]