Jump to content
  • Advertisement

sdl

Member
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

102 Neutral

About sdl

  • Rank
    Member
  1. First off, Java is not a program, it's a language. Apples and Oranges here. Java is language, Visual Studio is an IDE. There is a Visual Studio for Basic, C#, C++, ... By 'putting them on your website' you want just to distribute your game or that is playable through a web browser?
  2. Your problem isn't the programming paradigm, it's plain application performance (your design). Simple question, each player got like 10000 items right? Do you need to allocate the entire 10000 items at the same time in memory for each player? Sounds like a 'no' to me. This kind of issue is up to your application to solve it, this is no matter of language or paradigm. There are multiple ways to handle this, as already mentioned in the topic. I also want to add it a consideration of using an game engine/framework if you are having a hard time with this issues. But I don't want to discouraging you, designing yourself is really rewarding.
  3. sdl

    Please help fund this game

    Hey, I don't want to let you down but... you got A LOT(A LOT, A LOT,...) to do in your game. Maybe asking for some help instead of money is a good start ;)
  4. Dofus is a good example of a professional flash mmo. And of course a Java applet is a great option, the must example is Runescape.
  5. sdl

    Linux game console project

    I remember a console called EVO, something like couple years ago. I don't know if EVO was successful, but looks like they are developing an EVO 2: http://store.envizionsinc.com/gamebox-console-powered-by-android-pre-order.html This is more a PC plugged in the TV with some games then a real game console. Doing a new game console is a risk business. Recently a brazilian game company called TecToy developed a console called Zeebo. And the Zeebo was really well done, there was a dashboard, some good games (of course really simple games), there was no CD's or cartridges was all through 3g network and you didn't have to pay for the 3g connection (only the game price), there was games made exclusively for Zeebo (developed with the influence of the local culture), all content was in brazilian portuguese. Zeebo used some cellphone OS from Qualcomm, wasn't linux. But I'm just using it to illustrate here. Zeebo was already in Brazil and Mexico and China would be the next one. The console was really well done, it had bugs (but who hasn't on released? hey xbox 360...) and the games were not fun like the big consoles, but, it was a really well done console. I don't know exactly the reason but TecToy are not producing any Zeebo consoles or content for it anymore. There are no new games and there are already a date to the service stop working, they are shutting down the whole thing. Developing a console to fight against the 3 big ones it's not a task for a small company (not even big, must be HUGE). Apple's console and Dreamcast 2 rumors comes to my mind, but I really doubt it that we gonna see another big one for some time.
  6. sdl

    SDL_Rect help

    This don't make any sense without a context. With which function you using the SDL_Rect structure? For example, in the SDL_BlitSurface function: int SDL_BlitSurface(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect); There is a 'source rect' and a 'destiny rect'. The source one indicates what portion (rectangle) of the source surface will be used, passing null sdl uses the entire source surface on the blit. This rectangle is defined by the x, y, w, h members of the SDL_Rect(x/y as top/left, w/h as bottom/right). The destiny one indicates only where the source surface will be blittled on the destiny one. The x and y members of the SDL_Rect indicates the location. This location is where the source surface starts, that is, indicates where the coordinate 0, 0 of the source portion will be on the destiny surface.
  7. sdl

    [SDL] Surface following the mouse cursor

    Thats quite simple, you just increased/decreased the coordinate each iteration/frame of your game until it reach the desired coordinate. Velocity would be how much you increased/decrease in each iteration/frame of your game. If the movement evolves acceleration there is might be a formula to be used, but with simply velocity doesn't make sense. Here is a very simple example for you: #include <SDL.h> #define WIDTH 640 #define HEIGHT 480 int main(int argc, char** argv) { SDL_Surface* screen = SDL_SetVideoMode(WIDTH, HEIGHT, 24, SDL_HWSURFACE | SDL_DOUBLEBUF); SDL_Surface *flag = SDL_LoadBMP("flag.bmp"); SDL_Surface *ball = SDL_LoadBMP("ball.bmp"); SDL_SetColorKey(ball, SDL_SRCCOLORKEY, SDL_MapRGB(ball->format, 255, 255, 255)); bool quit = false; SDL_Rect ballloc, flagloc; ballloc.x = (WIDTH - ball->w) / 2; ballloc.y = (HEIGHT - ball->h) / 2; flagloc.x = ballloc.x + ball->w / 2 - flag->w / 2; flagloc.y = ballloc.y + ball->h / 2 - flag->h / 2; SDL_Event event; while(!quit) { while(SDL_PollEvent(&event)) { switch(event.type) { case SDL_KEYDOWN: case SDL_KEYUP: quit = event.key.keysym.sym == SDLK_ESCAPE; break; case SDL_MOUSEBUTTONDOWN: flagloc.x = event.button.x; flagloc.y = event.button.y; break; } } if(ballloc.x + ball->w / 2 > flagloc.x + flag->w / 2) --ballloc.x; else if(ballloc.x + ball->w / 2 < flagloc.x + flag->w / 2) ++ballloc.x; if(ballloc.y + ball->h / 2 > flagloc.y + flag->h / 2) --ballloc.y; else if(ballloc.y + ball->h / 2 < flagloc.y + flag->h / 2) ++ballloc.y; SDL_FillRect(screen, 0, SDL_MapRGB(screen->format, 255, 255, 255)); SDL_BlitSurface(flag, 0, screen, &flagloc); SDL_BlitSurface(ball, 0, screen, &ballloc); SDL_Flip(screen); SDL_Delay(10); } } Here the images I used: BUT realize that the movement in the example I posted it's made by two rects and not by one. The ball goes one by one adjusting to the flag coordination and when one coordinate is done the other still going. What I mean is the natural movement would be the ball x and y coordinate stop at the same time, the movement be just one rect. For that you will need a formula, like: http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm.
  • 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!