Little X-Mas Game

Developed or developing a new product in PureBasic? Tell the world about it.
benny
Enthusiast
Enthusiast
Posts: 465
Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:

Little X-Mas Game

Post by benny »

Ho Ho Ho ...

Christmas is near ... so here is a little XMas Game.

http://www.weltenkonstrukteur.de/dlsys.php?prdnr=07

[Thanks to LarsG, Paul, WolfgangS and Karbon for help :D ]
regards,
benny!
-
pe0ple ar3 str4nge!!!
User avatar
GedB
Addict
Addict
Posts: 1313
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Post by GedB »

Great fun.

Is that a Sid playing at the beginning?
benny
Enthusiast
Enthusiast
Posts: 465
Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:

Post by benny »

Thanks,

the music at the beginning is a normal mod file (chip-style, so it sounds like sid). :wink:
regards,
benny!
-
pe0ple ar3 str4nge!!!
dontmailme
Enthusiast
Enthusiast
Posts: 537
Joined: Wed Oct 29, 2003 10:35 am

Post by dontmailme »

Cool game ;)

My high was 6495 8O
Paid up PB User !
dige
Addict
Addict
Posts: 1405
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

Realy nice :-)
benny
Enthusiast
Enthusiast
Posts: 465
Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:

Post by benny »

Thanks for the positive feedback.

@dontmailme: keep trying. mine highscore is 9722 :wink:
regards,
benny!
-
pe0ple ar3 str4nge!!!
Dr.Zoidberg
New User
New User
Posts: 6
Joined: Tue Sep 23, 2003 11:58 am
Location: Gummersbach Germany
Contact:

Post by Dr.Zoidberg »

i do not have a score displayed in the game. Sorry, i cant make a screenshot, it doesnt work. Its Win XP on my Computer.
dontmailme
Enthusiast
Enthusiast
Posts: 537
Joined: Wed Oct 29, 2003 10:35 am

Post by dontmailme »

benny wrote:Thanks for the positive feedback.

@dontmailme: keep trying. mine highscore is 9722 :wink:
Yes, but you wrote it ;)
Paid up PB User !
benny
Enthusiast
Enthusiast
Posts: 465
Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:

Post by benny »

@dontemail: nahh .. i am not cheating :oops:

@dr.zoidberg: hmm ... that sounds strange ... i am using the verdana font. Do you have it installed? I have tested it on WinXP without any probs.
anyone else with such a problem ?
regards,
benny!
-
pe0ple ar3 str4nge!!!
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Nice game!
benny wrote:@dontemail: nahh .. i am not cheating :oops:
guess who is... :wink:

Code: Select all

If OpenWindow(0, 0, 0, 100, 70, #PB_Window_SystemMenu|#PB_Window_Screencentered, "Cheat :)")
  If CreateGadgetList(WindowID())
    ButtonGadget(0, 10, 10, 80, 20, "Run Game")
    ButtonGadget(1, 10, 40, 80, 20, "Score +1000")
    
    Repeat
      Event = WaitWindowEvent()
      If Event = #PB_EventGadget
      
        Select EventGadgetID()
        
          Case 0
            file$ = OpenFileRequester("Run Game...", "", "Executables|*.exe",0)
            If file$ <> ""
              hProcess = RunProgram(file$)
              
              tick = gettickcount_()
              Repeat
                window = FindWindow_(0, "Weihnachtsmann-Polonese - (c) Y2K3 by benny / weltenkonstrukteur.de")
                Delay(1)
              Until window Or gettickcount_() > tick+2000
              
              If window
                GetWindowRect_(window, @Rect.RECT)
                MoveWindow(Rect\right, Rect\top)
              EndIf
              
            EndIf
          
          Case 1
            ReadProcessMemory_(hProcess, 4244028, @Score.l, 4, 0)
            Score + 1000
            WriteProcessMemory_(hProcess, 4244028, @Score, 4, 0)
            
        EndSelect
      
      EndIf      
    Until Event = #PB_EventCloseWindow
  EndIf
EndIf

End
:mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen:

(tested on win2k and winxp)

Timo
quidquid Latine dictum sit altum videtur
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

How big are the chance to get the source?

Because: Your code has also the nice: Half of the textures are transparent, other half not.

The North-Pole-"Sign" has no transparent, also the man on the start has no transparent background.

So when you can give me the source, i can test why.

I do some test with 3d-Sprites and transparent background (with the author of racingtest; he told me, what he did; the source of racetest are lost...) and i found not realy a reason why it doesn't work always. I think the problem is settransparentspritecolor (or how the command is called). But i need a code with the "error"...
Dr.Zoidberg
New User
New User
Posts: 6
Joined: Tue Sep 23, 2003 11:58 am
Location: Gummersbach Germany
Contact:

Post by Dr.Zoidberg »

benny wrote:... i am using the verdana font. Do you have it installed?
Yes i checked it, Verdana is on my computer installed. must be another problem.

Some details: im using a 1024*768*16 Screen Resolution, and i have a Geforce 4 Ti 4200 Graphics Card

Do you use loadadditionalfont() in your program for the font ?
benny
Enthusiast
Enthusiast
Posts: 465
Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:

Post by benny »

freak wrote:Nice game!
benny wrote:@dontemail: nahh .. i am not cheating :oops:
guess who is... :wink:

Code: Select all

If OpenWindow(0, 0, 0, 100, 70, #PB_Window_SystemMenu|#PB_Window_Screencentered, "Cheat :)")
  If CreateGadgetList(WindowID())
    ButtonGadget(0, 10, 10, 80, 20, "Run Game")
    ButtonGadget(1, 10, 40, 80, 20, "Score +1000")
    
    Repeat
      Event = WaitWindowEvent()
      If Event = #PB_EventGadget
      
        Select EventGadgetID()
        
          Case 0
            file$ = OpenFileRequester("Run Game...", "", "Executables|*.exe",0)
            If file$ <> ""
              hProcess = RunProgram(file$)
              
              tick = gettickcount_()
              Repeat
                window = FindWindow_(0, "Weihnachtsmann-Polonese - (c) Y2K3 by benny / weltenkonstrukteur.de")
                Delay(1)
              Until window Or gettickcount_() > tick+2000
              
              If window
                GetWindowRect_(window, @Rect.RECT)
                MoveWindow(Rect\right, Rect\top)
              EndIf
              
            EndIf
          
          Case 1
            ReadProcessMemory_(hProcess, 4244028, @Score.l, 4, 0)
            Score + 1000
            WriteProcessMemory_(hProcess, 4244028, @Score, 4, 0)
            
        EndSelect
      
      EndIf      
    Until Event = #PB_EventCloseWindow
  EndIf
EndIf

End
:mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen:

(tested on win2k and winxp)

Timo
LOL :D

Hey Timo,

that's really cool ... now I am feeling very proud and honoured because a trainer/cheater exist for one of my games ... YEAH :)

Cool work !
regards,
benny!
-
pe0ple ar3 str4nge!!!
benny
Enthusiast
Enthusiast
Posts: 465
Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:

Post by benny »

@Dr.Zoidberg + GPI:

This game is acutally for the PureContest-XMas-Competition by Rob [he already has it including the source].
I asked him, if it is ok with the rules if I release it 2 weeks earlier than the deadline (otherwise it wouldnt make sense to release a xmas-game some days after xmas).
So, the source can be downloaded from the 24th of December from the pure-contest webpage.
If you want to go bug-hunting earlier, just drop an email to :

benny[at]weltenkonstrukteur[dot]de

and I will of course send the source plus binaries to you !!!

@Dr.Zoidberg:
I use Danilo's CoolFont-Example for loading the Font!
By the way ... can you see the Instructions at the title-screen :?:
Last edited by benny on Fri Jan 23, 2004 9:30 am, edited 1 time in total.
regards,
benny!
-
pe0ple ar3 str4nge!!!
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

benny wrote:@Dr.Zoidberg + GPI:

This game is acutally for the PureContest-XMas-Competition by Rob [he already has it including the source].
Erh... I'm missing something here, ain't i?
Post Reply