Community Project ...not what you think...

BlitzMax Forums/BlitzMax Programming/Community Project ...not what you think...

Nate the Great(Posted 2010) [#1]
So I have an idea and I am praying it will work. In this project I will write one line of code... then someone else must write a line of code. This goes on until interest dies out, something to awesome to change is made, or if it goes off the deep end as they say.

Please discuss what you think of it, where you think its going, what you want it to look like, etc

Here are the rules:

Edit: if you find a nifty short piece of code in the archives post a link, this will speed up progress considerably. This must also be cross platform.
Also, please include a line number with your post or at least a way to determine where the line goes.



Must be cross platform.

No importing drivers or anything (that would cause a mess)

No one line if statements

when using loops, select statements and if statements and types and functions and methods you may put an endif or whatever command ends the loop to prevent errors

No code may cause an error.

No malicious code.

No stacking lines (if this is even possible in bmax)

You may include a comment as long as you like as long as it is needed.

All code is required to be strict but I will convert it to super strict simply for neatness
ex:
Local image = loadimage("myimage.png")

turns into
Local image:TImage = loadimage("myimage.png")


Email me any images you wish to use, I will only include them as they are used in code. And I will post any images in this thread along with their names which anyone is free to use. It may take me a week but they will get posted if they are appropriate and relevant.

Images must be .png format

I will make a webpage with code and images and a download if there is enough interest.

I will put the current code on this page as often as I can.

Statements may be inserted between lines.

You cant use maxgui or anything else that does not come with blitz max for both windows and mac

please post the entire function, type, or loop that your line is in and put manny apostrophes after your line. Then for clarity post the line by itself to insure no miscommunications!

I will read the posts in order!

You cannot use a variable that has not been defined.

These rules are pretty much common sense.

You cannot post twice in a row. Lets get started!

Ok heres what we have so far.



Brucey(Posted 2010) [#2]
It ain't going to work... :-)


slenkar(Posted 2010) [#3]
setdriver glmax2ddriver


lol


Czar Flavius(Posted 2010) [#4]
Graphics 800, 600



therevills(Posted 2010) [#5]
No removing or revising lines
- Sorry had to do it ;)

SuperStrict ' changed from Strict
SetGraphicsDriver GLMax2DDriver() ' proper syntax
Graphics 800,600,0 'open graphics

Type TSprite


{edit - Czar Flavius beat me with graphics - lol - Added Tsprite}


xlsior(Posted 2010) [#6]
This is sure to die a quick death - adding a single line at a time is going to be extremely limiting, since you have absolutely no program structure structure / goal.

I doubt that whatever comes out of this is going to be more advanced than your basic "hello world" program...

Of course, I'd be happy to be proven wrong. ;-)


kenshin(Posted 2010) [#7]
SuperStrict ' changed from Strict
SetGraphicsDriver GLMax2DDriver() ' proper syntax
Graphics 800,600,0 'open graphics
Type TSprite

End

:)
Only joking.
Good luck!!!


_Skully(Posted 2010) [#8]
That breaks "No code may cause an error."

   Field X:Float



Jim Teeuwen(Posted 2010) [#9]
Field Y:String


therevills(Posted 2010) [#10]
Field dx:float



Nate the Great(Posted 2010) [#11]
Field dy:Float


Thanks for catching that therevilles, feel free to point out any other syntax errors, and yes I forgot I said I will convert things to superstrict :)

since endtype goes with type that is added automaticly, as are if, select and loop statements
jim t, nice try, thats rediculous so I assume we will use a float instead ;)

this is the 'nitty gritty' part.

and yes it will work, :) all you have to do is scan the code and add a line where you think it is needed, when it gets to things like game logic please remember to explain your line :)

Updated first post.

anyone got any ideas of what kind of game? Its still up for debate as nobody has put any loop or logic in yet.


therevills(Posted 2010) [#12]
Field image:Timage


since endtype goes with type that is added automatically, as are if, select and loop statements


Im not sure about this - when do we know when something has ended?


anyone got any ideas of what kind of game? Its still up for debate as nobody has put any loop or logic in yet.


Hows about a Sonic platform clone? (with hills etc ;)) Flash The Snail?


Nate the Great(Posted 2010) [#13]
Field angle:Float



Im not sure about this - when do we know when something has ended?



you can add stuff in between lines... or is there something I am missing???

if you see a logical flaw with the if statements and such the post where the ending should go along with your ifs and add a short explanation of why

Hows about a Sonic platform clone? (with hills etc ;)) Flash The Snail?


Yeah I was thinking some sort of platformer or shootemup, something easy to build logically and step by step.

This is sure to die a quick death - adding a single line at a time is going to be extremely limiting, since you have absolutely no program structure structure / goal.


thats why we discuss what we plan in the comments


I doubt that whatever comes out of this is going to be more advanced than your basic "hello world" program...


Im sure there will be a lot more comming out of this than hello world.


Of course, I'd be happy to be proven wrong. ;-)



then add a line :)

thats the thing about this community project, no dedication is needed, just look at the new code and add a line every time you pop in to check the blitz blog :)


_Skully(Posted 2010) [#14]
   Field Velocity:float



Yahfree(Posted 2010) [#15]
Method Create:TSprite(_img:TImage,_x:float,_y:float)



Zeke(Posted 2010) [#16]
self.image=_img ; self.x=_x ; self.y=_y

heh. this is so dumb...


slenkar(Posted 2010) [#17]
Jim T - had to be a difficult git - lol
endmethod



Nate the Great(Posted 2010) [#18]
hmm I think we are still missing some fields

Field alpha:Float



thanks everyone! this is coming along for sure :)


SLotman(Posted 2010) [#19]
Is this a valid line?
Field blendMode:Int, Width:Int, Height:Int

LOL :)


_Skully(Posted 2010) [#20]
Nate the Great..

If you do a wrap up of the entries with line numbers then we can better "insert" missing information and offer corrections to existing ones (because if that can't happen this won't work)


Nate the Great(Posted 2010) [#21]
line 43 (the end of the program so far)
Type TPlayer


now we must decide what type of game to make... platformer? shootemup? mmorpg? lol rts? tower defense?

yes slot man that is fine. Ill break it up for neatness though.

Skully - I see what you are saying, how would I go about doing that manually?? there is no line numbering in bmax :(

edit: oo I didnt know blitz max showed the line number in the lower left corner. Please include the line number of your code for now, unless I can get something else figured out. :) It should be simple as typing the line in the program and then putting your cursor on the new line and looking in the lower right hand corner of the window :)


therevills(Posted 2010) [#22]
   Field score:Int = 0



GfK(Posted 2010) [#23]
So I have an idea and I am praying it will work
If you're resorting to prayer before you've even started...
End



Brucey(Posted 2010) [#24]
GfK, you're meant to provide the line number with that. Let me fix that for you...
1   End

:-)


Nate the Great(Posted 2010) [#25]
line 45
Field sprite:TSprite


@Brucey, lol end would go under the banned commands and using common sense :)

@GfK I wasnt sure of its success at first, but now I am confident it will work if people keep just adding a line whenever they feel like it. Why not add a realistic line instead of just trying to bash something that isnt doing you any harm?


therevills(Posted 2010) [#26]
Field lives:Int


BTW Nate, my user name is therevills not therevilles ;)


Nate the Great(Posted 2010) [#27]
line 47
Field x:Float


lol I didnt realize that, ill change it :)


AdamRedwoods(Posted 2010) [#28]
Field fingersOnHand:Int



_Skully(Posted 2010) [#29]
Nate the Great

Regarding...
Field x:Float 'Nate the Great


Sprite already contains a location... is there a need to repeat it?

   field destx:float,desty:float



Yahfree(Posted 2010) [#30]
Field Bullets:Int



Nate the Great(Posted 2010) [#31]
in the tsprite type:
Global list:TList = New TList


@skully, I'll remove it, thanks for pointing that out :)

@AdamRedwoods, shouldnt that be a constant ;) If you really see a use for it and explain it then ill add it.


_Skully(Posted 2010) [#32]
Field MagazineSize:int=64

You should remove
No removing or revising lines
because thats obviously going to happen occationally.


GfK(Posted 2010) [#33]
Why not add a realistic line instead of just trying to bash something that isnt doing you any harm?
Well, because its stupid. Its taking up server space that somebody is having to pay for, and its clogging up a forum that's meant for programming help. However you dress it up, its just another of those bloody irritating word association games that seem to plague every forum these days.

That's why.


Nate the Great(Posted 2010) [#34]
at the end of method create in type tsprite:
list.addlast(self)


@Skully- done


Czar Flavius(Posted 2010) [#35]
Can we insert lines in the middle? Otherwise we're not going to get any more methods for our two types.


Nate the Great(Posted 2010) [#36]
yes of course, its in the rules too. lol