English
Games

Schiebe-Puzzle - OpenSource

 
- Page 1 -



Julian
Schmidt
small from Langeweile entstandenes Game.

Download
external Download

698 kB
Kurzbeschreibung: mirror1
Hochgeladen:05/20/12
Downloadcounter288
Download
 
XProfan X2
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/04/12  
 



 
- Page 4 -



Jörg
Sellmeyer
the create and Delete one Bitmap-Handles uses sure More Ressourcen and cost More Time as The einmalige Creation one Staics, the You then moving can.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04/06/12  
 




Julian
Schmidt
Jörg Sellmeyer (06.04.12)

the create and Delete one Bitmap-Handles uses sure More Ressourcen and cost More Time as The einmalige Creation one Staics, the You then moving can.


hmmm...counts the Show one Bitmap-Handles (by DrawPic) with you to that "Löschen and Create one Bitmap-Handles". create and Delete do I mean Bitmap-Handels einmalig either at the beginning or end the program. otherwise do I tappt im dunkeln only spend, what under no circumstance with create same comes.
Einmalig create and Delete should I mean Bitmap-Handles ebenfallls, if I one Bitmap-Control benefit would.
Why ought to the lane over Bitmap-Controls means less Ressourcen and Time cost.
the einmalige create requires in each drop More Time, means More Rechenpower.
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/06/12  
 




Jörg
Sellmeyer
i know Yes not, How You, the here name:
CompileMarkSeparation
whileloop 1,part_x&,If((part_x& Mod 2)=0,2,1)

    space&=Create("hNewPic", &loop, part_y&, Back_Color())
    DrawPic space&, ((spalte_&-1)*part_x&), (zeile_&-1)*part_y&; 0
    DrawPic pic_part&[i_&], ((spalte_&-1)*part_x&)+&loop, (zeile_&-1)*part_y&; 0
    DeleteObject space&

EndW
a>

I name the mehrfaches Create one Bildhandles. and this is sure costly as the move one Controls. but me ist's too alike. I must Yes none Error in Your code find
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04/06/12  
 




Julian
Schmidt
i'd me now gladly on a new Algorithmus to that mix the Puzzle-pieces make. sense should it his, that only lösbar Puzzles come into being.
there's same several Opportunities, The any advantages or. detriments own.
1. mix by zufälligem move the Puzzleteile into Leerefeld circa a defined number of Zügen.
2. mix by chance To The Parität straight is (see [...] )
3. Gezieltes zufälliges mix so The Parität always straight is.

The 1. Possibility had whom benefit thats always about same lasting. though should one number the moves on The jeweiligen Feldgrößen optimize, so the image too enough mixed would.

The 2. would for me relatively simply umzusetzen. though would the Mischvorgang always different long last. theoretical could itself the program in a manner "Endlosschleife" hang up.

The 3. Possibility would in the comparison to 1. & 2. Possibility integral faster. though know I do not How I mean Review umsetzen could.

gives it yet rather Opportunities. which Possibility hold your for on the best.
my persönlicher Favorit is the 1. Possibility.
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/06/12  
 




Julian
Schmidt
Jörg Sellmeyer (06.04.12)

I name the mehrfaches Create one Bildhandles. and this is sure costly as the move one Controls. but me ist's too alike. I must Yes none Error in Your code find


is already long from my code outside. would have You times the Source updated would have You it seen.
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/06/12  
 




Jörg
Sellmeyer
You can you a scheduler of, say we, 100 machbaren Ausgangspositionen lay out. from them seek You then by chance which from.
there does it mix then ruckzuck.


is already long from my code outside. would have You times the Source updated would have You it seen.


the would have You Yes supra too simply allude can.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04/06/12  
 




Julian
Schmidt
Jörg Sellmeyer (06.04.12)

You can you a scheduler of, say we, 100 machbaren Ausgangspositionen lay out. from them seek You then by chance which from.
there does it mix then ruckzuck.


you mean I should me data base with some possible Opportunities lay out and from this then an random select?
the would then naturally the fastest. though should for each Schwieigkeitsgrad ca. 100 or rather More Kombinationen present.
Since I yet never with Databases worked have, position itself me The question, How I on the best The Opportunities eintrage and How big The data base with ca. 1000 Entries his becomes.

Jörg Sellmeyer (06.04.12)

the would have You Yes supra too simply allude can.


would have been I geahnt, that You you not my actually code refer, Yes.
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/06/12  
 




Jörg
Sellmeyer
For this will need you no data base. an Inidatei or so reicht:

Inidatei for puzzel

[achter]
Start= 0,1,2,3,4,5,6,7,8;1,2,3,4,0,6,5,8,7;2,1,3,4,8,5,0,7,6...

[fuenfzehner]
Start= 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15;1,2,3,14,6,5,8,7,0,9,11,10,12,13,15,4;...

...


After the equal principle can You you but in Program lists Generate.
I Have now The terms not head, The erfüllt his must.
from whom numbers (the are The Blöcke in the Puzzle) can You then The Coordinates calculate.

an Inidatei has Beschränkungen in the length the Strings. Nimm rather a Textdatei into You simply Zeilenweise The Start-Strings write

StartDatei
Start08=0,1,2,3,4,5,6,7,8;1,2,3,4,0,6,5,8,7;2,1,3,4,8,5,0,7,6...
Start15= 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15;1,2,3,14,6,5,8,7,0,9,11,10,12,13,15,4;...
Start24=...
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04/06/12  
 




Julian
Schmidt
Jup, then bräuchte I on the best a Source the me possible Solutions into Ini-File writes.
i'll the in next Time try (with the 1. Possibility (see supra)) umzusetzen. it be because, it diving one better suggestion on.
Greeting
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/06/12  
 




Julian
Schmidt
I have now a View source written the me possible Solutions lists.
I scheitere momentarily unfortunately yet at write this in a Text-File.
might time someone an example with Block Write make?
CompileMarkSeparation
Def Wurzel2(1) Sqrt(@&(1))
Def Spalte_from_ID(1) (INT(@&(1)/Wurzel2(anzahl_teile&))+IF((@&(1) mod Wurzel2(anzahl_teile&))=0,0,1))
Def Zeile_from_ID(1) INT(@&(1)-((Spalte_from_ID(@&(1))-1)*Wurzel2(anzahl_teile&)))
Def DateiName(1) SubStr$(@$(1),-1,"\\")
Def DateiPfad(1) Translate$(@$(1),("\\" + DateiName(@$(1))),"")
Var Programm$=Par$(If((Upper$(SubStr$(Par$(0), -1, "\\"))="PROFAN.EXE") or (Upper$(SubStr$(Par$(0), -1, "\\"))="XPROFAN.EXE"),1,0))
Var txt$=DateiPfad(Programm$)+"\Options.txt"
Declare anzahl_teile&, start_kombination$, kombination$, empty&, pos&[], err&, random&, liste&
cls

whileloop 5

    anzahl_teile&=(&loop+2)^2
    Clear pos&[]

    whileloop anzahl_teile&

        pos&[&loop]=&loop'pos&[Wahre-Positions-ID]=Aktuelle-Positions-ID

    EndWhile

    start_kombination$=Kombination()
    Destroywindow(liste&)
    liste&=Create("Listbox",%hwnd, 0, 0,0,width(%hwnd),height(%hwnd))'Create("List",0)
    empty&=1
    Randomize

    While GetCount(liste&)<1000

        random&=Rnd(2)+1'-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-Verschieben per Zufall

        If random&=1'Horizontal

            If Spalte_from_ID(empty&)=1'Rechts

                Tausche(empty&+Wurzel2(anzahl_teile&))

            ElseIf Spalte_from_ID(empty&)=Wurzel2(anzahl_teile&)'Links

                Tausche(empty&-Wurzel2(anzahl_teile&))

            Else'Links oder Rechts

                random&=Rnd(2)+1

                If random&=1'Links

                    Tausche(empty&-Wurzel2(anzahl_teile&))

                ElseIf random&=2'rechts

                    Tausche(empty&+Wurzel2(anzahl_teile&))

                EndIf

            EndIf

        ElseIf random&=2'Vertikal

            If Zeile_from_ID(empty&)=1'Unten

                Tausche(empty&+1)

            ElseIf Zeile_from_ID(empty&)=Wurzel2(anzahl_teile&)'Oben

                Tausche(empty&-1)

            Else'Oben oder Unten

                random&=Rnd(2)+1

                If random&=1'Oben

                    Tausche(empty&-1)

                ElseIf random&=2'Unten

                    Tausche(empty&+1)

                EndIf

            Endif

        EndIf

        kombination$=Kombination()'-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-Eintragen in Text-Datei

        If start_kombination$<>kombination$

            Clear err&

            whileloop GetCount(liste&)

                If GetString$(liste&,&loop-1)=kombination$

                    err&=1
                    break

                Endif

            Endwhile

            If err&<>1

                Addstring(liste&,kombination$)'noch nicht eingetragene Kombinationen
                'in Text-Datei eintragen
                Settext %hwnd,"Stufe: "+Str$(INT(Wurzel2(anzahl_teile&)-2))+"  Einträge: "+Str$(GetCount(liste&))+" von 1000"

            EndIf

        EndIf

        Case iskey(27) : end

    EndWhile

EndWhile

Proc Tausche

    Parameters id&'empty& und id& tauschen
    Declare x&

    whileloop anzahl_teile&'Wahre-Position von id&

        If pos&[&loop]=id&

            x&=&loop
            break

        EndIf

    EndWhile

    pos&[x&]=empty&
    empty&=id&
    pos&[1]=empty&'Tauschen

EndProc

Proc Kombination

    Declare text$

    whileloop anzahl_teile&

        text$=text$+Str$(pos&[&loop])+"|"

    Endwhile

    Return Left$(text$,Len(text$)span class=s2>-1)

ENDPROC

 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/07/12  
 




Jörg
Sellmeyer
For this will need you none BlockWrite bemühen. simply everything in a String and ex so:
CompileMarkSeparation
Var Text$ = "Dies\nist\nein\nTest"
Var Datei$ = "C:\Profan\Projekte\Notengenerator\Einstellungen.dat"
Assign #1,Datei$
Print %ioresult
ReWrite #1
Print #1,Text$
Close #1
print %ioresult
WaitInput
Shell "NotePad.exe " + Datei$
Wai
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04/07/12  
 




Julian
Schmidt
OK ,thanks
and How do I on the best only single Lines read?
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/07/12  
 




Zum Spiel


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

111.862 Views

Untitledvor 0 min.
H.Brill05/02/23
Sven Bader07/14/21
Michael Klumb04/18/16
Julian Schmidt01/07/16
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie