@spagetiokillers I haven't worked with Delphi for a while now (switched to C#), but have you tried e.g. GetAsyncKeyState(vk_space)<0 ? I think in Delphi this is one of the best solutions for games.
Hey i need some help, for school we are making games with delphi (every kids dream), tho i am having one problem with high scores, we need to be able to read an write to file. How did you do it?
@QuincytheDestroyer There are several ways to do this. Some easy ways are for example to create an INI file, to create a TStringList and use "SaveToFile" or to create a text file manually.
The method I learned first was to use TextFile (probably for better understanding), though the others might be simpler. If you want to save more than only one highscore TStringList can be useful, because you can automatically sort the values after appending a new one.
wow this is amazing ! Im also trying to make mario with delphi but i got few probleems.. The background is very large so it doesnt fit the window. So I got the annoying scrollbar ><. How to get rid of this ? Thanks alots if you can help :)
@DotAxLegend If you are using TImage, try setting AutoSize to false and maybe Stretch to true (might not look so good depending on the format of the image).
Allerdings zeigt das Video sowieso eine ältere Version und in der neuen sind auch ein paar Fehler, die ich in dem Durcheinander nicht mehr finde (war damals noch Anfänger; bin ich zwar immer noch, aber doch schon etwas weiter fortgeschritten^^)...
Irgendwann überarbeite ich das alles nochmal.
Den Download-Link habe ich jetzt upgedated. Ich hoffe, es funktioniert jetzt.
the reason I say such is that you said "set other levels free" where you should have said "unlock" so try English lessons or a human translator rather than an electronic translator
die fragen kann ich alle nur relativ ungenau beantworten... damals war ich glaube ich seit ca 1/2 jahr in der ag meiner schule, aber an die programmierzeit kann ich mich nicht mehr genau erinnern. schätze, es waren ein bis zwei wochen mit einigen mehr oder weniger großen pausen dazwischen.
also ich programiere in C. Begonnen zu lernen hab ich so ca. vor 1 1/2 Jahre hab abere bald aufgehört. jetzt hab ich vor ca nem Monat begonnen mit einem Buch zu lernen.
Hab jetzt vor kurzem nen Pong programmiert welches in der Console läuft --> also noch nicht sehr fortgeschritten. Aber ich arbeite dran un Pong war jetzt einer der einfachen Programme;-) Weiß zwar nicht wie schwer Delphi ist aber für 1/2 Jahre Erfahrung: Respect^^
Ich kann ja mal versuchen, es im groben zu erklären: Wichtig dafür ist erstmal Canvas (das könntest du auch gut für eine etwas fortgeschritte Version von Pong benutzen ;) ) und mehrere Arrays. Mit einem Array (z.B.)[0..100] of Array[0..100] of Integer (eigentlich habe ich einen dynamischen genommen, das ist aber eine andere geschichte) wird das feld festgelegt. Im OnPaint der PaintBox geht man dann mit 2 for-schleifen 100*100 alle felder durch ... (fortsetzung folgt)
... und bei einem bestimmten integer-wert wird auch eine bestimmte farbe gezeichnet (bei canvas mit fillrect(rect(x*5,y*5,x*5+4,y*5+4)) ) die schlange besteht dann aus einem weiteren dynamischen array of tpoint. im OnTimer wird dann das letzte feld des arrays gelöscht und die restlichen eins nach hinten geschoben. das erste feld bekommt dann je nach richtung einen neuen wert. wenn ein apfel gegessen wird, bleibt das löschen einmal aus.
hello Brother,
nice work! (Y)
whats name of music?
thanks
mauriciobatistin 6 months ago
@mauriciobatistin Thanks! The music is "Snake Eyes" by Bittybox. I took it from YouTube Audioswap
Lumpiluk 6 months ago
hey, im making a game recreation of space invaders and i cant get the keyboard to work. mind helping me out. iv tried everything i can think of
spagetiokillers 10 months ago
@spagetiokillers I haven't worked with Delphi for a while now (switched to C#), but have you tried e.g. GetAsyncKeyState(vk_space)<0 ? I think in Delphi this is one of the best solutions for games.
Lumpiluk 10 months ago
@Lumpiluk o never mind i figured it out the other day
spagetiokillers 10 months ago
Nice work,man :D
Vator0 1 year ago
würde echt gern wissen wie man so was hinkriegt :D
geht das auch mit lazarus?
MyNameYasiinO 1 year ago
Hey i need some help, for school we are making games with delphi (every kids dream), tho i am having one problem with high scores, we need to be able to read an write to file. How did you do it?
QuincytheDestroyer 1 year ago
@QuincytheDestroyer There are several ways to do this. Some easy ways are for example to create an INI file, to create a TStringList and use "SaveToFile" or to create a text file manually.
The method I learned first was to use TextFile (probably for better understanding), though the others might be simpler. If you want to save more than only one highscore TStringList can be useful, because you can automatically sort the values after appending a new one.
Use google to find your favorite ;)
Lumpiluk 1 year ago
Play snake!!! Pause the video and hold the left arrow down for 1-2 sec... Enjoy :DDD
mikken12 1 year ago 2
@mikken12 Why does this work? :D
Didn't believe you until I tried it myself
Lumpiluk 1 year ago
@Lumpiluk ah ok, it seems like it's working with every video on YouTube.
Lumpiluk 1 year ago
wow this is amazing ! Im also trying to make mario with delphi but i got few probleems.. The background is very large so it doesnt fit the window. So I got the annoying scrollbar ><. How to get rid of this ? Thanks alots if you can help :)
DotAxLegend 1 year ago
@DotAxLegend If you are using TImage, try setting AutoSize to false and maybe Stretch to true (might not look so good depending on the format of the image).
Lumpiluk 1 year ago
...or you can toggle Form1.HorzScrollBar.Visible/Form1.VertScrollBar.Visible to false
Lumpiluk 1 year ago
hey lumpiluk, ich wollt das spiel runterladen aber... iwie klappt der download nich..
meine frage: kann ich es irgendwo anders kriegen? / ist da der quelltext dabei? würde es mir gerne mal anschauen.. MfG! :)
Jooogan 1 year ago
@Jooogan Danke, gut, dass du es gesagt hast! ;)
Allerdings zeigt das Video sowieso eine ältere Version und in der neuen sind auch ein paar Fehler, die ich in dem Durcheinander nicht mehr finde (war damals noch Anfänger; bin ich zwar immer noch, aber doch schon etwas weiter fortgeschritten^^)...
Irgendwann überarbeite ich das alles nochmal.
Den Download-Link habe ich jetzt upgedated. Ich hoffe, es funktioniert jetzt.
Lumpiluk 1 year ago
cool endlich mal ein snake wo idioten wie ich gegen die wand fahrn könnnen :D
SillyMusic97 2 years ago
nice^^
SroPlayax 2 years ago
That's pretty cool!
sXeBrutis 2 years ago
the reason I say such is that you said "set other levels free" where you should have said "unlock" so try English lessons or a human translator rather than an electronic translator
macks2010 2 years ago
Thanks, I corrected that now.
We have English lessons three times a week so I'm still learning ;-)
Anyway, this is an old version and I am going to make a new video soon.
Lumpiluk 2 years ago
Hah, nice job man :P
xiyuno 2 years ago
gut gelungen^^
ok eigentlich altes spiel un langweilig
aber da ich ja selbst progge weiß ich das des ne miese arbeit ist
wie lang hast du dafür lernen müssen un wie lang hast du für den Quellcode gebraucht?^^
keinkev 2 years ago
die fragen kann ich alle nur relativ ungenau beantworten... damals war ich glaube ich seit ca 1/2 jahr in der ag meiner schule, aber an die programmierzeit kann ich mich nicht mehr genau erinnern. schätze, es waren ein bis zwei wochen mit einigen mehr oder weniger großen pausen dazwischen.
wie lang programmierst du denn schon so? und was?
Lumpiluk 2 years ago
bei mir ist die antwort auch ungenau^^
also ich programiere in C. Begonnen zu lernen hab ich so ca. vor 1 1/2 Jahre hab abere bald aufgehört. jetzt hab ich vor ca nem Monat begonnen mit einem Buch zu lernen.
Hab jetzt vor kurzem nen Pong programmiert welches in der Console läuft --> also noch nicht sehr fortgeschritten. Aber ich arbeite dran un Pong war jetzt einer der einfachen Programme;-) Weiß zwar nicht wie schwer Delphi ist aber für 1/2 Jahre Erfahrung: Respect^^
keinkev 2 years ago
Danke!
Ich kann ja mal versuchen, es im groben zu erklären: Wichtig dafür ist erstmal Canvas (das könntest du auch gut für eine etwas fortgeschritte Version von Pong benutzen ;) ) und mehrere Arrays. Mit einem Array (z.B.)[0..100] of Array[0..100] of Integer (eigentlich habe ich einen dynamischen genommen, das ist aber eine andere geschichte) wird das feld festgelegt. Im OnPaint der PaintBox geht man dann mit 2 for-schleifen 100*100 alle felder durch ... (fortsetzung folgt)
Lumpiluk 2 years ago
... und bei einem bestimmten integer-wert wird auch eine bestimmte farbe gezeichnet (bei canvas mit fillrect(rect(x*5,y*5,x*5+4,y*5+4)) ) die schlange besteht dann aus einem weiteren dynamischen array of tpoint. im OnTimer wird dann das letzte feld des arrays gelöscht und die restlichen eins nach hinten geschoben. das erste feld bekommt dann je nach richtung einen neuen wert. wenn ein apfel gegessen wird, bleibt das löschen einmal aus.
ich hoffe, ich konnte damit jemandem helfen ;)
Lumpiluk 2 years ago
Hmm klingt sogar relativ einfach.
Klingt sogar einfacher wie mein Pong^^
keinkev 2 years ago
was es aber warscheinlich nict ist^^
sry wegen doppel post
keinkev 2 years ago
without using a translator?
macks2010 2 years ago
anyone speak English?
macks2010 2 years ago
I'm German, but I can try...
Lumpiluk 2 years ago
Lass mich raten. Turbo Delphi 2006?
Ist dir gut gelungen. Vorallem der Leveleditor gefältt mir.
Ist zwar ein einfaches und vorallem altes Spiel, aber man merkt wieviel arbeit drin steckt.
Delphi 4 ever!!!
Wasserleische 2 years ago
Danke erstmal!
Turbo Delphi 2006 ist es aber nicht, sondern Delphi 2005...
Lumpiluk 2 years ago