matwachich Posted August 20, 2011 Share Posted August 20, 2011 Hi everybody,This is a months work, and it's finally done!It's a 2D games engin based on GDI+ for graphics and text, and BASS for sound.It's pretty simple to use, and there is a complete and clear documentation (generated by Natural docs)Link LiquidNitrogen, Skitty and jvanegmond 3 Link to comment Share on other sites More sharing options...
jaberwacky Posted August 20, 2011 Share Posted August 20, 2011 I'm lovin' the tank example. Now I can recreate Oregon Trail! I was the hunting master. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
Syed23 Posted August 20, 2011 Share Posted August 20, 2011 This awesome and inspiring to do something:) Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font] Link to comment Share on other sites More sharing options...
VisualB Posted August 20, 2011 Share Posted August 20, 2011 stunning awesome code. 5 star Link to comment Share on other sites More sharing options...
4Eyes Posted August 20, 2011 Share Posted August 20, 2011 (edited) This is bloody amazing! I can see many games being built around this. Can't post here what jumped out of my mouth when a started the particle example. Good work! Only 31 posts and 1 month in development? 4Eyes Edited August 20, 2011 by 4Eyes Link to comment Share on other sites More sharing options...
UEZ Posted August 20, 2011 Share Posted August 20, 2011 Incredible nice work! If you could translate the code descriptions to english would be great because my french is absolutely poor! 5* from me! Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
IRON Posted August 20, 2011 Share Posted August 20, 2011 really awesome! Thanks for sharing! Link to comment Share on other sites More sharing options...
matwachich Posted August 20, 2011 Author Share Posted August 20, 2011 Thank you every body! - Only 31 posts because i'm from the french community, and this is my biggest work and i decided to share here! - I must let the french descriptions for the french users, but the documentation is in english! - I forgot to tell that the performances are not really good: the greater maximum FPS was 180 for me (Dual core T3400 2.16Ghz, 3Go Ram, Geforce G103M 512Mo), but i think it's enought for some nice little games! It's not my fault, but it's GDI+. I tried to do it wit openGL, but i couldn't load textures, so i did it with another programing language (search GL-Engin in google codes, it's in FreeBasic) Please share any game you make with, i really want to see them!!! I'm here for any questions! Link to comment Share on other sites More sharing options...
monoscout999 Posted August 20, 2011 Share Posted August 20, 2011 This is awersome, really good work... thanks for sharing Link to comment Share on other sites More sharing options...
FireFox Posted August 21, 2011 Share Posted August 21, 2011 Impressionnant, très bon travail ! (amazing, very good work) 5* from me. Br, FireFox. Link to comment Share on other sites More sharing options...
BuckMaster Posted August 22, 2011 Share Posted August 22, 2011 (edited) Thanks for creating this engine, its very easy to use and to create new things,This is the first game I've been making with it, started off with your tank and went from there, probably going to add more in the next couple of days,One of the only glitches i cant seem to figure out is why they sometimes shoot their selves, but besides that its greatControlsW - ForwardS - BackwardsA - LeftD - RightSpace - Drop MineDownload Files Here:http://www.mediafire.com/?nmbyri6bm946bq3 Edited August 22, 2011 by BuckMaster Link to comment Share on other sites More sharing options...
xzhat Posted August 22, 2011 Share Posted August 22, 2011 Hi Buckmaster, tried your example, but got this result(screenshot). any clue why? Link to comment Share on other sites More sharing options...
matwachich Posted August 22, 2011 Author Share Posted August 22, 2011 They shoot themself because you check the collision between the enemies projectiles and them. Link to comment Share on other sites More sharing options...
JohnOne Posted August 22, 2011 Share Posted August 22, 2011 matwachich Your examples are absolutely superb Thanks for share. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
TheGuardian Posted August 22, 2011 Share Posted August 22, 2011 Wow this is amazing, it's simple too.... I like simple Link to comment Share on other sites More sharing options...
Zedna Posted August 22, 2011 Share Posted August 22, 2011 Very nice game engine!! Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Mobius Posted August 22, 2011 Share Posted August 22, 2011 Bloody hell, Dude this rocks, ran nicely on this crappy old rig too! 5* without a shadow of a doubt. Respect Vlad Link to comment Share on other sites More sharing options...
UEZ Posted August 23, 2011 Share Posted August 23, 2011 (edited) My 2 suggestions:function _GEng_ImageLoadStream() has a memory leak in worst case scenariosantialiasing for fonts when aero is enabled1) use this code insteadexpandcollapse popup;====================================================================================== ; Function Name: Load_BMP_From_Mem ; Description: Loads an image which is saved as a binary string and converts it to a bitmap or hbitmap ; ; Parameters: $bImage: the binary string which contains any valid image which is supported by GDI+ ; Optional: $hHBITMAP: if false a bitmap will be created, if true a hbitmap will be created ; ; Remark: hbitmap format is used generally for GUI internal images, $bitmap is more a GDI+ image format ; Don't forget _GDIPlus_Startup() and _GDIPlus_Shutdown() ; ; Requirement(s): GDIPlus.au3, Memory.au3 and _GDIPlus_BitmapCreateDIBFromBitmap() from WinAPIEx.au3 ; Return Value(s): Success: handle to bitmap (GDI+ bitmap format) or hbitmap (WinAPI bitmap format), ; Error: 0 ; Error codes: 1: $bImage is not a binary string ; 2: unable to create stream on HGlobal ; 3: unable to create bitmap from stream ; ; Author(s): UEZ ; Additional Code: thanks to progandy for the MemGlobalAlloc and tVARIANT lines and ; Yashied for _GDIPlus_BitmapCreateDIBFromBitmap() from WinAPIEx.au3 ; Version: v0.97 Build 2012-04-10 Beta ;======================================================================================= Func Load_BMP_From_Mem($bImage, $hHBITMAP = False) If Not IsBinary($bImage) Then Return SetError(1, 0, 0) Local $aResult Local Const $memBitmap = Binary($bImage) ;load image saved in variable (memory) and convert it to binary Local Const $len = BinaryLen($memBitmap) ;get length of image Local Const $hData = _MemGlobalAlloc($len, $GMEM_MOVEABLE) ;allocates movable memory ($GMEM_MOVEABLE = 0x0002) Local Const $pData = _MemGlobalLock($hData) ;translate the handle into a pointer Local $tMem = DllStructCreate("byte[" & $len & "]", $pData) ;create struct DllStructSetData($tMem, 1, $memBitmap) ;fill struct with image data _MemGlobalUnlock($hData) ;decrements the lock count associated with a memory object that was allocated with GMEM_MOVEABLE $aResult = DllCall("ole32.dll", "int", "CreateStreamOnHGlobal", "handle", $pData, "int", True, "ptr*", 0) ;Creates a stream object that uses an HGLOBAL memory handle to store the stream contents If @error Then Return SetError(2, 0, 0) Local Const $hStream = $aResult[3] $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromStream", "ptr", $hStream, "int*", 0) ;Creates a Bitmap object based on an IStream COM interface If @error Then Return SetError(3, 0, 0) Local Const $hBitmap = $aResult[2] Local $tVARIANT = DllStructCreate("word vt;word r1;word r2;word r3;ptr data; ptr") DllCall("oleaut32.dll", "long", "DispCallFunc", "ptr", $hStream, "dword", 8 + 8 * @AutoItX64, _ "dword", 4, "dword", 23, "dword", 0, "ptr", 0, "ptr", 0, "ptr", DllStructGetPtr($tVARIANT)) ;release memory from $hStream to avoid memory leak $tMem = 0 $tVARIANT = 0 If $hHBITMAP Then Local Const $hHBmp = _GDIPlus_BitmapCreateDIBFromBitmap($hBitmap) _GDIPlus_BitmapDispose($hBitmap) Return $hHBmp EndIf Return $hBitmap EndFunc ;==>Load_BMP_From_Mem Func _GDIPlus_BitmapCreateDIBFromBitmap($hBitmap) Local $tBIHDR, $Ret, $tData, $pBits, $hResult = 0 $Ret = DllCall($ghGDIPDll, 'uint', 'GdipGetImageDimension', 'ptr', $hBitmap, 'float*', 0, 'float*', 0) If (@error) Or ($Ret[0]) Then Return 0 $tData = _GDIPlus_BitmapLockBits($hBitmap, 0, 0, $Ret[2], $Ret[3], $GDIP_ILMREAD, $GDIP_PXF32ARGB) $pBits = DllStructGetData($tData, 'Scan0') If Not $pBits Then Return 0 $tBIHDR = DllStructCreate('dword;long;long;ushort;ushort;dword;dword;long;long;dword;dword') DllStructSetData($tBIHDR, 1, DllStructGetSize($tBIHDR)) DllStructSetData($tBIHDR, 2, $Ret[2]) DllStructSetData($tBIHDR, 3, $Ret[3]) DllStructSetData($tBIHDR, 4, 1) DllStructSetData($tBIHDR, 5, 32) DllStructSetData($tBIHDR, 6, 0) $hResult = DllCall('gdi32.dll', 'ptr', 'CreateDIBSection', 'hwnd', 0, 'ptr', DllStructGetPtr($tBIHDR), 'uint', 0, 'ptr*', 0, 'ptr', 0, 'dword', 0) If (Not @error) And ($hResult[0]) Then DllCall('gdi32.dll', 'dword', 'SetBitmapBits', 'ptr', $hResult[0], 'dword', $Ret[2] * $Ret[3] * 4, 'ptr', DllStructGetData($tData, 'Scan0')) $hResult = $hResult[0] Else $hResult = 0 EndIf _GDIPlus_BitmapUnlockBits($hBitmap, $tData) Return $hResult EndFunc ;==>_GDIPlus_BitmapCreateDIBFromBitmapYou have to adjust the function for your needs appropriatly!2) besides _GDIPlus_GraphicsSetSmoothingMode() add also DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $GFX_Buffer, "int", 4) to activate antialiasing for fonts whereas $GFX_Buffer is the graphic backbuffer.Br,UEZ Edited April 11, 2012 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
arcker Posted August 23, 2011 Share Posted August 23, 2011 impressionnant travail, tu as bien dû galérer. De plus ça tourne sur de vieilles configs, pas mal ! 5 étoiles pour moi, without a doubt too. -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
xzhat Posted August 23, 2011 Share Posted August 23, 2011 Hi Buckmaster,tried your example, but got this result(screenshot).any clue why?It worked after conversion to exe... hmm Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now