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 - tank69

Pages: [1]
1
Graphics / Shape "following" the end position of a sprite
« on: April 13, 2016, 10:04:02 pm »
Hi everyone. I have a tank, a turret and an a bullet that i have drawn on the window. the tank and its turret are sprites, and the bullet i used an sf::CircleShape. i just wanna ask if this is correct..and how should i set the position of my sf::CircleShape object to be always on the edge of the turret, like for example user gave a certain angle of the turret so the turret rotates and the sf::CircleShape object follows..

this is really rather simple to you guys, i am an absolute beginner, this is my first game that im trying to create.
any advice would be much appreciated. "Tanks" in advance. :) ;) :)

2
Graphics / Re: loadFromFile doesn't work but shows no error message
« on: April 06, 2016, 12:37:56 am »
and if i cleared the window, then absolutely there would be nothing displayed...

3
Graphics / Re: loadFromFile doesn't work but shows no error message
« on: April 06, 2016, 12:35:59 am »
i have those on my code, i just minimize the code that i need to show. and also the window.draw(sprite) should be window.draw(psprite) typo on the post.

4
Graphics / Re: loadFromFile doesn't work but shows no error message
« on: April 05, 2016, 09:45:28 pm »
Hi, i am facing the same issue right now except that im sure that i am using the right versions of sfml, i am using codeblocks.

The problem i have is that .loadFromFile is indeed working, if i intentionally type an incorrect image name, just to test if it returns an error, well it does so im sure it can find the file i was specifying. but i am wondering why does it not drawn on the window.

here is my code.what am i missing???

 


sf::Texture ptexture;
               if(!ptexture.loadFromFile("tank.png"))
                return 1;
            ptexture.setSmooth(true);
           
sf::Sprite psprite;
            psprite.setTexture(ptexture);
            psprite.setPosition(200,200);

while (window.isOpen())
{
window.draw(sprite);
}
 

5
Graphics / Re: Game-Development for absolute beginner
« on: April 03, 2016, 09:51:27 pm »
hi, I watched some videos on how to create state machines??but i don't understand how to do them yet, i guess i have to stick to multiple windows for now.

Now if i used multiple windows for the 3 rounds, will it be ok? i do not yet care much on efficiency of managing the screens, as long as i get what i need to do..

6
Graphics / Re: Game-Development for absolute beginner
« on: March 30, 2016, 03:02:33 am »
but is this correct if ever? just an advice if this is a good "storyboard"or concept.
i have been thinking if i could do it like this.

1. create 3 windows, for rounds 1-3.
2. Round1-easy draw the tanks and obstacle. game starts, when round ends, write name and score to text file, close round1 window, then open;
3. Round2-mediumdraw the tanks and slightly bigger obstacle. game starts, when round ends, overwrite name and score to the same textfile, close round2 window, then open;
4.Round3-hardagain draw the tanks huge obstacle. game starts, when round ends, overwrite name and score to the same textfile.

is this correct?can somebody suggest if there is a simpler way to do it?

7
Graphics / Re: Game-Development for absolute beginner
« on: March 29, 2016, 07:20:53 am »
i have been thinking if i could do it like this.

1. create 3 windows, for rounds 1-3.
2. Round1-easy draw the tanks and obstacle. game starts, when round ends, write name and score to text file, close round1 window, then open;
3. Round2-mediumdraw the tanks and slightly bigger obstacle. game starts, when round ends, overwrite name and score to the same textfile, close round2 window, then open;
4.Round3-hardagain draw the tanks huge obstacle. game starts, when round ends, overwrite name and score to the same textfile.

is this correct?can somebody suggest if there is a simpler way to do it?

8
Graphics / Re: Game-Development for absolute beginner
« on: March 29, 2016, 07:06:14 am »
this is how far i have gotten, i have already coded how to get player names.

i will attach the screen shot..

9
Graphics / Game-Development for absolute beginner
« on: March 29, 2016, 06:57:28 am »
Hello, SFML-Dev community, i am new to programming, i only have basic knowledge in c++, yet i was tasked to create a simple text based game(for three days)...i have already set up SFML in my computer and is working correctly, im using Code::Blocks.

on game development-I really need some help because this is really new to me, i haven't even mastered c++ yet.

ok, here are the desciption of my GAME that i should create with the help i could get from you guys.

1. Title is "Battle Tanks"-2 players, turn based.(this is an artillery game)
2. Should be 2D, textbased, no special images, tanks should be drawn in ASCII Characters(I think ill just trick my teacher to use "sprites" using an ASCII texture to draw the tank.
3. there are 3 rounds. ROUND1-EASY, ROUND2-MEDIUM,ROUND3-HARD. the tanks are stationary, the only moving part is the turret.
4. between the two tanks is an obstacle, this is also fixed in rounds 1-3, the obstacle just gets bigger as the round progresses.

questions before i start:
1. with your help guys, is this possible to do in 72 hours tops?-less the few hours of sleep maybe  :)
2. can you please advise me the things that i should do?
3. and is it possible to ask all my questions (if they are not yet in the forum) that may arise regarding this topic in this thread?so i wont be creating topics every now and then?

--please i need help--


Pages: [1]
anything