Lunatic BoM

Member
  • Content count

    6
  • Joined

  • Last visited

Community Reputation

100 Neutral

About Lunatic BoM

  • Rank
    Newbie
  1. Python problem

    Ermm, could you explain that a little better. Thanks in advance :)
  2. Python problem

    Hi, so I started programming python recently, including pygame library. And now I have this bit of code: import pygame pygame.init() screen = pygame.display.set_mode((640, 480)) pygame.display.set_caption("move a box") background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((255, 255, 0)) box = pygame.Surface((25, 25)) box = box.convert() box.fill((255, 0, 0)) box_x = 0 box_y = 200 clock = pygame.time.Clock() keepGoing = True while keepGoing: clock.tick(30) for event in pygame.event.get(): if event.type == pygame.QUIT: keepGoing = False box_x += 5 if box_x > screen.get_width(480): box_x = 0 screen.blit(background, (0, 0)) screen.blit(box, (box_x, box_y)) pygame.display.flip() and for some unpredicted reason, screen freezes as I try to run this code. Maybe you know what is the problem? Thanks
  3. How hard would it be to create a myBrute clone?

    Hi, answering your question I would say, it would be a lot of work, in minimum your team should consist from 2 programmers who knows PHP, mySQL and etc., artist, animator ( for sprites ), flash developer. And with that team it would take you approximately 10 months. I could be wrong as well. But as one man already said, you should start from small projects like tetris or snake, and when you will know how to create simple games, try something bigger, with bigger team. :)
  4. Pygame detecting is the mouse touching something

    Quote:Original post by Geometrian . . . a "wall"? Errmmm, sorry for bad explanation. You see I want to make a very simple game, where if mouse touches another object it just shows an game over screen or something like that. I think you know those games where you move the mouse across small corridors and if you touch the "wall" it just shows game over, so that is kind of what I'm making just a lot simpler. Should I use collision detection for that?
  5. Hello, finally I started to program python and pygame :) Earlier I done some coding in Flash AS2, not so much, but know the basics. So now, I started on pygame, watched a lot of tutorials, I really like it. The problem I faced now is, that I want, that my mouse cursor would detect when it is touching a "wall". But I don't really know the function for that. This is my code, to all of you experienced programmers know what I'm talking about: bif = "bg.jpg" mif = "ball.png" lif = "lines.png" import pygame, sys from pygame.locals import * pygame.init() screen = pygame.display.set_mode((640,480),0,32) background = pygame.image.load(bif).convert() mouse_c = pygame.image.load(mif).convert_alpha() lines = pygame.image.load(lif).convert_alpha() while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() screen.blit(background, (0,0)) x,y = pygame.mouse.get_pos() x -= mouse_c.get_width()/2 y -= mouse_c.get_height()/2 pygame.mouse.set_visible(False) screen.blit(lines, (0,0)) screen.blit(mouse_c, (x,y)) pygame.display.update() If someone would be so nice and explain me how to do it. That would be really nice :) Thank you