The Game Creators
The Game Creators Home Click to Login
  Hot: Official TGC CompetitionLee is tweeting!July NewsletterSmart PackerBox2DWeb Hosting SurveyDGS BonanzaFPS Creator Bonanza;
The Game Creators
DBPro / - DBPro Coding Challenges -

Previous 40 Go to the first page of this board Return to the Forum Menu Post Message
7,237 Messages - Page   of 181   
Bookmark and Share Search the Forum Next 40

Author Message
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 16th Dec 2006 05:12     Edited: 16th Dec 2006 05:24     | link | toggle




Here it is - the Minimal Media Christmas Coding Challenge!

This is a first - the first ever challenge to offer a prize, and the first ever to require the use of media, all thanks to artist David Gervais.

_____________________________________________________

** The Challenge **

To write a program which makes the most creative/fun/interesting use of this bitmap:




You may want to go along with the Christmas theme - but what you do with the bitmap is up to you.


** The Prize **

This is a great prize - the winner will get the chance to have a custom bitmap designed for them by a professional artist (that's David)! That's a prize worth having at any time - but especially now with the nvidia compo underway.


** The Rules **

This is a one off, so there are a couple of changes to the normal rules. Firstly, the christmas-smilie image must be used in some way. To keep things simple, the image will be included as data at the end of your entry, and converted using a data-to-image function (see below). This means no loading of files is necessary, and all entries can be tested with the usual copy-paste-execute technique.

Secondly, the judging will be done by a special guest judge .... I've yet to get that finalised but I'm hoping one of the moderators is going to kindly step up there.

** The Deadline **

You have until the end of 2006! That's two weeks and a day.


____________________________________________________


Good luck to everyone, merry Christmas, and of course special thanks to David Gervais for the banner, the media and the prize.

Here is the snippet you need to include in your entries. It converts the data into a 64x64 image with transparency and alpha layer - beautiful!

+ Code Snippet

Back to top
Andromedus.com
Report this message as abusive
Code Dragon

User


Joined: Mon Aug 21st 2006
Location: Everywhere
Posted: 16th Dec 2006 17:52     Edited: 23rd Dec 2006 12:29     | link | toggle

This challenge looks fun, I'll enter. A lot's been happening in the forums for the 2 weeks I wasn't here, the Artist's Challenge thread's not dead anymore, the December 30% offer, the talk about DirectX 10, and NVIDIA compo entries...

Here's a Christmas screen saver, set the display mode to as big as your monitor is to make it look even nicer.

+ Code Snippet

"Did I ever tell you how I got the nickname the Dragon of the West?"
"I'm not interested in a lengthy anecdote, Uncle."
"It's more of a demonstration really."
Back to top
Report this message as abusive
David Gervais

Moderator


Joined: Wed Sep 28th 2005
Location: Montreal, Canada
Posted: 16th Dec 2006 20:13     Edited: 16th Dec 2006 20:16     | link | toggle

A note about the Prize I'm offering, it can be as simple as a few sprites or if you want a full screen graphic, GUI Overlay, HUD or background I can do that too. basically, I'll give the winner my contact info and you can give me details of what you need. I'll be the judge as to how much is too much. (but I am known to be generous to a fault so I don't expect the winner to be disappointed.)

Have fun with the compo,.. I might even throw in a fun sample myself,.. just to show you I can code too.

Cheers!
Back to top
Report this message as abusive
Darth Vader

User


Joined: Tue May 10th 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 16th Dec 2006 21:04           | link | toggle

MIght give it a go! I could use the prize for my game!


Back to top
IdealWxrks
Report this message as abusive
blobby 101

User


Joined: Sat Jun 17th 2006
Location: England, UK
Posted: 17th Dec 2006 02:22     Edited: 17th Dec 2006 13:21     | link | toggle

sweet. i'll enter this.
EDIT:if you put that code at the end of your code, what do you do to call that when you need to load the image?


perfection is not achived, it is earned.
Back to top
Report this message as abusive
Tom J

User


Joined: Thu Aug 4th 2005
Location: Essex, England
Posted: 17th Dec 2006 05:29           | link | toggle

I've just thought of a great idea for a game involving that smily face. I'm definately entering!
Back to top
Report this message as abusive
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 17th Dec 2006 13:53           | link | toggle

Here's a quick example to show how to use the datatoimage function for anyone struggling - the following code recreates the bitmap and uses some simple physics to bounce it around the screen:

+ Code Snippet

Back to top
Andromedus.com
Report this message as abusive
Hobgoblin Lord

User


Joined: Sat Oct 29th 2005
Location: Fall River, MA USA
Posted: 18th Dec 2006 03:19           | link | toggle

I have been working with how midi files are composed thanks to whosit and I thought perhaps this could come in handy. Its not perfect but hey I am just starting with this in the last few days.

+ Code Snippet

http://www.cafepress.com/blackarrowgames
Check out my great stuff here
Back to top
www.simgames.co Find user on ICQ
Report this message as abusive
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 18th Dec 2006 05:47           | link | toggle

Nice one HL - I've been meaning to have a go at something like that for a while. What's the format of the data? It doesn't look too complicated, although I guess it is just one note playing at a time.

Back to top
Andromedus.com
Report this message as abusive
Hobgoblin Lord

User


Joined: Sat Oct 29th 2005
Location: Fall River, MA USA
Posted: 18th Dec 2006 09:54           | link | toggle

Well the main rrsource I used is this

http://www.wotsit.org/search.asp?page=4&s=music

You first write the header for the file

then everything per note comes down to its value, velocity, pressure etc (its why the song sounds off I was guessing and fudging alot of those numbers)

also hugely important is this

+ Code Snippet

There are several resources where you can find the values for all the diffrent instruments, especially if you wanted to code multiple tracks. I made only one for this. I am a bit in a hurry but I can talk about it a little more after my final today.

http://www.cafepress.com/blackarrowgames
Check out my great stuff here
Back to top
www.simgames.co Find user on ICQ
Report this message as abusive
David Gervais

Moderator


Joined: Wed Sep 28th 2005
Location: Montreal, Canada
Posted: 18th Dec 2006 10:06           | link | toggle

Ok, I had fun with my sprite,.. (please use DBP settings to set things to 1024x768 windowed before compiling and running.)

+ Code Snippet

Note: every time I try to figure out how to set up my projects in a window (from within the source) the final compile output is always a clip of the upper left of the actual drawing area. I do not know what the 'settings' does to make the windows work right, but it sure would be nice to know what it does pre compile time so that I/we could manually controll the window settings within the games.

Anyways, this is just a mindless sample/demo using the sprite. Comments are of course welcome. Cheers!
Back to top
Report this message as abusive
Darth Vader

User


Joined: Tue May 10th 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 19th Dec 2006 05:48           | link | toggle

Are we allowed to do anything with the sprite? Can we make a game?


Back to top
IdealWxrks
Report this message as abusive
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 19th Dec 2006 06:32           | link | toggle

Of course! Do whatever you like with it.

Back to top
Andromedus.com
Report this message as abusive
Phaelax

User


Joined: Wed Apr 16th 2003
Location: Ohio
Posted: 19th Dec 2006 13:37           | link | toggle

It seems like the longer I'm out of the challenges, the more entries we get.

Well, I'm coming home from Pocono tomorrow, I just checked out of the Caesar's hotel. (mirrors on the ceiling, thats all i got to say)

So.... a media challenge eh. That's a whole lotta data statements, why can't we just load the image since everyone will have it? If you just store the image in the default DB directoy, then nobody should have to change its path in other people's code.

I'll try to enter this one, and if the submission count drops to 3 again, then we'll know who to blame.

Back to top
Zimnox Find user on ICQ Send AIM user a message
Report this message as abusive
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 19th Dec 2006 17:36           | link | toggle

Quote: "If you just store the image in the default DB directoy, then nobody should have to change its path in other people's code"

That was one of the options, but doing it this way means that anyone who takes a look at these entries in the Challenge Database in, say, a year's time, won't have to hunt around for the file and download it. The data statements method means it keeps in with the copy-paste-execute philosophy for everyone, whether they downloaded the bitmap or not. And I did cram the data into 64 lines, so it's not too bad!

Look forward to your entry - haven't had many yet, and it's already day 4!!

Back to top
Andromedus.com
Report this message as abusive
Hobgoblin Lord

User


Joined: Sat Oct 29th 2005
Location: Fall River, MA USA
Posted: 19th Dec 2006 18:18           | link | toggle

Dave, I was going to do almost the same thing

http://www.cafepress.com/blackarrowgames
Check out my great stuff here
Back to top
www.simgames.co Find user on ICQ
Report this message as abusive
Diggsey

User


Joined: Mon Apr 24th 2006
Location: On this web page.
Posted: 20th Dec 2006 08:28           | link | toggle

When you are making your game, you could use load image, and then when it is finished just change it to using data statements instead.
That way, you only need to compile once with the data statements

Back to top
http://diggsey.heliohost.org/
Report this message as abusive
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 20th Dec 2006 09:06           | link | toggle

You could, but I don't see any advantage - compiling the data and converting it to an image only takes a couple of seconds - I don't see what the problem is.

Back to top
Andromedus.com
Report this message as abusive
Diggsey

User


Joined: Mon Apr 24th 2006
Location: On this web page.
Posted: 20th Dec 2006 12:23           | link | toggle

On mine, it take ages to get through all the data statements!

Back to top
http://diggsey.heliohost.org/
Report this message as abusive
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 20th Dec 2006 15:09           | link | toggle

Really? I was sure that I had the most archaic P.C. out of anyone here!

Back to top
Andromedus.com
Report this message as abusive
Google Ad
Back to top
 
Sven B

User


Joined: Wed Jan 5th 2005
Location: Belgium
Posted: 21st Dec 2006 10:44     Edited: 21st Dec 2006 11:13     | link | toggle

Hey Hobgoblin, thank you for showing the site with the chunk structures for midi!

I'm composing music for nearly 6-7 years now, so maybe I could try to put a djingle bells together (if you don't mind ofcourse)

[EDIT] looks like I acted too soon again... Can't figure out what I'm doing wrong

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Back to top
Report this message as abusive
Hobgoblin Lord

User


Joined: Sat Oct 29th 2005
Location: Fall River, MA USA
Posted: 21st Dec 2006 18:03     Edited: 21st Dec 2006 19:32     | link | toggle

I started on a function to do it I just have not completed it yet. The plan is to have it disect the string into the notes and change clicks by using tags like Q(quarter note) H(half) etc.

+ Code Snippet

NOTE: THis does not work yet, just thought I would post my progress in case someone wanted to run with it before I get a chance to finish it

Quote: "[EDIT] looks like I acted too soon again... Can't figure out what I'm doing wrong "

Not seeing what you are doing I can tell you the hardest thing for me was setting the track header to how many bytes would be in the track.

EDIT
CLose but I think i am having a problem with determining the total track length and breaking it over 4 bytes

+ Code Snippet

http://www.cafepress.com/blackarrowgames
Check out my great stuff here
Back to top
www.simgames.co Find user on ICQ
Report this message as abusive
Sven B

User


Joined: Wed Jan 5th 2005
Location: Belgium
Posted: 22nd Dec 2006 10:27           | link | toggle

I get the header structure. (But not completely the delta time ticks)

I have some troubles for each note. I get the midi event commands.

I put in 0x10010000 for example to put a note on channel 0 (if O understood correctly). But, the extra data, should it be - in this case - 2 seperate bytes, or is it also a left 4bit + right 4bit structure?

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Back to top
Report this message as abusive
Hobgoblin Lord

User


Joined: Sat Oct 29th 2005
Location: Fall River, MA USA
Posted: 22nd Dec 2006 11:10           | link | toggle

the extra data for the notes should all be <128 so just the right 4 bits. the 3rd byte (first one after the note) is Pressure (how hard the key is hit) 127 is the max and what I always use to this point. the next is the delta ticks that this event is to occur, I am writing 64 as a quarter note, so can adjust to 128 for a half and 255 for a whole 32 for an eight etc. Hope that clears it up a little. I had to dig through alot of places to come up with what I have so far and by no means am I any sort of expert. alot of trial and error here

http://www.cafepress.com/blackarrowgames
Check out my great stuff here
Back to top
www.simgames.co Find user on ICQ
Report this message as abusive
acelepage

User


Joined: Wed Jun 2nd 2004
Location: Plattsville
Posted: 22nd Dec 2006 15:09           | link | toggle

Challenge Entry:

Had a hard time coming up with something that uses a single image. Got a bit frustrated. Ended up trying to blow up the image. Now you can try to blow it up too.

Arrow keys move camera up, down. Rotate left, right to aim.
Hold the spacebar down to set the length of fuse on the bomb, then release the spacebar to release the bomb. You can fire off bombs at any rate.

+ Code Snippet

( 2b || !2b ), that is the question. The answer: true
Back to top
Report this message as abusive
Nicholas Thompson

User


Joined: Mon Sep 6th 2004
Location: London, UK
Posted: 22nd Dec 2006 20:07           | link | toggle

Can ya guess what it is yet...
+ Code Snippet

Its been a while since I posted but its a special occasion

Btw: I AM still workign on the DBP site when I get time but I've been stupidly busy recently. I'll try to take a look at these entries tomorrow but I have high hopes for them!

Btw: If anyone is a digger out there,
http://digg.com/programming/The_Minimal_Media_Christmas_Coding_Challenge

Plus I blogged it...
http://www.thingy-ma-jig.co.uk/blog/22-12-2006/christmas-coding-challenge

Back to top
Thingy ma Jig
Report this message as abusive
Hobgoblin Lord

User


Joined: Sat Oct 29th 2005
Location: Fall River, MA USA
Posted: 23rd Dec 2006 02:02     Edited: 23rd Dec 2006 12:00     | link | toggle

Well for those interested here is the working function, there are fields for tempo and instrument but as of this point it only does quarter notes with the grand piano, feel free to tweak it I probably will for my entry. Just make sure to stay between c0 and b9

EDIT ok added tempo and instrument options, can change to eighth (8), quarter(q), and half(h) notes. r is a rest at the current note speed

EDIT still needs some slight tweaking to get the note durations exact, you can play with the durations in the select section with h/q/and 8

+ Code Snippet

still not quite right
+ Code Snippet

http://www.cafepress.com/blackarrowgames
Check out my great stuff here
Back to top
www.simgames.co Find user on ICQ
Report this message as abusive
Nicholas Thompson

User


Joined: Mon Sep 6th 2004
Location: London, UK
Posted: 23rd Dec 2006 12:08           | link | toggle

Here is an update on mine...
+ Code Snippet

The blocks are now spawned with a colour "scheme" using the HSV snippet I've posted in the forum. Colours are red's/orange's, green's, blue's or pink's/purple's - picked at random at the start.

The bricks now disappear on contact + the ball bounces (albeit inaccurately) off the sides and bricks... Plenty more to do - but its working quite well I think!

Back to top
Thingy ma Jig
Report this message as abusive
Sven B

User


Joined: Wed Jan 5th 2005
Location: Belgium
Posted: 23rd Dec 2006 12:12     Edited: 23rd Dec 2006 12:16     | link | toggle

Jingle Bells is usually written in F.

+ Code Snippet

The eight notes are - to be honest - not even near an eight note duration (no offence) so I didn't use them in the melody.

EDIT: I'm getting close to understanding the midi file structure.

BTW, I'm doing this pure because I'm interested in the structure. Don't worry, I won't make an entry using midi.

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Back to top
Report this message as abusive
Hobgoblin Lord

User


Joined: Sat Oct 29th 2005
Location: Fall River, MA USA
Posted: 23rd Dec 2006 12:39     Edited: 23rd Dec 2006 16:59     | link | toggle

Yeah I know they are off but have not as of yet been able to find quite the right value, as for the key I just picked up my guitar happened to start on C and went from there, never happened to play it before.

+ Code Snippet
this should fix it

EDIT: shows another instrument diff song
+ Code Snippet

http://www.cafepress.com/blackarrowgames
Check out my great stuff here
Back to top
www.simgames.co Find user on ICQ
Report this message as abusive
Code Dragon

User


Joined: Mon Aug 21st 2006
Location: Everywhere
Posted: 23rd Dec 2006 18:41     Edited: 2nd Jan 2007 16:18     | link | toggle

Here's my second entry:

Coin Collectors

You have 1 minute to walk around the giant Christmas tree and collect goodness coins. The more coins you collect, the higher you get on Santa's nice list, and the more presents you get from Santa! If you don't get enough coins and get bumped down to the naughty list, and you get coal for Christmas!

Use arrowkey to move, this looks best in 1024*768 or better resolution.

+ Code Snippet

"Did I ever tell you how I got the nickname the Dragon of the West?"
"I'm not interested in a lengthy anecdote, Uncle."
"It's more of a demonstration really."
Back to top
Report this message as abusive
Nicholas Thompson

User


Joined: Mon Sep 6th 2004
Location: London, UK
Posted: 23rd Dec 2006 20:30           | link | toggle

nice! You have some severe issues with angles... If you turn too much the controls seem to get inverted in some wierd way - but apart from that its a good start! I like the concept and I especially like the way the coins/media fly up into the corner as they would in a professional kiddy game like this. Has a very Playstation/Nintendo-esque aura to it.

Back to top
Thingy ma Jig
Report this message as abusive
Code Dragon

User


Joined: Mon Aug 21st 2006
Location: Everywhere
Posted: 23rd Dec 2006 20:41     Edited: 27th Dec 2006 15:37     | link | toggle

Thanks, I've been having big problems with the camera angle, I'll get that fixed Christmas Eve, or sometime before New Year's Eve. The only other things I need is the the presents appearing and maybe get coins lost when you hit a rock.

Quote: "You have until the end of 2006! That's two weeks and a day."

I've called it two weeks flat, Ric, I doubt anyone will be coding on Christmas Day, there's too much to do!

Quote: "Has a very Playstation/Nintendo-esque aura to it."

I did get the idea concept of the coins flying up to the courner from Rareware. Those games had a very solid HUD design, you see the items fly up to their icons in the HUD, accompanied by a sound effect so you instantly know you got something. (The only time this is bad is when you look at the icon, think it's an actual item and try to collect it. )I prefer the Rareware style HUDs to Zelda because only attributes which are changing are show (Zelda keeps the entire thing on screen, sometimes hard to see what's going on it gets so cluttered)

"Did I ever tell you how I got the nickname the Dragon of the West?"
"I'm not interested in a lengthy anecdote, Uncle."
"It's more of a demonstration really."
Back to top
Report this message as abusive
SirRoss

User


Joined: Fri Aug 19th 2005
Location: United Kingdom
Posted: 24th Dec 2006 04:26           | link | toggle

Code Dragon, your game helped me so much; the first thing I ever coded in DB was a movement control engine, with the mouse to look and W and S to go forward and back, with the camera following in third person. But I couldn't get it to follow a bumped matrix, it just floated above a flat plane, and went through anything in front of it.

So thanks, extremely useful, if simple.

The Microsoft Motto: Hey! It compiles! Ship it!
Back to top
www.darksigns.com
Report this message as abusive
RiiDii

User


Joined: Thu Jan 20th 2005
Location: Inatincan
Posted: 24th Dec 2006 05:08     Edited: 24th Dec 2006 05:09     | link | toggle

Code Dragon, try replacing the Turn Object Right in the Process_Player() function with this line:
YRotate Object player(0),Object Angle Y(player(0))+RightKey()-LeftKey()

Turn Object Left/Right flips the object over 180 degrees on the x axis and z axis and inverts the y rotatation, for every 180 degrees rotated on the Y axis. Ermm, try this snippet to see what I mean.

+ Code Snippet


Open MMORPG: It's your game!
Back to top
Report this message as abusive
Sven B

User


Joined: Wed Jan 5th 2005
Location: Belgium
Posted: 24th Dec 2006 05:14           | link | toggle

Hi Hobgobling, here I am again.
And I have a question again:

This part:
+ Code Snippet
Seems to be not clear for me. So I started to compare it with the text file downloaded from you link.

write byte 1, %00000000
write byte 1,192
write byte 1,INSTRUMENT `instrument

as you can see, the first byte is 00000000 (binary). So, I looked into the file (msb = 0) and I found that this is the command to set the sequence number of the track, followed by the number of bytes (nn) and the sequence number (ssss). Well, this is what I don't get.
You're saying that it contains 192 bytes, and then 1 byte for the sequence number (while the file says it has to be 2 bytes for the sequence number).

And then there's one other question for now: I often see byte 255 (%11111111 binary, msb=1) and I can't find any documentation in the text file.

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Back to top
Report this message as abusive
Code Dragon

User


Joined: Mon Aug 21st 2006
Location: Everywhere
Posted: 24th Dec 2006 07:13     Edited: 24th Dec 2006 07:40     | link | toggle

Thanks RiiDii, the camera works great now. I've updated the code to make presents appear when the time is up too.

[edit]

Just added lots of snow to the game.

"Did I ever tell you how I got the nickname the Dragon of the West?"
"I'm not interested in a lengthy anecdote, Uncle."
"It's more of a demonstration really."
Back to top
Report this message as abusive
Hobgoblin Lord

User


Joined: Sat Oct 29th 2005
Location: Fall River, MA USA
Posted: 24th Dec 2006 09:44           | link | toggle

Quote: "as you can see, the first byte is 00000000 (binary). So, I looked into the file (msb = 0) and I found that this is the command to set the sequence number of the track, followed by the number of bytes (nn) and the sequence number (ssss). Well, this is what I don't get.
You're saying that it contains 192 bytes, and then 1 byte for the sequence number (while the file says it has to be 2 bytes for the sequence number)."

Ok not sure the best way to explain this and I think the confusion comes from the way I broke up the bytes but... that 0 actually belongs to the previous line for the number of bytes in the track, many MIDI events can be any number of bytes and the 0 is like a line return to state that the end of bytes assigned to that meta event has been reached. If you look at the info on BYTES IN TRACK you will see it says that event should have at most 4 bytes (but it can have more, or less).

Quote: "And then there's one other question for now: I often see byte 255 (%11111111 binary, msb=1) and I can't find any documentation in the text file."

All meta-events start with FF followed by the command (xx), the length, or
number of bytes that will contain data (nn), and the actual data (dd).

hope that clears things up, but please remember I have only scratched the surface of these files myself. I had to do alot more then read those files, they were a good starting point but far from a complete source. Something you can try is to compose a few midi files yourself with just 1, 2, and 3 notes then take a look at them byte by byte to see the differences since you set the control it makes dissecting them easier.

http://www.cafepress.com/blackarrowgames
Check out my great stuff here
Back to top
www.simgames.co Find user on ICQ
Report this message as abusive
Ric

User


Joined: Sun Jul 11th 2004
Location: object position x
Posted: 24th Dec 2006 11:13           | link | toggle

Just got time to wish everyone here a merry Christmas! Glad to see some more entries for the challenge - I'll be having a go myself in a couple of days once things settle down - got lots of people staying with us this Christmas, and it's getting crazy busy here!! Also - welcome back Nick - long time no post!



Back to top
Andromedus.com
Report this message as abusive
RiiDii

User


Joined: Thu Jan 20th 2005
Location: Inatincan
Posted: 24th Dec 2006 11:51           | link | toggle

Merry Christmas everyone.


Open MMORPG: It's your game!
Back to top
Download: skysphere shot.jpg Size: 28668 bytes  View Image: skysphere shot.jpg Size: 28668 bytesReport this message as abusive

Previous 40 Go to the first page of this board Return to the Forum Menu Post Message
7,237 Messages - Page   of 181   
Search the Forum Next 40

This is a multi-page thread older than 30 days.
Go to the last page to check if you can reply to it.

Forum Search

Enter a word or phrase to search our Forum for:

Thread Subject Search
Search Phrase:
Search Scope: Entire forum
Just this board
 
Google Forum Search
Search Phrase:
 
Apollo v2.02


Game Creator Store
Privacy Policy AUP Top of Page