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 code challenge

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Dec 2016 15:54
Looking good already
The best part of these challenges is seeing things you wished you'd thought of yourself.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
damothegreat
User Banned
Posted: 1st Dec 2016 22:27 Edited at: 19th Jan 2017 19:25
...
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 2nd Dec 2016 06:01
There have been a number of community projects started over the years (I dont think any completed) though none in recent years. Best move this to another thread I think.


A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
http://games.joshkirklin.com/sulium
Dybing
13
Years of Service
User Offline
Joined: 12th Sep 2011
Location: Bergen, Norway
Posted: 3rd Dec 2016 22:18
@damothegreat: count me in for doing the server backend - though it won't be AppGameKit but Go.

Speaking of which, I'd love to participate in these challenges, but I am buried up to my neck in work at the moment. Incidentally doing backend stuff. but maybe in a months time or so, in the newyear when the bubbly-wine effect have worn off

Anyhow, good show chaps - keep it up!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Dec 2016 19:38
Though some progress has been made in past community projects, I don't think anything has every been fully completed.

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
damothegreat
User Banned
Posted: 6th Dec 2016 21:42 Edited at: 19th Jan 2017 19:26
...
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Dec 2016 09:25
I am a Project Manager in my day job, and based on previous observations of this kind of thing being attempted, I wouldn't want to lead it
I'm not saying it's a bad idea or that people have the wrong intentions, but over time people lose the commitment expected by others, dependencies are essential but get broken, communication is sometimes non-existent and frustrations creep in very quickly.

If you want to do it, you need people who are willing and able to commit, have a central communication channel, and will involve themselves in verbal discussion, not just email and forum posts.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 7th Dec 2016 20:52
Another thing I noticed in the past is that folks will start having different opinions about the direction of the project. It's one thing to write a program you don't like when you're getting paid, it's another to get people to do it for free when they have different ideas. It'd only work if folks are willing to accept the PM's decisions. Personally, I hated my PM at my old job. She didn't have a clue about how anything in IT worked and it was very frustrating dealing with her demands. You don't go to your .net developer and tell them they have to write in java from now on. No it's not the same thing. No, we can't just reboot the servers. Not to mention having 3 days to prepare a presentation to the content team on how to interact with websphere, something I've never touched myself at that point. Ok, rant over.

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 8th Dec 2016 11:07
Do we have any more contenders for the Tweening challenge?
Or has Damo scared you all away
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 9th Dec 2016 03:00
I'll try to get something in, but not promises. Deadline is saturday right?

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 9th Dec 2016 14:30
Yes, Saturday is D-Day
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
damothegreat
User Banned
Posted: 10th Dec 2016 12:52 Edited at: 19th Jan 2017 19:26
...
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Dec 2016 18:44
Damo wins by default. But this doesn't take anything away from his entry. It's a good demo of using tweens, and a nice effect that could be used in a game.
It also shows you can run a lot of tweens simoultaneously with good performance.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
damothegreat
User Banned
Posted: 12th Dec 2016 20:03 Edited at: 19th Jan 2017 19:26
...

Attachments

Login to view attachments
damothegreat
User Banned
Posted: 15th Dec 2016 23:39 Edited at: 19th Jan 2017 19:28
...
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 16th Dec 2016 07:57
I think that people may be put off by the mammoth task you have set.
There are quite a number of different challenges all rolled up into one here.
Maybe a more simple task would attract more people?
AGK V2 user - Tier 1 (mostly)
damothegreat
User Banned
Posted: 16th Dec 2016 11:13 Edited at: 19th Jan 2017 19:27
...
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Dec 2016 13:27
I've been away, I normally watch this thread.

I would have to agree that this is pretty tough for a coding challenge. Usually it is something that everybody can do in a basic form, and the difference is how much more people add to the basic solution.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
damothegreat
User Banned
Posted: 16th Dec 2016 14:18 Edited at: 19th Jan 2017 19:28
....

Attachments

Login to view attachments
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 16th Dec 2016 15:56
I'll try to knock something up on Sunday morning in the coffee shop - still no interwebs at home
AGK V2 user - Tier 1 (mostly)
Dybing
13
Years of Service
User Offline
Joined: 12th Sep 2011
Location: Bergen, Norway
Posted: 17th Dec 2016 09:24 Edited at: 17th Dec 2016 09:31
Mod: please delete this post, as I double posted...
Dybing
13
Years of Service
User Offline
Joined: 12th Sep 2011
Location: Bergen, Norway
Posted: 17th Dec 2016 09:26 Edited at: 17th Dec 2016 11:16
Aaaah, one that I can throw in an entry to - mainly because I have already done such a little project. Though mind you, mine was meant to prototype something similar using actual RGB LEDs which is why it uses fuzzy dots rather than any text or fonts...

Anyhow, link to download: https://app.box.com/s/1okg7plf8fhrj54u65mj6lsw8c9jepxt

(I know, no draw commands as such, I used a teeeny little sprite and I am too lazy to change the code... But the sprite-image is so small it is almost insignificant, right?!)

edit: oh, and with minimal effort, and assuming you got a Raspberry Pi, the rgb-LEDs and some other bits and bobs, you can mod the code to actually make a nice shiny clock. Though for my project, this was just a proof of concept. Actual code to drive the LEDs will be in C and run on an Arduino. Well, Arduino use C++, but you can write the code in C style. None of that OOP rubbish.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Dec 2016 12:01
Quote: "(I know, no draw commands as such, I used a teeeny little sprite and I am too lazy to change the code... But the sprite-image is so small it is almost insignificant, right?!)"


Technically it is not valid. But you could draw your LED, GetImage() and then you have a valid entry.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
damothegreat
User Banned
Posted: 17th Dec 2016 12:22 Edited at: 19th Jan 2017 19:29
...
damothegreat
User Banned
Posted: 17th Dec 2016 19:28 Edited at: 19th Jan 2017 19:29
...
Dybing
13
Years of Service
User Offline
Joined: 12th Sep 2011
Location: Bergen, Norway
Posted: 18th Dec 2016 03:32 Edited at: 18th Dec 2016 03:41
Allright, allright, new version with no external media imports: https://app.box.com/s/nhr6wcf69de9ig0hhih9zln3a6300c3w

Though I did not use any draw commands or anything like that. That would require a bit of code and stuff. Here I just commented out the loadImage() part, added a white pixel using createImageColor() and blew that up to 25x25 pixels in my sprite-drawing function. Which was just editing an existing line, so I can still sit on top of the lazy-throne *and* have a legit submission

Soooo, doing it without external media *AND* without draw commands, that got to be triple bonus extra super-duper points, right?
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 18th Dec 2016 09:20 Edited at: 18th Dec 2016 09:42
Quote: "that got to be triple bonus extra super-duper points, right? "

If it was up to me, I would give you a lot of minus points for making us go to an external site to download a zip, extract it and then open your project.
The idea of a media-less code challenge is that the code is copy/pastable directly from the forum and so can be viewed without the need to even open the IDE
That said, it's still a pretty nice looking clock.

I'm in a coffee shop with internet access now, so I will try to knock something up whilst I gently caress this cappuccino
AGK V2 user - Tier 1 (mostly)
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 18th Dec 2016 10:09 Edited at: 18th Dec 2016 10:56
Here you go:


The parameters are: x#, y#, sz#, r, g, b
x#, y# Is the top left position of the clock
sz# is the size (or width) of an individual digit
r, g, b is the colour of the clock

I think I uncovered a bug in AppGameKit whilst writing this.
There is no reason at all for this line:
global num as integer[9]=[63,6,91,79,102,109,125,7,127,111]
to be declared as global because it is inside a function and never required outside of it, but if you remove the global keyword, the code fails. Very odd!



AGK V2 user - Tier 1 (mostly)

Attachments

Login to view attachments
damothegreat
User Banned
Posted: 18th Dec 2016 11:06 Edited at: 19th Jan 2017 19:29
....
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 18th Dec 2016 13:46 Edited at: 18th Dec 2016 13:47
Version 2
This one adds the date in the correct day/month/year order and also the day of the week:


AGK V2 user - Tier 1 (mostly)

Attachments

Login to view attachments
damothegreat
User Banned
Posted: 18th Dec 2016 14:01 Edited at: 19th Jan 2017 19:29
....
damothegreat
User Banned
Posted: 19th Dec 2016 22:10 Edited at: 19th Jan 2017 19:29
...
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 20th Dec 2016 08:03 Edited at: 20th Dec 2016 08:03
Version 3

This is my latest (and final) version.
I have reduced the code and included a full alphabet display - just because I can


This is me signing off from this challenge. It's been a fun one!
Now let's see what everyone else comes up with
AGK V2 user - Tier 1 (mostly)

Attachments

Login to view attachments
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 24th Dec 2016 03:16 Edited at: 24th Dec 2016 03:59
Dybing, can you post your code instead of a link? I don't want to download anything and the challenges are suppose to be copy n paste.

Scraggle, you're not too big on comments in your code are ya? That's pretty small code though!


I'll work on my entry tonight.

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 24th Dec 2016 05:43 Edited at: 24th Dec 2016 05:43
Here's a teaser.



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

Attachments

Login to view attachments
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 24th Dec 2016 15:53
Quote: "Scraggle, you're not too big on comments in your code are ya? "

Nope

I find that too many comments can actually make reading the code more difficult because they get in the way.
Once a function is written and tested it will never need changing so there's no need to comment it.
I usually only write comments for the parameters and returns of a function.

Is there any part of my code that you'd like me to comment?
AGK V2 user - Tier 1 (mostly)
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 24th Dec 2016 18:12
Not particularly, but consider all the other people who might look at these challenge snippets in the future. The comments just help others, that's all.

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
damothegreat
User Banned
Posted: 24th Dec 2016 18:17 Edited at: 19th Jan 2017 19:29
...
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 24th Dec 2016 20:06
Quote: "I think I uncovered a bug in AppGameKit whilst writing this.
There is no reason at all for this line:
global num as integer[9]=[63,6,91,79,102,109,125,7,127,111]
to be declared as global because it is inside a function and never required outside of it, but if you remove the global keyword, the code fails. Very odd!"

Ran into the same issue. And I think we're likely using the local array for the same thing, using fancy bitwise stuff to draw parts of each digit?

Press left mouse button to randomly change color.


"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
damothegreat
User Banned
Posted: 24th Dec 2016 20:27 Edited at: 19th Jan 2017 19:30
...
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 24th Dec 2016 23:18
Oh I'm not done, I have a way to further improve it. I just took a break to go get my jog in for the day.

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 26th Dec 2016 01:05
I added a new function drawNumber(), since technically the rules said to use the draw command. Didn't wanna risk losing due to a technicality since I used memblocks and sprites. The draw function is more flexible as it can handle any length of numbers, but only numbers. Reason I didn't support letters is due to the limitation of the type of digital font I use. Half the letters would end up looking the same, which might hurt me against Scraggle.


"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Dec 2016 12:25
I'd like to have entered, but don't have enough time at the moment
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
damothegreat
User Banned
Posted: 26th Dec 2016 20:20 Edited at: 19th Jan 2017 19:30
....
damothegreat
User Banned
Posted: 26th Dec 2016 23:52 Edited at: 19th Jan 2017 19:30
...
damothegreat
User Banned
Posted: 27th Dec 2016 14:38 Edited at: 19th Jan 2017 19:30
...
damothegreat
User Banned
Posted: 27th Dec 2016 16:52 Edited at: 19th Jan 2017 19:30
...
damothegreat
User Banned
Posted: 28th Dec 2016 00:23 Edited at: 19th Jan 2017 19:31
...
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 30th Dec 2016 10:27 Edited at: 30th Dec 2016 11:07
This isn't an update. I'm just reposting the same final version but this time I have added full comments:
AGK V2 user - Tier 1 (mostly)
damothegreat
User Banned
Posted: 30th Dec 2016 12:15 Edited at: 19th Jan 2017 19:31
...

Login to post a reply

Server time is: 2024-11-24 17:00:41
Your offset time is: 2024-11-24 17:00:41