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 - EGYPTIAN CODER

Pages: [1] 2 3
1
General / Re: relative transforms don't work
« on: June 30, 2017, 11:25:39 am »
Fired from what?
You are aware that everyone is helping on out of their own feee will and their own free time?! Nobody is employed and you certainly have no right to feel entitled in receiving the help right the second you ask a question.
Most people who are active in the IRC channel are from west Europe so if you ask a question in the middle of the night, chances are that most are currently sleeping.
I totally agree I know that very well
I just wanted  to say a joke and I  really sorry, I didn't  mean to harm anyone in this forum
again  :-[

2
General / Re: relative transforms don't work
« on: June 30, 2017, 11:04:06 am »
I am just joking
they indeed help me alot

3
General / Re: relative transforms don't work
« on: June 30, 2017, 10:01:29 am »
the  problem is solved
in online chat I tried to solve it twice and some of them just say we are sleeping
those people should be fired

4
General / Re: relative transforms don't work
« on: June 30, 2017, 08:54:39 am »
with the code above I expect
this

5
General / Re: relative transforms don't work
« on: June 30, 2017, 12:48:51 am »
why no one answer the question is simple

6
General / relative transforms don't work
« on: June 28, 2017, 07:41:34 pm »
hello every one
I want to create class cannon which is a class to simulate a real cannon
the cannon is represented by a rectangle shape
I want this rectangle to always work in relative transforms
the owner of the cannon must pass it's sf::transformable part of it in the constructor
and in the class i keep a reference to this sf::transformable
i think this should work but it is not
here a small program that do this ((not the real one the real one is a failure )) and it's  not working as expected
void main(){
        sf::RenderWindow window (sf::VideoMode(400,400),"cannon test 1");

        sf::RectangleShape ret(sf::Vector2f(30,30));
        ret.setPosition(200,200);
        sf::CircleShape circle(30);
        circle.setOrigin(30,30);
        circle.setPosition(0,0);
        sf::Transformable &ref = ret;
        while(true)
        {
                sf::Event event;
                while(window.pollEvent(event)){}
                sf::Transform tra =sf::Transform::Identity ;
                tra.combine(ref.getTransform());
                tra.combine(circle.getTransform());
                window.clear();
                window.draw(ret);
                window.draw(circle,tra);
                window.display();
        }
}
 
here the result

7
SFML projects / Re: Tower Defence
« on: May 14, 2017, 10:25:50 pm »
how long does it takes to reach to your level

8
SFML projects / Actions Reactions Engine
« on: May 07, 2017, 10:48:05 pm »
hello every one ;
my first project is done in sfml  ,and I would like everyone in this forim to see it   

the project is   
1- simple editor  : it just allow you to draw rectangle shapes and modify their position and size easily
                             and finally storing them (their attributes not rectangle shapes )

2-game engine   : in conclusion it does two things   the first is (collision detection) and second is (calling reactions) the reactions are lambda functions that have two parameters represent the colliders

3-simple game  : it uses the game engine and the editor to build a very simple game
(( a rectangle that is being controlled by the player and is jumps on rectangles))  ::) ::) ::)


and here my main  function to keep you patience ;D ;D
int main(){
        sf::RenderWindow window(sf::VideoMode(1200,700),"main");
       
        sf::View view;
        sf::Clock clock;
        sf::Time timer;

        const int level_blocks=16;

        block level[level_blocks];


       
       
        player me;
       

        engine eng;
       
        for(int w=0; w<level_blocks ; w++)
                eng.come_in_objects(level[w].let_me_in());


        eng.come_in_objects(me.let_me_in());
       
       

       
       


        while(window.isOpen()){


                timer= clock.restart();

        //here we apply the gravity
        me.default_actions( timer );
       

        //handling input
        sf::Event event;
        while(window.pollEvent(event)){
        me.input_handlig(event);

        if(event.type==sf::Event::Closed)
                window.close();
        }
         


        //updating the collision sheets
        me.update_sheet();
        for(int w=0; w<level_blocks ; w++)
                level[w].update_sheet();


        //collision detection and calling reactions
        eng.body_body_collision_checking();  //the holy event



       


       
        me.update( timer );//apply the final velocity

        window.clear();


        //applying the view
        view.setCenter(me.get_point());

        view.setSize(window.getDefaultView().getSize());


        window.setView(view);



        window.draw(me);
        for(int w=0; w<level_blocks ; w++)
                window.draw(level[w]);
       
        window.display();

        }


}
 
 

the editor


the game

the red rectangle is the player


i think that there is  a good ideas that can be applied to abigger projects  8) 8) 8)

9
General / Re: sfml compiling in microsoft community
« on: May 03, 2017, 05:09:45 pm »
running VS as admin solved the problem
thanks for the support

10
General / Re: sfml compiling in microsoft community
« on: May 03, 2017, 04:44:52 pm »
I get this


1>------ Build started: Project: INSTALL, Configuration: Debug Win32 ------
1>-- Install configuration: "Debug"
1>-- Installing: C:/Program Files/SFML/./include
1>CMake Error at cmake_install.cmake:31 (file):
1>  file INSTALL cannot make directory "C:/Program Files/SFML/./include": No
1>  such file or directory
1>
1>
1>D:\microsoft visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "setlocal
1>D:\microsoft visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: C:\Users\asus\AppData\Local\Temp\Rar"$"EXa0.647\cmake-3.8.1-win32-x86\bin\cmake.exe -DBUILD_TYPE=Debug -P cmake_install.cmake
1>D:\microsoft visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
1>D:\microsoft visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd
1>D:\microsoft visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
1>D:\microsoft visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmErrorLevel
1>D:\microsoft visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: exit /b %1
1>D:\microsoft visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmDone
1>D:\microsoft visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
1>D:\microsoft visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 1.
1>Done building project "INSTALL.vcxproj" -- FAILED.
2>------ Skipped Deploy: Project: ZERO_CHECK, Configuration: Debug Win32 ------
2>Project not selected to build for this solution configuration
3>------ Skipped Deploy: Project: sfml-system, Configuration: Debug Win32 ------
3>Project not selected to build for this solution configuration
4>------ Skipped Deploy: Project: sfml-main, Configuration: Debug Win32 ------
4>Project not selected to build for this solution configuration
5>------ Skipped Deploy: Project: sfml-network, Configuration: Debug Win32 ------
5>Project not selected to build for this solution configuration
6>------ Skipped Deploy: Project: sfml-window, Configuration: Debug Win32 ------
6>Project not selected to build for this solution configuration
7>------ Skipped Deploy: Project: sfml-audio, Configuration: Debug Win32 ------
7>Project not selected to build for this solution configuration
8>------ Skipped Deploy: Project: sfml-graphics, Configuration: Debug Win32 ------
8>Project not selected to build for this solution configuration
========== Build: 0 succeeded, 1 failed, 8 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 7 skipped ==========

 

11
General / sfml compiling in microsoft community
« on: May 03, 2017, 03:16:52 pm »
hello every one ;
I have installed microsoft visual c++ 2017 community but as you know there is no sfml package ready for it ;

step by step I have followed the tutorial about cmake
but now I am stuck in this stage


12
General / drawing cosine pixel by pixel
« on: May 03, 2017, 12:01:40 am »
hello every one ;
I want to draw cosine function or any function
and what i do is setting a rectangle shape size to 1 (to be a pixel )

but I think this is not the best way to do it or I am wrong because it was slow not much but it was slow

I draw the cosine function  for a determined range;

well, I i know that if i just did one drawing to the function and one display  things will be fine  8),but I want
to handle input that affect the function graph so one drawing and displaying is bad in this situation :(;


13
General / Re: linking sfml again again again
« on: April 25, 2017, 01:49:01 pm »
now every thing is just fine it turned out that I forgot to delete the whole original project files
thanks to reply on such a trivial questions and indeed it is

14
General / Re: linking sfml again again again
« on: April 25, 2017, 01:38:50 pm »
microsoft visual c++ 2010 express

I have tried to copy a project folder
but it says unresolved external symbol and it mentions the original project obj files

15
General / Re: linking sfml again again again
« on: April 25, 2017, 12:08:08 pm »
it's not projects but just ideas that I don't want to mix them with other things

Pages: [1] 2 3
anything