Drawing functions

Post here your demos and examples with the source files.
Forum rules
Always post the games with a screenshot.
The file must have the ged and data files (complete game source)
Use the forum attachment to post the files.
It is always better to use the first post to put the game files

Postby DilloDude » Tue Feb 20, 2007 1:13 am

Most of the codes are fairly simple. Once I have enough functions to make it worthwhile I'll post the lot. Most of the functions could also be modified like the elipse script to be squashed (IE you could have a spiral that's eliptical instead of circular). If anyone can think of some other good additions (that aren't too complicated) I'd be happy to add them.

I will include all the code to make the above images, plus the extra for those which are too big to post. You get a cool result if you enable all the code at once!
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby DilloDude » Tue Feb 20, 2007 9:03 am

I have decided to release the ones I have now, as I don't have any good ideas for more. If I think of more, I'll post them here.
In the 'shots' folder there are some screenshots, most of which I've posted here previously. The code to draw these is in the create actor of Canvas. Just uncomment the script(s) you want to use. (If you are using more than one, you only need to uncomment the 'int i;' line from one of them) In the draw actor event, there is code to make a rotating spiral (this takes a lot out of the framerate, so you wouldn't want to actually use it in a game, but if you have a screen capture program that can capture an animation, you could use it elsewhere.) Reference.rtf contains info on all the functions, with examples, tips, and explanations of what the function parameters do. If you have any problems, just ask. Functions.c contains the separate functions, so you can easily use them in another project.

Special thanks to my dad, for the elipse rotation, and to Novice, for posting the original code which inspired me.

If you write any fancy scripts to draw cool patterns, using these functions, you can post the code here, and let everyone see it. On the other hand, you could be stingy and keep it to yourself, but it's nicer to let other people see it, so they can tell you how awesome it is.
Attachments
MoreDrawingFunctions.zip
Finally, after all that rant, here is the file! Enjoy!
(469.62 KiB) Downloaded 406 times
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby Novice » Tue Feb 20, 2007 12:18 pm

Cool, it's nice to see somone took it further.
Why do i always get stuck?
User avatar
Novice
 
Posts: 399
Joined: Mon Aug 29, 2005 10:54 am
Location: Relative
Score: 5 Give a positive score

Re: Drawing functions

Postby JoshWiker » Fri Jun 04, 2010 10:02 pm

I downloaded the code and put it in the global code and created a canvas,
and it says there are errors in the code:
error line 7: illegal function definition in ex576934288592
error line 16: undeclared identifier^ xrad
error line 17: undeclared identifier^ xrad
error line 18: undeclared identifier^ xrad
error line 19: undeclared identifier^ xrad
error line 23: undeclared identifier^ red
error line 26: undeclared identifier^ xrad
error line 26: undeclared identifier^ yrad
error line 36: redeclaration of parameter 'draw_square'

error line 74: redeclaration of parameter "draw_triangle'

error line 108: redeclaration of parameter 'draw_star'

error line 162: expected ;


I think your .c attachment is corrupt.
please check it out, and let me know.
I'm working on a classic arcade pac-man game.:) :) :)
User avatar
JoshWiker
 
Posts: 2
Joined: Fri Jun 04, 2010 1:52 am
Score: 0 Give a positive score

Re: Drawing functions

Postby makslane » Sat Jun 05, 2010 12:12 am

I have loaded the file and it looks ok (by replacing the code in the ged file or creating a new game and adding the .c file)
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Previous

Return to Game Demos

Who is online

Users browsing this forum: No registered users and 1 guest

cron