SDL UDF
#21
Posted 25 June 2009 - 07:31 PM
#22
Posted 25 June 2009 - 08:15 PM
I haven't done any serious benchmark's but It should be faster than GDI+I'll try to make use this for a little game, let's see how fast it is
Please tell me if you would like any special benchmark's or examples created
Edited by AdmiralAlkex, 25 June 2009 - 08:17 PM.
#23
Posted 25 June 2009 - 08:20 PM
Little example of what I got
#include "SDL v10.au3" #include "SDL_image v1.au3" _SDL_Init_image() _SDL_Init($_SDL_INIT_EVERYTHING) $Surface = _SDL_SetVideoMode(640, 480, 32, $_SDL_SWSURFACE) $map = StringSplit(FileRead("map.txt"), ',') $ii=0 For $i = 1 To $map[0] $Loaded1 = _IMG_Load("C:\Documents and Settings\lars\Desktop\AutoIt Game (SDL TEST)\Sprites\" & $map[$i] & '.bmp') _SDL_BlitSurface($Loaded1, 0, $Surface, _SDL_Rect_Create($ii, 96, 32, 32)) $ii +=32 Next _SDL_Flip($Surface) While 1 WEnd _SDL_Quit() _SDL_Shutdown_image()
Any faster way I could do that?
And is _SDL_Flip really function is a bit misleading lol, (the name) is it really done to show the rendered things?
Edited by Zisly, 25 June 2009 - 08:22 PM.
#24
Posted 25 June 2009 - 09:21 PM
About _SDL_Flip(), it's actually for "flipping" the screen buffers when using doublebuffered (hardware?) rendering. When used like in your script it's the same as _SDL_UpdateRect($Surface, 0, 0, 0, 0)
#25
Posted 25 June 2009 - 09:28 PM
Working on a tile based game just for fun now, the hard part will be rendering the character
#26
Posted 25 June 2009 - 09:45 PM
Ah well you know where to find me if you need help
#27
Posted 26 June 2009 - 01:00 AM
#28
Posted 26 June 2009 - 05:06 PM
P.S. A cookie to the one who knows where the quotes in the MsgBox is from
It's from Startrek... It was the vulcans motto. I think it was first said by Spock in the first series ever produced.
Regarding your SDL library... YOU DID A GREAT JOB!
I have been waiting for this since I joined the forums back in 2006 and saw on the first page of Autoit's website "Feaures: bla bla bla... you can make games calling the SDL library... bla bla bla". I think they erased that part when, in jan 2008, I actually asked for an example here
Keep up the good work! I'll most likely want someday to make a game.
Thx!
Edited by madflame991, 26 June 2009 - 05:24 PM.
#29
Posted 26 June 2009 - 06:32 PM
#30
Posted 26 June 2009 - 06:38 PM
Edited by Zisly, 27 June 2009 - 01:40 AM.
#31
Posted 27 June 2009 - 10:46 AM
Edited by JRSmile, 27 June 2009 - 10:46 AM.
#32
Posted 02 August 2009 - 06:14 AM
New update uploaded.
Implemented SDL_sprig:
Advanced library dealing with 2D graphics, Surfaces and more.
Implemented SDL_sge:
More basic library dealing with 2D graphics, and more.
Updated SDL_gfx:
Implemented functions for controlling framerate (tested and 100% working)
Lots of other things done:
Fixed SDL_WarpMouse()
Added new _SDL_WM_GetCaption() from Progandy
Fixed _SDL_SaveBMP_RW()
New example: SDL Example Convert Image to BMP.au3 (loads any image in the usual formats and spit out a bmp)
+Lots of minor(ish) things. Run your favourite file comparing utility and check for yourself if you are curious
Please note that SDL_sprig and SDL_sge was (mostly) automatically converted by a tool I built and not by me. That means that the local variable-names look like crap, but it saved me a shitload amount of time to not have to write around 200 funcs. I will try to find a way to clean them up in a future update.
Download is as usual in second post.
@madflame991
You won the cookie! Swing by my place next time you go to Sweden and I will buy you the biggest one I can find
P.S. Did you see the reference in SDL.au3? It's not really hidden, but you need to have seen VOY to get
@ProgAndy
Thank you, it's really nice to see some contributions. This function is included with V.11 and forward.
@JRSmile
Not that I know off, SDL was created to make games, not interface with them.
#33
Posted 05 August 2009 - 06:22 PM
And remember that "q" is for exiting the scripts with a SDL gui so you don't panic when you run "SDL Example WarpMouse.au3"
#34
Posted 07 August 2009 - 04:27 AM
I just gotta test the UDF later today
#35
Posted 07 August 2009 - 05:00 AM
Well there wasn't anything spectacular, both sge and sprig is mainly for primitives. I highly recommend sprig if you are into that kind of things, it has loads of more options (and a bit better speed to) than the others.I didn't notice the update until now
![]()
I just gotta test the UDF later today![]()
Next update will probably be released next week, and should (if nothing unexpected happens) have sound and events implemented. More details when that day come
You know, I could send you a message when I update it if you want, just add the hotmail-address in my profile to your Live Messenger
#36
Posted 07 August 2009 - 01:36 PM
#37
Posted 07 August 2009 - 03:03 PM
That's not really needed. There already exist an OpenGL UDF written by trancexx.OMG i will love you forever if you add 3d
#38
Posted 07 August 2009 - 03:06 PM
That's not really needed. There already exist an OpenGL UDF written by trancexx.
Wow thanks see me and liek 20 other guys from auto it are trying to start on and cretes the first 3d Game in autoit, we have done 3d games(Bad Graphics) in C++ Etc, never improved on them so we think we know the concept just neede to find out how to load 3d objects you helped TY
#39
Posted 07 August 2009 - 03:11 PM
Maybe you should look at the Au3IrrLicht too, it's quite impressive for being free and all.Wow thanks see me and liek 20 other guys from auto it are trying to start on and cretes the first 3d Game in autoit, we have done 3d games(Bad Graphics) in C++ Etc, never improved on them so we think we know the concept just neede to find out how to load 3d objects you helped TY
#40
Posted 09 August 2009 - 05:21 AM
tho running your png in gui example, ive come to an issue. where would i be able to specify were on the gui to draw the image
Edited by Suirad, 09 August 2009 - 05:21 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users





