![]() |
Anzeige:
|
|
|||||||
| Sonstige Programmiersprachen Das Sammel-Forum für alle weiteren Programmiersprachen wie z.B. Assembler, Delphi, Pascal, C# (C-Sharp), Java usw. |
|
![]() |
|
|
LinkBack | Themen-Optionen | Ansicht |
|
|
#1 (Direktlink) | |
|
Erfolgreich angemeldet
![]() Registriert seit: 12.12.2009
Beiträge: 21
|
Hi,
ich möchte mir der ProSpeed.dll in AutoIt ein Spiel erstellen Hier ist mein Anfang Zitat:
Hab noch keine Erfahrung mit ProSpeed, aber scheint richtig gut zu sein und für AutoIt gibt es auch kaum so sachen. Gruss Greek
|
|
|
|
|
|
|
|
#2 (Direktlink) |
|
Super-Moderator
![]() Registriert seit: 05.02.2009
Ort: Westliches NRW
Alter: 44
Beiträge: 5.094
|
Hallo Greek,
ich hab leider kaum Erfahrung mit AutoIt. Aber ich frag mal den Jan, ob er hier reinsieht. Der hat die Includes und bekannten Demos für AutoIt zur ProSpeed geschrieben. Ich werd' ihn mal anskypen.
__________________
Gruß, Frank ![]() Webpage http://frabbing.bplaced.net mit Freeware - Tools, Spiele und Grafiken. |
|
|
|
|
|
#3 (Direktlink) |
|
Gast
Beiträge: n/a
|
hi
You need CreateBuffer() and SetBuffer() in your game When your window was overlapped by another window or your window gets out of the systray, then your window needs to update. windows sends a WM_PAINT message you catch that message in your game and use the buffers to repaint your window background. i could not test your code yet, because i don't have autoit installed due to a broken mainbord. hope that i could help you jan |
|
|
|
#4 (Direktlink) |
|
Gast
Beiträge: n/a
|
there is allso a german autoit forum
Portal - .: autoit.de :. - Das deutsche AutoIt-Forum Kind Regards jan |
|
|
|
#5 (Direktlink) |
|
Erfolgreich angemeldet
![]() Registriert seit: 12.12.2009
Beiträge: 21
|
hi
i know how to use autoit, but i don't understand how to delet the spaceship and stars with prospeed. in gdi+ i make this: GDIPlus_GraphicsClear($hgraphic) But don't know what to use in prospeed. I can use _WinApi_RedrawWindow but this is flickering. Need buffer, don't know how to do this with prospeed. Hope you can help me, don't understand your examples :S Thanks Greek |
|
|
|
|
|
|
#6 (Direktlink) |
|
Gast
Beiträge: n/a
|
some simple example
Code:
#include <prospeed30.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
$dll = DllOpen("user32.dll")
HotKeySet("{Esc}","_Exit")
$Raumschiff = LoadSprite("fly.bmp")
$RaumschiffWidth = GetWidthImage($Raumschiff)
$RaumschiffHeight = GetHeightImage($Raumschiff)
$WindowWidth = 800
$WindowHeight = 600
$RaumschiffPosX = ($WindowWidth/2)-($RaumschiffWidth/2)
$RaumschiffPosY = $WindowHeight-$RaumschiffHeight
$SpaceGUI = GUICreate("Spaceshooter",$WindowWidth,$WindowHeight)
GUISetState()
$hDC = GetHDC()
$createbitmap = CreateImage($WindowWidth,$WindowHeight) ;create empty bitmap (default = black)
CreateBuffer($WindowWidth,$WindowHeight) ;create buffer 800x600 for WM_PAINT
SetBuffer($createbitmap) ;fill buffer with empty bitmap
PaintImage($hDC,0,0,$WindowWidth,$WindowHeight,$createbitmap,0,0,0) ;copy empty bitmap to window
; Brauch ich das??
Stars(0,0,$WindowWidth,$WindowHeight,200,64,0)
;Sprite($Raumschiff, $S_offsetX, $S_offsetY, WIDTH, HEIGHT, FRAMES, START_FRAME, FRAME_SPEED, posX, posY)
$Sprite1 = Sprite($Raumschiff, $hdc, 0, 0, 24, 24, 1, 1, 1, 10, 10)
Sleep(2000)
AdlibEnable("_Zyklus",20)
Func _Zyklus()
_Update()
EndFunc
While 1
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
_Exit()
EndSwitch
WEnd
Func _Exit()
;// resourcen vorher freigeben
DeleteSprite($Sprite1) ; delete the sprite
FreeImage($Raumschiff) ; cleanup bitmap recources
NoStars(3) ; stop the stars , option 3 = let the stars fade out
Exit
EndFunc
Func _Update()
If _IsPressed(25,$dll) And WinActive($SpaceGUI) Then $RaumschiffPosX += -5
; use Movesprite to move the sprite on screen
; Movesprite($S_Alias, $S_posx, $S_posy)
EndFunc
Geändert von Frabbing (13.12.2009 um 21:24 Uhr) |
|
|
|
#7 (Direktlink) |
|
Erfolgreich angemeldet
![]() Registriert seit: 12.12.2009
Beiträge: 21
|
hi,
thank you very much, now i can go on |
|
|
|
|
|
#8 (Direktlink) |
|
Erfolgreich angemeldet
![]() Registriert seit: 12.12.2009
Beiträge: 21
|
$Raumschiff = LoadSprite("raumschiff.png")
$Sprite1 = Sprite($Raumschiff, $hdc, 0, 0, $RaumschiffWidth, $RaumschiffHeight, 1, 1, 1, 10, 10) I can't find those commands in the help? Where did you find them? And i get an error when i press ESC: "Die Anweisung in 0x01973d94 verweist auf Speicher in 0x01973d94. Der Vorgang 'read' konnte nicht auf dem Speicher durchgeführt werden." Can't translate this into english, maybe it's because i use a png and you did use bmp? Don't find information for these commands |
|
|
|
|
|
#9 (Direktlink) | |
|
Gast
Beiträge: n/a
|
Zitat:
and you can peek in the prospeed30.au3 for the functions you need it does not matter if you are using a bmp or png i don't know about alpha channel png's try converting the png to a bmp or jpg and see if you get *** error's Kind Regards jan |
|
|
|
|
#10 (Direktlink) |
|
Erfolgreich angemeldet
![]() Registriert seit: 12.12.2009
Beiträge: 21
|
Still got that error when i press ESC
|
|
|
|
|
|
|
#11 (Direktlink) |
|
Gast
Beiträge: n/a
|
|
|
|
|
#12 (Direktlink) | |
|
Erfolgreich angemeldet
![]() Registriert seit: 12.12.2009
Beiträge: 21
|
Hi,
sry that i'm writing back so late, i was in the hospital. I don't got the error anymore, don't know why. I had some time in the hospital to go on: Zitat:
Prospeed is great Here the Pictures: ![]() Astroid: ![]() Shot: ![]() I think i will have a few questions in the next days, hope you are looking for it. greeting Greek Geändert von Greek (19.12.2009 um 13:55 Uhr) |
|
|
|
|
|
|
#13 (Direktlink) |
|
Erfolgreich angemeldet
![]() Registriert seit: 12.12.2009
Beiträge: 21
|
Ich hab noch eine frage zu IntSprite bei ProSpeed,
Ich hab ein Bild mit 9 Frames die in 3 Reihen aufgeteilt sind, also 4, 4, 1. Jetzt kann ich aber nur mit IniSprite die ersten 4 Animieren, weil sie nebeneinander liegen müssen, gibts da ne möglichkeit das die unteren 2 Reihen mit einbezogen werden? |
|
|
|
|
|
#14 (Direktlink) |
|
Super-Moderator
![]() Registriert seit: 05.02.2009
Ort: Westliches NRW
Alter: 44
Beiträge: 5.094
|
Nein. Die Animationsbilder eines Sprites müssen schon nebeneinander liegen. Da die Bildbreite aber nicht limitiert ist, sollte das doch kein Problem darstellen.
Wenn du kein Malprogramm hast, kannst du deine Grafik mit meinem "Sprite-Rotator" neu arrangieren.
__________________
Gruß, Frank ![]() Webpage http://frabbing.bplaced.net mit Freeware - Tools, Spiele und Grafiken. |
|
|
|
|
|
#15 (Direktlink) |
|
Erfolgreich angemeldet
![]() Registriert seit: 12.12.2009
Beiträge: 21
|
Dank dir, hab alle 9 Frames nebeneinander mit GIMP gegrigt, funktioniert
|
|
|
|
|
![]() |
|
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
|
|
Ähnliche Themen
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| mit autoit Spalten aus Excel auslesen | Destroyer | Sonstige Programmiersprachen | 3 | 14.12.2009 07:08 |
| Prospeed 3.0 komplett mit Beispiel | profanfan | Helfer & Tools | 15 | 09.03.2009 22:22 |
| ProSpeed.dll - Version 3.0 | Frabbing | Dlls, Includes, Units & Prozeduren | 1 | 07.03.2009 22:16 |
| Kann mir jemand ein Java-Spiel erstellen ? | 2-d | Software - Allgemein | 0 | 15.06.2005 15:02 |
| Spiel erstellen | Gast123 | Allgemein | 8 | 20.02.2004 04:34 |