Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / AGK Challenge 1

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 3rd Dec 2021 17:34
In the early days, several of us participated in code challenges in DBC and DBP as set by the forum community. This went on fairly consistently between 2005 and 2010 and now I'd like to bring it back for AGK.

For those new to the forum (new as in the last 10 years), the rules are simple.

Rules:
1. Code must be runnable with a simple copy and paste from forum to the IDE. (Tier 1 code only)
2. No external media. Graphics and sound must be generated with code. This includes no downloading/linking to online files elsewhere.
3. The person who selected the challenge is the judge. Should they fail to select a winner within a reasonable time after the challenge ends then the previous challenge's runner-up will be responsible for selecting a winner.
4. Challenge winners are tasked with choosing the next challenge in which they will judge.
5. Judges may enter for fun, but cannot be selected as a winner of their own challenge


As TGC currently has a larger competition going on right now I'd like to keep this short and simple. Perhaps as a small break for those working on their tower defense games and give them a chance to clear their heads.

Challenge: Screen saver
Deadline: Monday , Dec 6 at midnight (you got the weekend)
Details: Think of the old star field screen saver, or the bouncy lines. Maybe some 3D text bouncy around.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 4th Dec 2021 05:27 Edited at: 5th Dec 2021 05:54
I'm using AGKS and I'm not used to playing with 2D but thought I'd have a go.
Key P to save a screenshot.
You can change sprite_total=5000 from 1 to as high as you like.



BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 4th Dec 2021 11:20 Edited at: 4th Dec 2021 11:21
Hi there
@ando That looks really nice let see if I find something to add here

Cheers.
I'm not a grumpy grandpa
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 4th Dec 2021 12:30 Edited at: 4th Dec 2021 13:01
Glad you like it. It's a little mesmerizing too.
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 4th Dec 2021 14:34
That's pretty cool, good first entry! Hope we see more
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 5th Dec 2021 20:15 Edited at: 5th Dec 2021 20:29
Hi There. I have tried to convert some of my old darkbasic codes, but in AppGameKit some graphical commands work differently . Now that we are in christmas parties , trying to emulate ando's code , I made something like christmas twiddler ....nothing serious ....just to bring up this thread.

I'm not a grumpy grandpa
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 5th Dec 2021 22:06
Nice! And the graphics are very fast!
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 6th Dec 2021 04:37
Very basic starfield, Memories...

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 6th Dec 2021 05:25 Edited at: 6th Dec 2021 05:45
why not?


Attachments

Login to view attachments
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 6th Dec 2021 09:07
I've not used a screensaver for many years but back then I always used the starfield. Too much star trek I guess.

The drop screensaver.... it looks cool but I think I'm sitting too close to a big screen for that one. Messes with my head.

Cool what you can do with so little code.
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Dec 2021 10:38 Edited at: 6th Dec 2021 10:40
Fun examples here. I'm not trying to compete but to fiddle with the code a bit . I don't even know if we can put more than one example ....any way here's an old code I made when I started with Agk.




I'm not a grumpy grandpa

Attachments

Login to view attachments
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 6th Dec 2021 11:17
OK chafari, that one looks so good. Wow.
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 7th Dec 2021 16:55
@chafari that first one makes me think of tinsel.

Starfield is always a classic

I think Virtual Nomad is trying to trigger a seizure in me!


Quote: " I don't even know if we can put more than one example"

You can submit as many entries as you want.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 11th Dec 2021 13:46 Edited at: 11th Dec 2021 14:19
it's well past the deadline and i want to see this continue so, if i may step in as the alt judge:

rich: classic with effective utilization of our toolbox in particle usage and the only entry to consider mousemove functionality as a screensaver. for me, that should have continued to include fullscreen functionality but stirred forgotten memories of "it's magic!" so +1

VN: fullscreen functionality as a screensaver "protecting" every pixel on the screen from burn. alas, may bend the mind (which i personally don't mind but not generally acceptable behavior)

ando: that's purdy tho complete randomness can allow for much of the screen to be ignored and some pixels left to burn. +1 for raising the bar in aesthetics right off the bat. +1 for savescreen, -1 for filling up my harddrive

chafari's xmas twidler: effectively declares it's intention and paints the picture. it seemed like some hidden AI was guiding the brush which was fun to watch.

chafari's himnotic: adds the next dimension and fills the screen with goodness. this is the type of screensaver i remember staring at for hours.

winner:


now, see Rule 4 above

and, yes, i did note the post time vs deadline. as the starter challenge, i saw it as a soft deadline, so... going forward, judges should declare GMT/time zone? i used this site for the TD comp to make sure we are all using the same clock: http://time.unitarium.com/utc/1159pm
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 11th Dec 2021 19:36
Yes, meditate with himnotic. All other worldly thoughts fall away....as......I........stare......at...........
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 12th Dec 2021 09:58 Edited at: 12th Dec 2021 10:12
Hi there.
I have never won anything in my life...I feel like a kid with a pocket full of candy Do you remember the famous snes mode 7 ... I always wondered how they could get that effect on those old computers....it was like a mix of old raycasting adding a ground .

You could create a scene in mode 7 and some objects such as trees, animals etc that rotate in 360º while we move with the camera. I know that we are now somewhat busy with the Christmas holidays so instead of one weekend , you have to weeks time, in order to have much more time with our family .

Challenge: mode 7
Deadline: Sunday , Dec 26 at midnight (you got two weeks)
Details: you could try something like a floor with some objects or a raycasting with some enemies


Edit : All must be made in 2D drawing as in the past old PC
Here's an example I made some time ago in TIC 80 fantasy console .

I'm not a grumpy grandpa

Attachments

Login to view attachments
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 12th Dec 2021 14:04
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 13th Dec 2021 11:51
Yah, those equations are way beyond my limited math skills, but I have an idea on “faking it” as well.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 13th Dec 2021 23:51
Sorry everyone! Pretty bad when the guy tries to kickstart this fails to show up. My brother got shot last week and this thing just totally slipped my mind. Or maybe I just secretly wanted to test the rules and see if anyone would carry on in my absence!

Glad to see a spark in interest and everything has continued.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 13th Dec 2021 23:56 Edited at: 13th Dec 2021 23:58
Quote: "My brother got shot last week"

jeebus. i hope he's alright. and don't apologize when life happens

ps, get to work on this.
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 14th Dec 2021 00:33
Quote: ""My brother got shot last week""


I am praying for you

Sorry to hear about this.

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 19th Dec 2021 18:28 Edited at: 19th Dec 2021 21:16
No one ?

Just for a break !
Mother M protecting b from d

I'm not a grumpy grandpa
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 20th Dec 2021 13:49 Edited at: 20th Dec 2021 15:37
Quote: "No one ?"

sorry. i'm not up for learning about mode 7 right now

and i expect similar for others? maybe give us an alternative challenge?

actually, i think you already did! i'm already working on a "text-based" entry. stay tuned!
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 20th Dec 2021 16:46
Quote: "actually, i think you already did! "


Yeah...perhaps I jumped the gun with such a big jump from screen saver to mode 7
Feel free to set up a new challenge....text-based game is Ok...
I'm not a grumpy grandpa
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 20th Dec 2021 18:29 Edited at: 20th Dec 2021 19:18
Quote: "text-based game is Ok"

then it's official

Judge: chafari
Challenge: text-based game
Deadline: Sunday , Dec 26 at MIDNIGHT UTC

my entry: FLY HARD!


my high (so far).

i may tweak this until the deadline!

and, yeah "Walls.length" = i had other plans

otherwise, let's keep these challenges going, guys. lots of fun to be had!

Attachments

Login to view attachments
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 20th Dec 2021 21:23
that's very funy .....this reminds me of those old games in which not everything was the good graphics but the ingenuity of the game ....my best 11 points
I'm not a grumpy grandpa
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 23rd Dec 2021 02:29 Edited at: 23rd Dec 2021 02:31
mini-update: started off too slow, saves high score.

FLY HARD!
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 25th Dec 2021 18:49
Nice one VN. And it's more playable than the version that comes with my phone.

Also, this UTC site is trying to confuse me (which is easy to do).
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
Arch-Ok
AGK Developer
5
Years of Service
User Offline
Joined: 11th Jul 2019
Location: Bursa/TÜRKIYE
Posted: 26th Dec 2021 14:52 Edited at: 26th Dec 2021 21:25
Good topic, great examples.

Here you are 3 in 1

Enjoy (Use A and D keys in PC usage)



chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 26th Dec 2021 19:02
Holly molly! @Arch-Ok ....just when I thought that no one else would participate .....no doubt you have taken it at face value ....something like raycasting made with text . At first this is more or less what I meant by mode 7 or raycasting ...I've been stunned with your code ...Thanks for participating .
I'm not a grumpy grandpa
Arch-Ok
AGK Developer
5
Years of Service
User Offline
Joined: 11th Jul 2019
Location: Bursa/TÜRKIYE
Posted: 26th Dec 2021 20:56
@chafari you are welcome. Just don't use the _CLS_() command, it is not necessary since we visit every chars on the screen. Floor texture calculating is also a little buggy. Enjoy!
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 26th Dec 2021 21:10
very nice, Arch-Ok!

and, now i have some code to study
Arch-Ok
AGK Developer
5
Years of Service
User Offline
Joined: 11th Jul 2019
Location: Bursa/TÜRKIYE
Posted: 26th Dec 2021 21:27
thank you @Virtual Nomad, I've cleaned the code alittle bit.
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 26th Dec 2021 22:58 Edited at: 26th Dec 2021 23:16
Here is my noobie attempt.
Use arrow keys.




BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.

Attachments

Login to view attachments
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 26th Dec 2021 23:42 Edited at: 26th Dec 2021 23:43
@ando That's really fun....it has kinda AI ....at first try I didn't understand but this is really addictive . Thanks for participate
I'm not a grumpy grandpa
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 27th Dec 2021 00:07
Hi there. In the very last moment, we have another code . I have never been a judge and the truth is, it is not easy to decide which is the best code . I see myself in a big dilemma since all three codes are very good .

- Flay Hard is a game that you can play and try to beat your score .
- The raycasting code is not a complete game ... I know but the creation of the scene also with its floor and sky in mode7,and all done with text texture is really amazing .
- ando's code is very well elaborated ...you can also have a good time trying to make your way opening and closing corridors.

If I have to be fair, I must not only value the attractiveness of the design but everything as a whole .If I have to be honest I think the one who deserves to win the challenge is....

winner:
I'm not a grumpy grandpa
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 27th Dec 2021 00:21
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 27th Dec 2021 01:05
Thanks for the win chafari.

And thanks to Virtual Nomad for recently uploading a mapping method.
Perfect timing and just what I needed so the trophy can spend 6 months of the year at your place.

So it's on me to make a challenge..... hmm I want to keep it fairly easy so...

Including the 5 rules from the first post, how about..

Challenge: make something fun to play in 100 lines of code or less.
Deadline: Sunday , Jan 2 at MIDNIGHT UTC

Scoring will be mostly based on the fun level first. Extra bonus points for having the least lines of actual code.
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
Arch-Ok
AGK Developer
5
Years of Service
User Offline
Joined: 11th Jul 2019
Location: Bursa/TÜRKIYE
Posted: 27th Dec 2021 05:48
Great job ando, actually it is really fun to play your game, congrats
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 27th Dec 2021 06:33
Thanks Arch-Ok. I actually made doors move like that about 1990 on a C64 using it's keyboard graphics. Memories...

I first wanted to make a 2D basic tron game but it would have been limited to 2 player unless I could come up with some "good enough" AI.
That was the first game I made with the C64. It was simple but my friends and family played it heaps. Tended to make people yell when they crashed. lol
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 29th Dec 2021 01:53 Edited at: 29th Dec 2021 01:58
For anyone interested. I can't enter this last mini challenge coz I'm the judge this time but I can make a little something anyway.

Objective - see how few jumps it takes to jump on the gem. Erm... it's at the top. I got it in 27 jumps so far.
Mouse to look
W A S D to move
Spacebar to jump

Two pieces of code. They are the same except the first is less readable being squeezed just about as compact as I could get it.
35 lines.



The second has 97 lines and more readable.
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 29th Dec 2021 10:19 Edited at: 29th Dec 2021 10:21
@ando Nice one !... I have to try several times until I realize that the best way was jump and look down to land on blocks ....I got it in 31 jumps but in the end when I take the gem the screen freezes . I add a line to force the program to create always the same figure ....just before main bucle "for i=1 to maxBoxes " I added SetRandomSeed(1) .
I'm not a grumpy grandpa
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 29th Dec 2021 12:18
Thanks chafari, I added your random seed code so a pattern can be repeated.
I took out the freeze and made the jump counter reset to 0 if you fall to the ground.
It is a simple little game but it can be a challenge.
99 lines
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 29th Dec 2021 21:26
@Arch-Ok that's pretty sweet. It reminds me of a spotlight demo I did in DB but taken to the next level!

Glad to see so many people participating in these.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Arch-Ok
AGK Developer
5
Years of Service
User Offline
Joined: 11th Jul 2019
Location: Bursa/TÜRKIYE
Posted: 2nd Jan 2022 01:26
Thanks @Phaelax...

Here is my code, which can not be readable even by me now, lol

enjoy;


Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 2nd Jan 2022 01:48 Edited at: 2nd Jan 2022 01:51
very cool, Arch-Ok.

it's a little different from similar games where alternating rows are staggered and it seemed i could shoot some gaps that i couldn't in others but i was never able to clear the board in those, so... no complaints, here

Attachments

Login to view attachments
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 2nd Jan 2022 02:35
Excellent. Only played one game so far, nearly cleared it a couple times then finally got it.

I find these kind of games are good for meditation.
(and new high score, yay)
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 2nd Jan 2022 07:30
Only ten lines. Probably could be optimized for a couple less. Use the arrow keys to shift your dome, and last as long as you can.

ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 2nd Jan 2022 08:44
That's very compact and also very hectic, got my blood pumping.
I played a bunch of times and my best score was 44.3 seconds.

Thanks for entering these mini challenges and thanks to everyone that entered, it's been fun.

After this round though, I'm going to have to have a break as I have to work on my Tower Defence project.
I still have a lot of work to do.
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.

Login to post a reply

Server time is: 2024-11-24 04:19:10
Your offset time is: 2024-11-24 04:19:10