computerphysicslab

Member
  • Content count

    17
  • Joined

  • Last visited

Community Reputation

121 Neutral

About computerphysicslab

  • Rank
    Member
  1. Fast BitBlits. Which library to use?

    Yes, it is C++ my language. I will give a try to SFML. Thanks for the info.
  2. Fast BitBlits. Which library to use?

    Oh, that is great! Thanks
  3. Hi all, the 2D game I am currently developing uses a lot of raster bitmaps, some of the very big. It is based on a scrolling window that shows a landmark in the background. The background must scroll too. So I need a fast way to refresh the background in every frame. Is it advisable to use some kind of BitBlit function to draw the background every frame? Is there any way faster to do this kind of panning of the screen? I have been googling searching for graphic libraries that let me do that fast. The game is meant to run under Windows. I have heard that DirectX could accelerate the BitBlit function by hardware, and even will let me rotate easily the other raster graphics of the game. Is that correct? Are there any better alternatives? Thanks in advance.
  4. Landscape, scroll and collision detection

    Thanks. I find it easier the tile based map. I find some problems about the polygonal way. The idea is the landscape is big, around 10 screens of with from side to side. How am I going to manage a so big polygon? Using maybe some kind of editor that lets me to move every corner of the polygon from one place to another until getting the desired landscape? I guess that the polygon would be mainly like a big rectangle, but adding small triangles over the top side. So, the top side would be the floor. Is that correct? In that case, it would be like having just a set of triangles in several layers, each above others, until form like a big irregular star. I find another problem in both schemes, that the resulting surface is not smooth because of the corners. Probably I would like some areas to be smooth, like curves. Is there any way to smooth the tiles when joining, or the triagulum's corners? Thanks again.
  5. Hi, all, I am trying to design a 2D game that needs the screen to scroll from left to right and right to left according to the character movements. I want the floor to be a wrinkled surface with small mountains and cliffs, hollows, etc. What is the easiest way to create such a landscape and use it within a game? Which file format would be the best for storing this kind of maps/surfaces? Is it easy to implement collision detection between the character and the floor/landscape? Thanks in advance. Any hint would be appreciated.
  6. Play wav sound in Dev-C++ for Win32

    Thanks everybody. Actually I am thinking in getting into Visual Studio very soon and left Dev-C++. Regards.
  7. Play wav sound in Dev-C++ for Win32

    The same way as you may develop a graphical Win32 application with Dev-C++ just using GDI calls instead of DirectX or other libraries/engines, is it possible to play a wav sound file avoiding DirectSound/DirectX? Thanks in advance!
  8. Your favourite game?

    For me, Urban Terror, a free multiplayer first person shooter, formerly based on Quake 3 Arena.
  9. Looking for opinions and help

    Thanks for placing this message where it matches better. By the way, the game can be downloaded from here: CityUnderAttack.rar or here if you haven't a rar extractor: CityUnderAttack.exe Thanks.
  10. Looking for opinions and help

    Currently I am working on a new game called "City Under Attack", very simple idea and implementation, extremely poor bitmaps (art is not my skill), but it is "runnable". Developed in C with Dev-C++. Here it is a new gameplay video I have just uploaded. Youtube City Under Attack gameplay [looksaround] I would like to hear critics, not necessarily good ones: I rather prefer sincere opinions. Thanks.
  11. Changing icon in Win32

    All of your hints have been very useful to me. I conclude that using a resource editor is probably the best solution because the icon is also visible in the corresponding exe file. I am trying to encapsulate every piece of code related to windows and graphics into a kind of library (not dll) that is compiled apart. This way, I can use this library in every one of my projects and avoid having an exe and a dll as the distribution. This way, only exe file is present. This is important for me. But I have a problem here. As the graphics/window library is pre-compiled, I cannot use a resource file because the icon would change from one project to another one. And a resource must be compiled inside the windows library for the corresponding references. Probably there is some kind of solution, but I think I going to accept loosing the exe file icon in the windows explorer. My current projects are been developed under Dev-C++ and using a graphic library similar to SDL but greatly reduced and not dynamically linked, producing simple 2D graphics and bitmaps. Probably, my future is jumping to Visual Studio and DirectX, so all these problems will disappear, hopefully. Nevertheless, I am curious about SDL library users are also suffering the problem of a lack of icon at their resulting executables ... Thanks everybody.
  12. Changing icon in Win32

    Thanks a lot to everybody here. Finally my application shows the icon I wanted. This is the final snippet of code I had to add to the application to get the icon replaced by another one, here: HICON hIcon = (HICON)LoadImage(NULL, "Setup.ico", IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE); SendMessage( hwnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon ); SendMessage( hwnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon ); It works great. Thanks a lot. This GameDev Forums rock! Congratulations!
  13. Changing icon in Win32

    Thanks. I have added this code to my source: (HICON)LoadImage(NULL, "Setup.ico", IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE); But the icon of the window doesn't change. How do I tell the window to use that icon once loaded ? Thanks.
  14. Changing icon in Win32

    Thanks for your replies. I am using Dev C++ Bloodshed. Until now I have been able to avoid the resource management system of the compiler, because I would like it to be as much portable as possible. I mean, I would like to get my code for Dev-C++ and compile it directly under Visual C, for example, not changing anything ... I don't know if that is possible ... Once the windows is created I have tried to do: SetClassLong(hwnd, GCL_HICON, (LONG)LoadIcon(hThisInstance, "Setup.ico")); and SendMessage(hwnd, WM_SETICON, ICON_BIG, LoadIcon(hThisInstance, "Setup.ico")); unsuccessfully. I have also tried using "ico.bmp" but again unsuccessfully. Probably there is an easy way to do this. Should I give a try to the resource manager? What about portability issues then? I need advice here ... Thanks a lot.
  15. Changing icon in Win32

    Hi, I am trying to change my windows application icon using this code: wincl.hIcon = LoadIcon(hti, "ico.bmp"); But it doesn't work. "ico.bmp" es a 16x16x16 bitmap Probably I cannot put there directly the path of the image. What should I do? Thanks in advance for any hint ...