Jump to content
  • Advertisement

Ahmed Saleh Mohamed

  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About Ahmed Saleh Mohamed

  • Rank
  1. Ahmed Saleh Mohamed

    New work problems

    The working hours are normally I do from 8:10 and some days 9:00 , he commented about  that, that I do 8:10, 8:20.. I didn't know what did he want ? do you want more than this ?! is this what he meant by pushing more ??
  2. Ahmed Saleh Mohamed

    New work problems

    RivieraKid, but that was very depressing for me : ( Supervga, I'm really worried. I declare that I have accepted a lower salary so that I can get the work permit, but that's very bad if he is using me in that way. I thought european will be different..
  3. Ahmed Saleh Mohamed

    New work problems

    You are correct, its a buse of cheap labor. He knows the my soul is in his hands to renew my work permit, that's why he is doing that to me.
  4. Ahmed Saleh Mohamed

    New work problems

    Hi All,   I'm Egyptian and currently working in Austria under a work permit which is restricted for 4 months, which is the length of the contract, if they are happy with me they will prolong it. I have just started the job 3 weeks ago, and was doing good some kind of electronic circuit design and embedded software. The direct manager was happy, and told me wow so fast for some task, and some very good words.   I had meeting with the ceo two days ago, and he told my how do you like the work ? I told him its good, I like the manager, the enviroment,..etc. Then he said you have to push your self more, you are just working by 70-80% percentage, I was shocked, and very sad by these words, he said also I know that you have a lot of knowledge, I also asked the direct manager to give you lots of work packages!!!   I'm really sad and that would affect my living in Austria and dont want to come back to Egypt ; (  
  5. Ahmed Saleh Mohamed

    Asteroids clone demo

    @LennyLen I know all the mentioned stuff, I'm just curios about the collision between the bullets and the asteroids only and nothing more. I'm using a circle to circle collision, and I calculated the maximum radius of the asteroid and the center of it and made a circle out of it. Can you explain what do you mean by detection seemed off ? and what do you meen by moving off the screen ?
  6. Ahmed Saleh Mohamed

    Asteroids clone demo

    I attached it sorry. I feel there are problems but I don't know how to solve them exactly. A check from experts won't hurt
  7. Ahmed Saleh Mohamed

    Asteroids clone demo

    Hi All, would you please check that demo and check those things ? 1. Collision detection, is it working proper or not ? and how to fix it ? 2. aspect ratio ..etc
  8. Ahmed Saleh Mohamed

    Correlating between Cluster and Points

    I'm clustering a set of points using DBScan algorithm. I have a set of IDs for a set of points and I have a set of clusters, where each cluster has a set of points. I would like to correlate between the clusters and the points ID. For example I have a set of ids { 1,2,3,4}, Now if I have two cluster and two clusters has two points, then those two points of the first cluster should have the ids 1,2 and for the second one 3,4. Also If I have 4 clusters and each cluster has one point, then the Ids of the points should be 1,2,3, and 4. Furthermore, If I have two clusters but one cluster has 3 points and the other one has one point, then the Ids of the points should be 1,2,3 for the first cluster's points and for the second cluster's point is 4. I tried to code it, but I'm stopped at calculating the formula to achieve that scenario. std::vector<int>_IDs; // for each cluster for( int j = 0; j<clusters.size();j++ ) { // for each point in that cluster for ( int i=0; i < clusters[j].m_Points.size(); i++) { // assign its ID from the _IDs array based and save it in Clusters Vector clusters[j].m_IDs.push_back(_IDs[j+ i*clusters[j].m_Points.size()]); } }
  9. Ahmed Saleh Mohamed

    Recommendation for Improving Programming Skills

    Thanks so much, waiting more for valued inputs!.
  10. Hi All, I'm 25, I know C++ syntax since 9 years.. but It seems that I have copied so much code, and I didn't learn that much and didn't solve a lot of algorithms in my own. Currently I'm working for computer vision programmer as a junior and I have difficulity of doing algorithms like blob tracking or object tracking, writing algorithms like KNN, Quadtree,..etc. I don't know what to do, or what to improve, I tried to write asteriods game, I have finished it, and here you can watch it What should I do more to enhance my skills ?
  11. Ahmed Saleh Mohamed

    OpenGL Coordinate System

    Hi All, How does Opengl coordinate system relate to texture coordinates ? what does affect quad and texutre coordinates calculations from the point of initilizing opengl ?
  12. I'm trying to render a hemisphere in opengl, the problem that the hemisphere isn't rendered at all, only part of it. I initialize it, then at each frame I draw it using the following code. I'm trying to use a VBO for drawing it. void Jellyfish::Init_HemiSphere(const float radius, const int segments ) { m_iSegements = segments; m_fVerts= new float[(segments+1)*2*3]; m_fNormals= new float[(segments+1)*2*3]; m_fTexCoords = new float[(segments+1)*2*2]; for( int j = 0; j < segments / 2; j++ ) { float theta1 = j * 2 * 3.14159f / segments - ( 3.14159f ); float theta2 = (j + 1) * 2 * 3.14159f / segments - ( 3.14159f ); for( int i = 0; i <= segments; i++ ) { Vec3f e, p; float theta3 = i * 2 * 3.14159f / segments; e.x = math<float>::cos( theta1 ) * math<float>::cos( theta3 ); e.y = math<float>::sin( theta1 ); e.z = math<float>::cos( theta1 ) * math<float>::sin( theta3 ); p = e * radius; m_fNormals[i*3*2+0] = e.x; m_fNormals[i*3*2+1] = e.y; m_fNormals[i*3*2+2] = e.z; m_fTexCoords[i*2*2+0] = 0.999f - i / (float)segments; m_fTexCoords[i*2*2+1] = 0.999f - 2 * j / (float)segments; m_fVerts[i*3*2+0] = p.x; m_fVerts[i*3*2+1] = p.y; m_fVerts[i*3*2+2] = p.z; e.x = math<float>::cos( theta2 ) * math<float>::cos( theta3 ); e.y = math<float>::sin( theta2 ); e.z = math<float>::cos( theta2 ) * math<float>::sin( theta3 ); p = e * radius; m_fNormals[i*3*2+3] = e.x; m_fNormals[i*3*2+4] = e.y; m_fNormals[i*3*2+5] = e.z; m_fTexCoords[i*2*2+2] = 0.999f - i / (float)segments; m_fTexCoords[i*2*2+3] = 0.999f - 2 * ( j + 1 ) / (float)segments; m_fVerts[i*3*2+3] = p.x; m_fVerts[i*3*2+4] = p.y; m_fVerts[i*3*2+5] = p.z; } } glGenBuffers(3,&SVboId[0]); //Vertex glBindBuffer(GL_ARRAY_BUFFER,SVboId[0]); glBufferData(GL_ARRAY_BUFFER,sizeof(m_fVerts), m_fVerts,GL_DYNAMIC_DRAW); //Normal glBindBuffer(GL_ARRAY_BUFFER,SVboId[1]); glBufferData(GL_ARRAY_BUFFER,sizeof(m_fNormals), m_fNormals,GL_DYNAMIC_DRAW); //Textures glBindBuffer(GL_ARRAY_BUFFER,SVboId[2]); glBufferData(GL_ARRAY_BUFFER,sizeof(m_fTexCoords), m_fTexCoords,GL_DYNAMIC_DRAW); } void Jellyfish::drawHemiSphere( ) { glEnableClientState( GL_VERTEX_ARRAY ); glBindBuffer(GL_ARRAY_BUFFER,SVboId[0]); glVertexPointer( 3, GL_FLOAT, 0, 0 ); for( int j = 0; j < m_iSegements / 2; j++ ) { glDrawArrays( GL_TRIANGLE_STRIP, 0, (m_iSegements + 1)*2 ); } glDisableClientState( GL_VERTEX_ARRAY ); glDisableClientState( GL_TEXTURE_COORD_ARRAY ); glDisableClientState( GL_NORMAL_ARRAY ); }
  13. Ahmed Saleh Mohamed

    applying spring equation

    Hi All, I have 5 nodes, which considers a snake. Basically, all the body 4 nodes follow the first node. I would like to update the nodes by applying spring equation between them. I have this code but don't know how to write the algorithm. void creature::update(float targetX, float targetY) { float forceX = (targetX - m_Nodes[4].x) * stiffness; float ax = forceX / mass; vx = damping * (vx + ax); m_Nodes[4].x += vx; float forceY = (targetY - m_Nodes[4].y) * stiffness; forceY += gravity; float ay = forceY / mass; vy = damping * (vy + ay); m_Nodes[4].y += vy; }
  14. Ahmed Saleh Mohamed

    drawing Tentacle

    Hi all, I would like to have insights and ideas on how to draw something like that here using opengl. http://www.openprocessing.org/sketch/8405
  15. Ahmed Saleh Mohamed

    solving intersected blobs

    I'm doing a blob tracking algorithm, and I have a problem. I'm having two lists of objects and blobs, where objects save the number of blobs that has been process every frame. When two blobs are merged, I check for that. I wanted to have a list of objects that save the total numbers of blobs even if the the blobs are merged together. The current problem is when two blobs merges, I can have a list of objects that have the previous number of separated blobs, that is ok, but when in the next frame the two merged blobs, gets separated, the code keeps adding a one object at time. void Tracker::ProcessObjects( ) { if(m_Objs.empty()) { for(std::list<Blob>::iterator iter = m_Blobs.begin(); iter!=m_Blobs.end(); iter++) { Obj * obj = new Obj(m_iTrackerId++, iter->m_Pos, 0); m_Objs.push_back(*obj); } } else { double x, y, xT, yT, dist; std::list<Blob>::iterator blob = m_Blobs.end(); for(std::list<Obj>::iterator iter = m_Objs.begin(); iter!=m_Objs.end(); iter++) { dist = 327680000; for(std::list<Blob>::iterator iter2 = m_Blobs.begin(); iter2!=m_Blobs.end(); iter2++) { double _dist = iter->m_Pos.distance(iter2->m_Pos); if(_dist<=200 && _dist<dist) // threshold hard coded, distance between obj and blob used for update! { blob = iter2; dist = _dist; } } if(blob != m_Blobs.end()) { blob->bUsed = true; // if this already true, indicator for a merge state, update obj to be merged state iter->m_Pos = blob->m_Pos; } else { iter->m_not_found++; } } for(std::list<Blob>::iterator iter = m_Blobs.begin(); iter!=m_Blobs.end(); iter++) { if(!iter->bUsed ) { Obj * obj = new Obj(m_iTrackerId++, iter->m_Pos, 0); m_Objs.push_back(*obj); } else { std::cout<<"do nothing"<<std::endl; } } }
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!