Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
B

Baling

@Baling
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Draw text without HDC, possible?
    B Baling

    Alan, thanks for the solution. So it goes like this: SrcDC --> DestDC --> DestDC.DrawText() --> pDC->BitBlt(DestDC) But usin' this approach, the final stage will involve the transferin' of the whole DestDC to pDC, right? pDC->BitBlt(..., &DestDC, ..., SRCCOPY); This will be heavy, because the interface redraws itself quite frequently (i.e. mouse movements makes the button change background, and stuff like that). I know InvalidateRect, but my bitmap class doesn't handle that, it will still draw the whole background all over again. And I'm takin' over the whole dialog's paintin'. That means the background will even go up to the screen size, which might be 1024x768! ;P (The whole window will repain, when resized, even InvalidateRect won't help in this case.) I've tried that approach, but seems slow, maybe I should use InvalidateRect whenever possible. Thanks again for your solution man ;) Me, Baling.

    C / C++ / MFC help graphics adobe question

  • Draw text without HDC, possible?
    B Baling

    Yo guys, I got a lit' problem here with the text drawin', hope y'all can help me out. ;) I've made myself a bitmap class, it can load bitmaps, it can manipulate bitmaps, and things like that, without touchin' HDC. Alright? So I'll be touchin' HDC only at the final stage, that's when I draw out the bitmap to the screen. So the problem now is, I can't draw text onto my bitmap class, before it goes out to the HDC. That means, I have a bitmap, I draw it out to the HDC, THEN only I'm able to draw text with HDC. This causes the text to flicker EVERYTIME when I refresh the bitmap. Just wonderin', if there's any ways to draw those texts, onto the bitmap (without touchin' HDC) before output to the screen (HDC)? I believe there is, like in Flash, I think they use their own bitmap manipulation classes, and draw text on those bitmaps, and FINALLY output the result to the HDC. Hey, thanks dude for your time, hope y'all can help me out ;) Zee ya!! Me, Baling.

    C / C++ / MFC help graphics adobe question

  • iThis's gonna kill the server!!
    B Baling

    I always think that there might be a simpler solution to my current problem. OK guys, here's how it goes: A RTS game (e.g. Starcraft, Red Alert, etc) will have many of those small units walking around on the map. OK, so now I want to make a game that each human player, will represent ONE unit on the map. That means, you log on to the server, you play as ONE SINGLE unit. If you die, the battle still go on. You gotta join the on-going battle again later. Allright? So that's simple right? But when I consider the traffic over the server side, there's this BIG problem: Imagine there are 1000 players log on to play in a game, if there's a need to synchronize, one player will send out a message package to the server, and the server will in turn forward the messages to all the other players. In the worst case, 1000 players will each send out a package, and the server will receive 1000 message packages from all the players, and if it wants to forward them, that will be 1,000,000 message packages on the server side. Try to consider a package of few bytes, will easily result in few megabytes of data flow on the server's line!! (Note that this is only for a single message package!!) Oh Gosh!! That's gonna kill the server!! So my friend, do you have any idea as how to address this serious problem? Thanks a lot for helping me, this little poor guy. haha!!

    C / C++ / MFC game-dev sysadmin help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups