PureMemory Deluxe

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

PureMemory Deluxe

Post by Fluid Byte »

You knew that this would be coming! I actually made a sequel to this shitty game. :P

Like the last version, this has to be considered more like a learning project than a high paced action game.
Maybe it's entertaining at least for a coffee break. :o

Features
  • Complete Graphics Revamp
  • Combo System
  • New Music Score
  • 6 New Tilesets
  • Online-Highscore
Screenshots

Image

Download

http://www.codedreality.de/purememory-deluxe-en.html

Enjoy!

------------------------------------------------------------------------------------------------

Update v1.4
  • Changed: DirectX 9 is now used as the default graphics API which means it's now fully
    compatible with the the Aero-Scheme of Windows Vista and Windows 7
  • Added: The game now has offical support for 64-Bit systems
  • Fixed: Highscore online check sometimes went into an endless loop if the URL wasn't
    reachable (circle of death) because of a validation of the return value
Update v1.3
  • Fixed: "invisible font" bug on Vista
  • Fixed: time was not stoped/cached in "TimeMode" when the game loses focus
Update v1.2
  • SFX/BGM volume in the options now gets changed in realtime
  • The score achieved in timemode wasn't correctly transfered online. That's fixed now but the times have been reset.
  • The game is no no longer finalized with AppPacker. So there's no more two "PureMemory Deluxe.exe" processes running. May fix some Vista-problems as well.
Update V1.1
  • reduced CPU usage
  • MiniZIP Update
  • fixed typos
Last edited by Fluid Byte on Fri Jul 02, 2010 12:26 am, edited 11 times in total.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

Update V1.1B
  • reduced CPU usage
  • MiniZIP Update
  • fixed typos
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Post by luis »

Looks very nice!

But doesn't start on my system.

I see two PureMemory.exe processes (?) for a moment in the taskmanager and then quits.

XP SP3 (ita), nVidia 9800 GTX, 4GB and an original IBM model-m keyboard :)
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

luis wrote:I see two PureMemory.exe processes (?) for a moment in the taskmanager and then quits.
That's because the game has been packed. When you start the .EXE it unpacks all needed files, closes itself and then launches the "real" .EXE. Dunno why it won't start though. Several people have the same problem.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
idle
Always Here
Always Here
Posts: 5835
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Post by idle »

very nice fluid.

It opened up fine on XP here, but still had two processes running.
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

Very cool game 8). Works great here on XP 32bit.

Congrats Fluid Byte!
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Well done! :)
bye,
Daniel
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

Update v1.2B
  • SFX/BGM volume in the options now gets changed in realtime
  • The score achieved in timemode wasn't correctly transfered online. That's fixed now but the times have been reset.
  • The game is now no longer finalized with AppPacker. So there's no more two "PureMemory Deluxe.exe" processes running. May fix some Vista-problems as well.
Please download the new version!
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Post by luis »

Fluid Byte wrote: [*] The game is now no longer finalized with AppPacker. So there's no more two "PureMemory Deluxe.exe" processes running.
Still doesn't start on my PC.

(if you are interested in upload a debug version writing a log file maybe, I can try that and report back).
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

luis wrote:(if you are interested in upload a debug version writing a log file maybe, I can try that and report back).
That's exactly what I thought yesterday but how to do? Create a textfile at startup and then and after each code segment (init DirectX, load sound, load graphics, init interface, etc.) just write a line? It doesn't matter if it crashes and the file doesn't get closed correctly with CloseFile(), right?

Everything be written into the file until a crash, won't it?
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

test it....
write a code that writes something to a textfile every second,
and kill the process in the middle of execution.

on the other hand, you can use OpenFile:WriteString:CloseFile to do an Append...
oh... and have a nice day.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

Kaeru Gaman wrote:on the other hand, you can use OpenFile:WriteString:CloseFile to do an Append...
So simple but yet so effective... :oops:

I just had a look at the OpenFile() example and put this togther (try with debugger off):

Code: Select all

Procedure _Log(Text.s)
	OpenFile(0,"purememory.log")
	FileSeek(0,Lof(0))
	WriteStringN(0,Text)
	CloseFile(0)
EndProcedure

_Log("first line in log")

_Log("programm started")

tittyfuck = 23 / Null ; force the programm to crash

; do stuff

_Log("programm closed") ; this line will be missing in log
You sometimes lose the sense for the simple solutions if when you program to much.

Thanks Kaeru! :wink:
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

you're welcome! :D
Fluid Byte wrote:

Code: Select all

tittyfuck = 23 / Null
boy, you made me laught! k.m.a. what a blaster...
oh... and have a nice day.
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Post by luis »

EDIT: POLISHED A LITTLE
http://www.purebasic.fr/english/viewtopic.php?p=279380


Fluid Byte wrote: Everything be written into the file until a crash, won't it?
Yes.

Here it is how I do: (DEPRECATED: SEE LINK ABOVE)

Code: Select all

; #L2F_ENABLED

Macro L2F_INIT (sFileName, flgAppend)
CompilerIf Defined(L2F_ENABLED, #PB_Constant)
 _DebugToFile ("", sFileName, flgAppend)
CompilerEndIf 
EndMacro 

Macro L2F (sText)
CompilerIf Defined(L2F_ENABLED, #PB_Constant)
 _DebugToFile (sText)
CompilerEndIf 
EndMacro 

CompilerIf Defined(L2F_ENABLED, #PB_Constant)
Procedure _DebugToFile (sText.s, sFileName.s = "", flgAppend = #False)
 Static nFileNum
 Static sDebugFileName.s 

 If IsFile(nFileNum) = 0 
    sDebugFileName = GetPathPart(ProgramFilename())
    
    If Len(sFileName)
        sDebugFileName + sFileName
    Else
        sDebugFileName + "debug.txt"
    EndIf

    If flgAppend
        nFileNum = OpenFile(#PB_Any, sDebugFileName)        
        If nFileNum
            FileSeek(nFileNum, Lof(nFileNum))
        EndIf
    Else
        nFileNum = CreateFile(#PB_Any, sDebugFileName)
    EndIf
 EndIf
 
 If Len(sText)
    sText = FormatDate("%hh:%ii:%ss = ", Date()) + sText
 EndIf
 
 If IsFile(nFileNum)
    WriteString(nFileNum, sText + #CRLF$) 
    FlushFileBuffers(nFileNum)
 EndIf
 
EndProcedure
CompilerEndIf

Code: Select all

;*** TEST ***

Debug "1"

L2F("debug line 1")

Debug "2"

L2F("debug line 2")

Debug "3"

L2F("debug line 3")

If you define #L2F_ENABLED by uncommenting it, the debug file is created.


If you do not define #L2F_ENABLED by commenting it, there is no trace in the code of the debug procedures.


On default L2F creates a debug.txt file in overwrite mode.
If you call ONCE L2F_INIT at the start of your code, you can decide the filename and if the log must be appended to at every run or recreated.
Last edited by luis on Wed Mar 04, 2009 9:20 pm, edited 1 time in total.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

That would have been my next question. I was scared by the idea of having two sources to maintain and update.
But your solution is just great luis! Thank you very much!

Ok, here's the debug version:

http://www.codedreality.de/tl_files/gam ... _Debug.zip

A correct log should look like this:

Code: Select all

13:26:03 = init DirectX 7
13:26:03 = init 3D hardware
13:26:03 = init keyboard
13:26:03 = init mouse
13:26:03 = init sound
13:26:03 = load component: minizip
13:26:03 = load component: animsprite
13:26:03 = load component: imagefont
13:26:03 = load component: highscore
13:26:03 = load component: zip access
13:26:03 = load component: interface
13:26:03 = read settings
13:26:03 = open screen
13:26:03 = prepare resources
13:26:03 = load sounds
13:26:03 = load music
13:26:03 = load graphics
13:26:03 = init interface
13:26:04 = create dialogs
13:26:04 = enter main loop ...
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
Post Reply