B4X - Game Competition 2016 [CANCELED]

Status
Not open for further replies.

LucaMs

Expert
Licensed User
Longtime User
Well, perhaps I understood well (something like nerd?).

Rules for good programming exist and are commonly recognized.

Readibility is not only comments. First example that comes to my mind:
B4X:
If Variable1 < Variable2 And (Variable2 >= Variable3) And Condition1 = False Or Condition2 = True Then

B4X:
If Variable1 < Variable2 _
   And (Variable2 >= Variable3) _
   And Condition1 = False _
   Or Condition2 = True _
   Then

Personally, I read better the second method. It is anyway a single line, but an editor could show 5 line numbers.


Maintenance
You can write many lines of code directly in a view event handler routine.
If you create a separate routine and call it from the view event handler routine you have to write at least one addition line of code; even more if you create a code module (or class) that contains this routine; but the maintenance will be easier.


I'm not a professor (nor "first class" / nerd), but you can find many better examples about these topics.


If you want to continue this argument, we should to do it elsewhere ;)
 
Last edited:

sorex

Expert
Licensed User
Longtime User
if your completed game fits in 500 lines you can keep it like it is and use the multiline if/then.

if not you need to optimize things to make it fit.
 

andymc

Well-Known Member
Licensed User
Longtime User
Come on people, let's do this.

I'll throw my hat in the ring with "Frogger" 1981 by Konami:

Other suggestions people could go for would be :
Robotron 2084 : Pacman : 1980 - Midway - Defender: williams 1980 - Galaga: 1981 - Namco -

I think all these games could have good versions written in under 500 lines, it would take more to write the entire game, but you could do a good job in less than 500 using canvas based graphics I'm sure.
 

ilan

Expert
Licensed User
Longtime User
I'll throw my hat in the ring with "Frogger" 1981 by Konami:

great choice @andymc and lot of luck.

i really like your suggestion list. PacMan is a must in this competition. i hope someone will take the challenge. if i remember correct @Informatix uploaded a pacman example maybe he would like to join this competition and win a free b4i license ;)
 

sorex

Expert
Licensed User
Longtime User
Maybe it's wise to rule out games that appeared as examples/tutorials already from Erel, AndyMC, Informatix...?
 

andymc

Well-Known Member
Licensed User
Longtime User
Yeah, okay, I agree maybe pacman should not be included.
But I would recommend picking games from the 80s rather than 90s as these games were much simpler and it should be easier to do a good job in 500 lines of code.
I've not written much not using LibGDX so will have to see what I can manage with canvas graphics.
 

ilan

Expert
Licensed User
Longtime User
Sounds great! I think I will try with Galaga :)

great, i will update the first post :) good luck

Yeah, okay, I agree maybe pacman should not be included.

why andy? pacman is THE 80s game. and informatix did this game but he used a game engine so the real challenge is still there and he also did not used the original graphics.
i think pacman can and should take part on this competition and we can count on people here to be fair and make their own code.
 
Last edited:

andymc

Well-Known Member
Licensed User
Longtime User
why andy? pacman is THE 80s game. and informatix did this game but he used a game engine so the real challenge is still there and he also did not used the original graphics.
i think pacman can and should take part on this competition and we cant count on people here to be fair and make their own code.

Sorry, you're right, let's leave it in, any game will be fine then.
 

ilan

Expert
Licensed User
Longtime User
I have a new passion: running, and my time behind a computer at home is now very low, so I won't participate but I will be glad to test the created games.

Great, thanx @Informatix
I am happy to have u as a judge in this competition. And you also motivated me to get back jogging :)
 

andymc

Well-Known Member
Licensed User
Longtime User
I have a new passion: running, and my time behind a computer at home is now very low
Same here! I just beat my half marathon time last Sunday, just under two hours! I'm training for a full marathon at the end of October. I manged a sprint finish for the last 300m of the half, so am in high spirits for the full one. but yes, my spare tiem right now is taken with running, I'll try to find a few hours to code up a 500 line game though.
 

ilan

Expert
Licensed User
Longtime User
What about classes and code modules? Can we use them? and how are the lines counted? :)

if we take b4a as example from Activity_Create the lines are counted. also blank lines will be counted so when you deliver the code remove blank lines.
you can use/create classes/code modules but every line there will be also counted (in classes from intialize event)

so only declaration of objects that happens in sub globals will not be counted.

you may use libs that came installed with b4x but as more libs you use you get less points. (see point system)

Note that you dont need to copy the whole game only 1-2 levels. that should be possible :)
 

sorex

Expert
Licensed User
Longtime User
Grandslam... their Amiga version looks bad aswell.

The point was the game title "The running man" ;)
 
Status
Not open for further replies.
Top