Jump to content
  • Advertisement

ursus

Member
  • Content Count

    209
  • Joined

  • Last visited

Everything posted by ursus

  1. ursus

    Deeper Dungeons

    Good job! Very well done! No problems/bugs found. Looks very polished. I cannot resist the feeling that your game is only a beginning of some larger project?
  2. I'm sure there are options here but from what I can see almost all the games use some kind of the grid representation. Squares are easy to manage and implement. The point is to make the grids invisible and an illusion of smooth movement I'd think
  3. ursus

    3d game

    Cool little game. I've seen your previous release. It's good to see you progressing! The game is kind of similar to what I did (can be found at my personal web page) but I didn't implement any models. Good work!
  4. Hmm, interesting thoughts you guys brought up here. I am 30 years old and I'm also asking myself similar questions after around 5 simple, little games completed. It took me around 3 years of evenings and weekends programming, learning, reading and posting forums, searching the internet, experimenting and so on. I've been fascinated with the computer games since I was 8 (ZX Spectrum times). Many things have changed since then. 20 years ago computers were for the elite and although games lacked the graphics and the sound they often were a lot of fun to play. Nowadays it seems that people don't pay too much attention to the quality of the game itself. People want stunning graphics and instant excitement. Professional game companies are aware of this and they make the games to make the majority of people happy and gain profits. I agree a solo game developer (or even a small team) has little chance to compete on the field. Programming is hard and it often takes a lot of time to implement a simple looking trick in your game. I agree it takes months to make an uncomplicated game and once done an average player would probably play it once or twice only. When I develop games I'm usually sick of it before I'm half done with it. On the top of all that: it's extremely hard to find an artist who would like to help programmers with their games. Yet another thing that may draw away from the game development is the fact that the game programming skills have hardly of any use in other commercial jobs. In addition, a position in a company that develops the entertainment software usually pays less than somewhere else in the IT. Why make games then? I'm not sure – perhaps we can make games that are not easily available on the current commercial market? I know there are a lot of people out there with their specific game requirements. Perhaps we should go out to them? This way or another, whatever path you take – have fun!
  5. What I implemented in my latest project (and what is done in most similar games from what I know) is some (most popular A*) path finding algorithm. Once the path to the destination is found I made my sprite move by 4 pixels every fame (that lasts around 0.1 sec) from one square to another (according to the path found) till it reaches its goal. Also, my sprite image changes every frame (legs and arms are moving) for even better movement animation look. This takes quite a bit time to organize and implement things but the final effects look good.
  6. Hi Guys, I was wondering if it's possible to achieve 'screen fading to black' effect using pure Win32, without any external libraries. The only thing that comes to my mind for the moment would be to run through every pixel on the screen and decrease its RGB values but this sounds like time and resources consuming process. I'd appreciate any suggestions. Many thanks
  7. Thank you very much for your answers. This is getting even more interesting! I knew pros have some aces up their sleeves
  8. Quote:Original post by Daniel Miller Couldn't you draw a black rectangle on the screen with decreasing transparency? I'm not sure how. This is why I asked in the first place :)
  9. GetDIBits and SetDIBits sound promissing. Thank you guys for help!
  10. Gentlemen, Using conventional C I've made several simple games so far. My first projects were not sophisticated so C did relatively well on that as I was working on my own and didn't really require reusability of the code I've written as it was rather game specific. With time when my sources grew larger and larger I've realized it's getting harder and harder to manage my code. Moreover, pieces of software could be successfully reused in other applications. I've managed to cope with that by dividing my code. I've seen, heard and read a lot about OO programming and all the benefits it brings to programming. No tutorial has been able to convince me to put a little bit more effort to switch to OO programming, however. In fact they actually seem to scare me away from it the more I learned about it. Here are my questions to those more experienced programmers: 1. Is there much point in working in OO environment providing that I'm a solo programmer developing simple games (I know with time I'll probably go for something more advanced)? 2.Do you know of any 'friendly' OO tutorial(s) that would clearly tell me that it is what I really need? Many thanks in advance
  11. Thanks guys for all your replies! Greatly appreciated
  12. Hi, I was trying to work out the A* alghoritm not too long ago myself. Please check this thread: http://www.gamedev.net/community/forums/topic.asp?topic_id=420517 At my last post I attached something I invented that day. It's far from perfect as it lacks saving final path, 'no path vavailable' check, no boundaries check etc. but it is working fine. Hope that helps a bit
  13. Hello All A simple question I believe. I need to calculate time spent on some activity. Let's say the activity started at 2 o'clock PM and finished at 4 o'clock PM. This case is easy: total_time = end_time start_time 4-2=2 That formula doesn't work for an example where the activity started at 10 o'clock AM and finished at 2 PM 2-10=-8 (rubish!) I remember this is some basic exercise we had at the university but I just cannot recall the solution. I'd greatly appreciate any hints. Many thanks
  14. ursus

    Total hours spent

    Thank you all guys! I think Andrew's suggestion hits the spot
  15. ursus

    Total hours spent

    Guys, Thank you very much for your replies. First of all, please accept my apologies for placing this post on this forum. It was supposed to be in Math and Physics section. I put it here by mistake. Moderators, would you be so kind to move it to the appropriate forum? Secondly, using 24 hours clock will solve the problem to some extent only as we can have the case when the activity starts at 22:00 and finished at 2:00 Many thanks
  16. ursus

    two bitmap image into one

    There are quite a few of ways of doing this but let me try to explain things with some basic (but not necessarily simple) way of drawing a bitmap onto a screen or on another. To display image on the default rendering device (in most cases on your monitor): BitBlt(hdc,0,0,640,480,image_dc,0,0,SRCPAINT); The function above will display image (image_dc) starting at 0,0 (left upper corner) of the window, ending at 640,480 If we: BitBlt(hdc,50,50,150,150,image2_dc,0,0,SRCPAINT); we'd probably (depending on how we handle our window messages) delete the previous image and display the new one. The trick would be: BitBlt(image_dc,50,50,150,150,image2_dc,0,0,SRCCOPY); BitBlt(hdc,0,0,640,480,image_dc,0,0,SRCPAINT); to actually copy to contence of image2_dc to image_dc Hope this helps a bit
  17. Hi, I'm not sure of how much of help this would be: http://piotrb.phpnet.us/hedgemazeeng.html This is a little project of mine. It's not perfect and I still work on catching bugs but perhaps you'll find it useful somehow? Sorry for the slow site (non comercial, temproary hosting)
  18. ursus

    GTA sprites

    Hello All Several years ago google was full of graphics extracted from GTA. Now all appears to be gone somewhere. I was wondering if you knew some pleace where some of those 2D sprites can be obtained? I was also wondering if there are any tutorials/articles available on how to make those top down (zenith) sprites? Many thanks
  19. I had some kind of revelation LOL. I’ve pinpointed that spot covering a small detail of the whole A* idea. Every time I was choosing new square from the open list with its lowest F score I was choosing from only neighbor grids whereas all(!) squares should be considered. Below the code that works, it needs polishing but it works: void FindPath() { int cpX, cpY;// current (grid) X and Y position int goX, goY;// next grid X and Y position to be taken int lowest;// temproary lowest F cost int addG;// the G score to be added, can be: 10 or 14 cpX=startX; cpY=startY; // adding grids to the Open List: while (cpX!=destinationX || cpY!=destinationY) { lowest=10000;// for no let's assume the lowest F will never be bigger than 10000 int gX, gY;//grix X and Y (-1, 0, 1) for (gY=-1;gY<=1;gY++) { for (gX=-1;gX<=1;gX++) { if (TAKEN[cpX+gX][cpY+gY]==FALSE &&// checking if the curent grid is not occupied by another sprite CL[cpX+gX][cpY+gY]==FALSE)// checking if the curent grid is not in the Closed List { //determining the G score for diagonal or orthogonal move if (gX==-1) { if (gY==0) addG=10; else addG=14; } if (gX==0) { if (gY!=0) addG=10; } if (gX==1) { if (gY==0) addG=10; else addG=14; } //if that grid is already on the open list if (OL[cpX+gX][cpY+gY]==TRUE) { //check if G score is lower if we go through the current grid if (G[cpX][cpY]+addG<G[cpX+gX][cpY+gY]) { //changing parent parentX[cpX+gX][cpY+gY]=cpX; parentY[cpX+gX][cpY+gY]=cpY; //recalculating G, H, F G [cpX+gX][cpY+gY]=G[cpX][cpY]+addG;// G cost H [cpX+gX][cpY+gY]=10*(abs(destinationX-(cpX+gX))+abs(destinationY-(cpY+gY)));// H cost F [cpX+gX][cpY+gY]=G[cpX+gX][cpY+gY]+H[cpX+gX][cpY+gY];// F cost, F=G+H } } else { OL[cpX+gX][cpY+gY]=TRUE;// added to the Open List G [cpX+gX][cpY+gY]=G[cpX][cpY]+addG;// G cost H [cpX+gX][cpY+gY]=10*(abs(destinationX-(cpX+gX))+abs(destinationY-(cpY+gY)));// H cost F [cpX+gX][cpY+gY]=G[cpX+gX][cpY+gY]+H[cpX+gX][cpY+gY];// F cost, F=G+H //setting up parents parentX[cpX+gX][cpY+gY]=cpX; parentY[cpX+gX][cpY+gY]=cpY; } //below I determine the next grid we should go: // checking if a grid with the lower F cost was found if (F[cpX+gX][cpY+gY]<lowest) { lowest=F[cpX+gX][cpY+gY];// yes, it was found! goX=gX;// taking even better way goY=gY; } }// end of ifs } }// end of fors //adding the curent grid to the Closed List and removing it from the Open List CL[cpX][cpY]=TRUE; OL[cpX][cpY]=FALSE; //below we determine the next grid we should check: //loopp that will go through all squares and will pick the lowest F grid from the Open List int x,y; for (x=0;x<23;x++) { for (y=0;y<15;y++) { if (OL[x][y]==TRUE) { // checking if a grid with the lower F cost was found if (F[x][y]<lowest) { goX=x; goY=y; lowest=F[x][y]; } } } } //movig to the next grid depending on goX and goY cpX=goX; cpY=goY; }// end of while (cpX!=destinationX || cpY!=destinationY) } Thank you all for your patience.
  20. Hi, I've been working on the A* pathfinding algorithm for some time now and there is one thing I fail to understand. I've managed to implement the algorithm partially basing on the 'A* Pathfinding for Beginners' tutorial successfully calculating F, G and H scores. The problem appears when approaching to obstacles; they are always walked around using the latest lowest F score. Obviously the path often gets illogical this way. Let me show you on this example (the orange line is how 'my' pathfinding works): http://img149.imageshack.us/my.php?image=pathfindingfm2.png After analyzing the example program I've fond that somehow it finds more reasonable path. It looks to me like after each step the whole path made so far and examined if there is a better way to get to the current point. I'm not sure how to do it, however. I find very little information about it in the article. Perhaps I didn't give it enough though but I've been breaking my head over this for some time now so any hints and suggestions will be greatly appreciated. Thanks in advance [Edited by - ursus on November 11, 2006 6:45:37 AM]
  21. All, Once again I thank you very much for your help. The screen shots I've presented in my previous posts were taken from the properly working (I hope) tutorial example. I assume it calculates everything properly. I think Scorpie was most accurate in this case. My part of checking squares in the open list was messed up. After some corrections I managed to move one step forward but my implementation still calls for refinement. Let me present you my code (I try to keep it simple for now): void FindPath() { int cpX, cpY; // current (grid) X and Y position int goX, goY; // next grid X and Y position to be taken int lowest; // temproary lowest F cost int addG; // the G score to be added, can be: 10 or 14 cpX=startX; cpY=startY; // adding grids to the Open List: while (cpX!=destinationX || cpY!=destinationY) { lowest=10000; // for no let's assume the lowest F will never be bigger than 10000 int gX, gY; //grix X and Y (-1, 0, 1) for (gY=-1;gY<=1;gY++) { for (gX=-1;gX<=1;gX++) { if (TAKEN[cpX+gX][cpY+gY]==FALSE && // checking if the curent grid is not occupied by another sprite CL[cpX+gX][cpY+gY]==FALSE) // checking if the curent grid is not in the Closed List { //determining the G score for diagonal or orthogonal move if (gX==-1) { if (gY==0) addG=10; else addG=14; } if (gX==0) { if (gY==0) addG=14; else addG=10; } if (gX==1) { if (gY==0) addG=10; else addG=14; } //if that grid is already on the open list if (OL[cpX+gX][cpY+gY]==TRUE) { //check if G score is lower if we go through the current grid if (G[cpX][cpY]+addG<G[cpX+gX][cpY+gY]) { //changing parent parentX[cpX+gX][cpY+gY]=cpX; parentY[cpX+gX][cpY+gY]=cpY; //recalculating G, H, F G [cpX+gX][cpY+gY]=G[cpX][cpY]+addG;// G cost H [cpX+gX][cpY+gY]=10*(abs(destinationX-(cpX+gX))+abs(destinationY-(cpY+gY)));// H cost F [cpX+gX][cpY+gY]=G[cpX+gX][cpY+gY]+H[cpX+gX][cpY+gY];// F cost, F=G+H } } else { OL[cpX+gX][cpY+gY]=TRUE;// added to the Open List G [cpX+gX][cpY+gY]=G[cpX][cpY]+addG;// G cost H [cpX+gX][cpY+gY]=10*(abs(destinationX-(cpX+gX))+abs(destinationY-(cpY+gY)));// H cost F [cpX+gX][cpY+gY]=G[cpX+gX][cpY+gY]+H[cpX+gX][cpY+gY];// F cost, F=G+H //setting up parents parentX[cpX+gX][cpY+gY]=cpX; parentY[cpX+gX][cpY+gY]=cpY; } //below I determine the next grid we should go: // checking if a grid with the lower F cost was found if (F[cpX+gX][cpY+gY]<lowest) { lowest=F[cpX+gX][cpY+gY];// yes, it was found! goX=gX;// taking even better way goY=gY; } }// end of ifs } }// end of fors //adding the curent grid to the Closed List CL[cpX][cpY]=TRUE; //movig to the next grid depending on goX and goY cpX+=goX; cpY+=goY; }//end of while (cpX!=destinationX || cpY!=destinationY) } The result of the above is this: http://img123.imageshack.us/img123/6299/pathfinding2aj9.png The ideal path should be (as per the tutorial): http://img130.imageshack.us/img130/9662/pathfinding3si7.png Guys, I admit I'm not the brightest star, please help me a bit more here. Many thanks
  22. Guys, Thank you all for your answers and sorry for staying quiet for so long - my PC broke and it took me a while to get a new one. Perhaps my description in my first post wasn't extremely fortunate. Let me show you one more example: http://img134.imageshack.us/my.php?image=pathfinding2me3.jpg In this case the algorithm follows the steps till it 'hits' the wall made of 1 square. In my implementation it'd go around the obstacle. It'd seem to me far more logical to use the other path right from the beginning (less moves and score to get there). This happens when using the app from the tutorial (as per the print screen). I wonder how this is achieved. I can see the blue squares (Closed List) initially goes toward the obstacle but eventually a new path is determined. Many thanks in advance.
  23. Wonderful game! My favorite type. They don't make them any more. I didn't get much chance to play a lot of your game (and I'll definitely spend more time on it) but this is what I can say for now: Thumb up: - The game itself. True, it may look like a clone of other games of this kind but at least it's not yet another failed MMORPG project or 'my first game' pong remake (no offence meant!). - Game is polished and all seems to be working perfectly. - Great look and feel of the interface. - Relatively good (intuitive) user interface. - Variety of units. Thumb down: - Game graphics could use some artistic touch. But having said that I must agree it's very difficult to find any graphics artist (especially for this sort of games) Anyway, very good job!
  24. ursus

    Pixel Perfect 2D Collisions....

    Hi Perhaps this article may be of interest to you: http://www.gamedev.net/reference/articles/article754.asp Although after I'd read it I managed to understand the idea I've never managed to implement it myself (perhaps I didn't spend enough time on it) or find some good examples of implementation. Actually, the whole section of articles on the Collision Detection would be worth reading. I'd also agree with lc_overlord. Cheat as much as you can saving lots of developement time. Players would not notice it in the heat of battle and surely won't appreciate the effort in most cases. :)
  25. ursus

    Swarm Racer

    Excellent and beautiful game! Very well done! Thanks for sharing it with us
  • 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!