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

Pages: [1] 2
1
Graphics / Random function updated to Co-ordinates
« on: June 03, 2010, 01:24:24 pm »
Can I get Co-ordinates of my snake when moved

Is there any function or something in SFML

Like If Co-ordinates of snake == Co-ordinates of apple
{
apple.move(randx,randy)
score++
}

Is my basic Idea So can we get actuall snake Co-ordinates and give it to a letter?

like

co=Co-ordinates of snake

how to get that

2
Graphics / Random function updated to Co-ordinates
« on: June 01, 2010, 07:05:35 am »
OK this is for snake game But what if I want to destroy a particular sprit

Say Like there is villein and player killed him how will he vanish?

We need to destroy it

3
Graphics / Random function updated to Co-ordinates
« on: May 31, 2010, 08:41:13 pm »
Yes thanks But Can u tell me how to destroy a created sprit

Like if Some thing == something

{
destroy spirit
}

Like that something

Is there anything That Will destroy a drawn sprit

4
Graphics / Random function updated to Co-ordinates
« on: May 31, 2010, 04:41:10 pm »
Thank you Mindiell , Laurent

Well Mindiell It did the work , At least I guess It did.

Well now I am trying How can I destroy The apple once eaten And how to grow the snake

But growing the snake will be on if condition and For loop At least this is my Idea

But I am not aware how to Destroy that apple Once ate

5
Graphics / Random function updated to Co-ordinates
« on: May 31, 2010, 02:18:47 pm »
I know C++ 's random Function

But

Code: [Select]
Sprite.SetPosition(A.f, A.f);


and then define A as an int

But int nor float is not acceptable there so what should I put in SFML

Are you getting what is my question?

6
Graphics / Random function updated to Co-ordinates
« on: May 30, 2010, 01:56:24 pm »
I have a tiny question

I am making a snake Game  :P

And My snake is ready and moving very good

But now I have A very big question How can I generate apples or dots randomly any where

I tried many things I even tried some old c++ tricks
Like if defined position of a sprite is
Code: [Select]
Sprite.SetPosition(200.f, 100.f);

And I want to set in any where

So I was tring put

Code: [Select]
Sprite.SetPosition(A.f, A.f);

and then define A as an int

after that the random function of SFML given in tutorials so that there will be a random number at point of A

Well my logic was a bit right But I saw that , the program of sprite dosnt accept anything like int or anything it only accepts class/struct/union

So now my big question is how to get that random value can anybody please help?

7
Graphics / SFML sprits and images
« on: May 30, 2010, 11:34:12 am »
Well I found a solution my self But I would like to know is it correct

Projects built on a software-mounted drive complain about a missing MSVCR90D.dll. The problem goes away if you turn off incremental linking (and rebuild all, of course).

(Project properties... Linker... General... Enable Incremental Linking: No).

Is it correct

8
Graphics / SFML sprits and images
« on: May 30, 2010, 09:36:29 am »
Well sorry for again disturbing u people but I wanted to stay the colors same so I just removed
   
Code: [Select]
Sprite.SetColor(sf::Color(0, 255, 255, 128));

after that I rebuild all No error found

But while debugging it gave me error of

MSVCP90D.dll

It was written " this application has failed to start because MSVBP90D.dll was not found. Re-installing the application may fix this problem."

But when I put the

 
Code: [Select]
Sprite.SetColor(sf::Color(0, 255, 255, 128));

Back I got The output again

Why this MSBCP90D.dll error is coming

SORRY FOR DISTURBING U PEOPLE AGAIN AND AGAIN

but please answer this question

 :P

9
Graphics / SFML sprits and images
« on: May 30, 2010, 09:28:30 am »
Quote
You still have a lot to learn :p


You are absolutely right  :oops:

But now I my sprit is working

Thank you atlast now I can move further in My tutorials

I am so happy  :D  :D

10
Graphics / SFML sprits and images
« on: May 29, 2010, 07:04:07 pm »
But my rendering a window program was running without moving any dll . with same configuration And now the same program is also not running  :?:

Well But Now I moved the DLL as you told now the Errors are gone

Thank you for that

But now the previous error is back

The sprit window just flashes

http://www.screencast.com/t/YzZlOTM3

Watch the video I have also shown By debugging 3 times

The out put just flashes?  :?

11
Graphics / SFML sprits and images
« on: May 29, 2010, 05:25:49 pm »
The most I can explain about this new error is by video

And this New error is not giving me to compile anykind of thing actually


http://www.screencast.com/t/M2ZlZDJiMT

Please see this video made by me

12
General discussions / SFML and c++ or sfml only
« on: May 29, 2010, 09:26:49 am »
Ok Ok I got all my answers Thank you all of you

Be cool , sorry for nonsense questions

read u r pm please

thanks

13
Graphics / SFML sprits and images
« on: May 29, 2010, 07:21:43 am »
Answering all questions in line

U was never rude I was just trying to tell that when people are rude i get frustrated and write anything :oops:  , and i am really sorry for that

I am linking
Code: [Select]
sfml-system.lib
sfml-window.lib
sfml-graphics.lib


Even tried to add -s -d and everything and I am compiling static not dynamic
So no problem of that

About Flash
I mean when I try to debug Your sample program provided at bottom of page

The out put just blinks

U know like in C++

when we write a cout program to show something on screen and

If we dont write
cin.ignore
cin.get

How the screen blinks It doesn't hold the output window

Its something like that

One more new Problem

some times when I try to revise like opening a window program which was done my me yesterday

It gives me error of window.dll It says "Window.dll not found please re-install again and retry " something like that

and another time it works perfectly, Isn't it weird

Some times when I try rendering a widow

It gives me error of graphic.dll same error provided up

And again when i try it works  :?:

This thing is not only with me

try searching on google I found many other programming forums where people are asking about these kinds of error.

Last thing

I am not Big in knowledge as you so I have to please you dont hesitate  in it   :)

So can you please answer my questions.  :D

14
General discussions / SFML and c++ or sfml only
« on: May 29, 2010, 07:04:37 am »
Well I am so sorry to replay in harsh words

I was very excited to learn something new. I mean after learning c++ for a whole year without any other language or subject. It was very deep study

We even studied a graphic library provided by borland c++ 3.0 . It is retro or outdated stuff And it does provide graphics in console so , I don't know that you was know this or not because our professor told us that It is a really OLD and ANTIC Thing Which was like a Epic fail. It was used in some old dos programs but Because of its large bugs and And crashes it was closed

The header to be included was something like <graphics.h> And we have to write draw a yellow line (x , y) and many more weird things

So my main point was/is I learned c++ a whole year( And I know it is not complete , As it is changing continuously) and I know that It doesn't support any kind of GUI

But Because I don't know what library is ( I was only knowing that this SFML is written in c++ Read in Wikipedia =p)

 I was trying to ask that  Like if I want to write something like a small game say snake  in Visual C++ 2008 compiler (and because I have not used any library's yet ) So does it also need to be programmed by c++ or only this library is enough like that

But now as u told me that C++ only provide console programming and not graphics Hence I think it is not to be used. And only SFML will do work

And these all things are for fun as My vacation is running And I really want to do some thing graphical before my next year starts  :D

15
Graphics / SFML sprits and images
« on: May 28, 2010, 07:32:08 pm »
Well I am sorry I don't know how much c++ is I am doing only c++ for a year so i thought it is  done

Well but I am doing this sfml for fun

sorry for silly spirit thing and I am not French,German or English  :oops:

I just want to make simple thing out of it before my vacation ends

And when some one answers really rudely i get frustrated


So to the main question

Sprite is not actually showing any kind of error when I try to debug it it just flashes. Nothing happens , I am talking about the file provided at the bottom of the page, I downloaded it and tried to debug it and out put was a flash

Another thing I found

Some times when I try to compile same old program like opening window or creating shapes
Which actually worked before

when i try them again

they some times give me error of graphics.dll not found or window.dll not found and most times they not run

Weird

I have linked it correctly even checked thrice.

I am using SFML 1.6 I guess it is updated version and Visual C++ compler

Can you please give me answers?

Pages: [1] 2
anything