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.

DarkBASIC Discussion / The DB Classic Programming Challenge Thread

Author
Message
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 15th Sep 2007 12:59
hmm... this may take up quite a few of my allocated lines though, leaving little space for gameplay mechanics; out of laziness instead of creating my own textures in DarkBASIC I wrote a program to export all the commands for recreating an imported picture pixel by pixel and simply inserted that into my DarkBASIC program, but now I have lots of lines taken up by



I'm sure there's a more efficient way of doing it, but my laziness will not allow it.

When I just had one command per line though I ran out of space in my file, hence the new 16 commands per line

http://jamesmason01.googlepages.com/index.htm
luke810
19
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 15th Sep 2007 18:52
Quote: "Using an external program to convert images and/or other media files to data statements is therefore also within the rules as they are written at the moment, but I personally would class it as cheating and against the spirit of the challenges.

As such, when judging I would actually award less points to an entry which contains hundreds and hundreds of data lines where it's obvious what has happened."


Page 23 , I would read it Demon's breath
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 15th Sep 2007 19:40
page 23? I gotta read the whole board? man...

and i wrote the program so...


*mutters & grumbles*

changing it now...

http://jamesmason01.googlepages.com/index.htm
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 16th Sep 2007 18:08 Edited at: 16th Sep 2007 18:09
Whoops... double post...

http://jamesmason01.googlepages.com/index.htm
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 16th Sep 2007 18:09
OK I don't have a clue how to make a boat in DarkBASIC so I want you all to imagine really hard if I get this finished in time... It's sort of a bit more box shaped than yer average speedboat. When I say a bit more box shaped... I mean it's just a box...

http://jamesmason01.googlepages.com/index.htm
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 18th Sep 2007 19:51
I want to learn how to make things procedurally, but I can't find anything about it
I thought this challenge would be a good one for procedural methods because of the way water moves, can anyone give me some help with this?

In programming, nothing exists
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 19th Sep 2007 16:01
the water isn't too hard

make a matrix. texture it and make it look all prettiful. then... you know your trig? I just gave each matrix tile corner a random number and then in the main loop set the height to sin(the variable + a constant). cos would work just as well as sin. I wonder what tan would do? I suppose DB might have problems with the whole infinity thing...

http://jamesmason01.googlepages.com/index.htm
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 19th Sep 2007 16:02 Edited at: 19th Sep 2007 16:32
the water isn't too hard

make a matrix. texture it and make it look all prettiful. then... you know your trig? I just gave each matrix tile corner a random number and then in the main loop set the height to sin(the variable + a constant). cos would work just as well as sin. I wonder what tan would do? I suppose DB might have problems with the whole infinity thing...



Here's my code so far

feel free to rip anything you want

I don't know if I'll be able to fit in finishing it now 'cos what with college and upcoming uni open days and part-time work my time's somewhat limited at the moment anyway, but I'll give it a go...







EDIT:

bit of a change of plan to multiplayer... that should take me less time to sort out hopefully...

Matrix that updates to simulate waves
Controllable boat with third person camera
Create something to form a boundary so that there's a more obvious reason as to why you can't go beyond a certain point
Missile firing
Split screen mode
Boat tilt... I think I know how I'm going to do this though
A HUD
Missile/boat contact
Missile limits (I'm thinking you have to pick one up to fire it - like Mario Karts
Improve FPS - since I started implementing split screen (still in progress) it's shot right down. My computer isn't amazing but it's still crazy how slow it is now. How do you find exactly what FPS you're getting?

http://jamesmason01.googlepages.com/index.htm
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 19th Sep 2007 16:45
nice work
I can't believe the points are totally independent, it looks so much like waves

In programming, nothing exists
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 19th Sep 2007 17:08 Edited at: 19th Sep 2007 17:43
i tried doing it without the random variable at first... that just looked rubbish though... everything was moving as entire rows & it didn't look natural at all... figured it out eventually though... i'd actually been thinking about doing something like that before but just with the rigid sine waves, but when I'd tried the entire matrix just kept moving diagonally accross the screen... sorted it for this though; it was the first thing I did 'cos I thought if the matrix was doing that there was little point in the game altogether

having a bit of trouble with my split screen though... it run's at about one frame per year, and the inkey commands are rubbish - when you press one of the arrow keys, the other player stops moving, because I'm using the
style of thing. Need to go forum-hunting for this now...


EDIT: OK the Keystate thing fixed that. But my program's still ridiculously slow... oh well I'll sort tht out when I'm finished...

EDIT 2:

Code so far...



http://jamesmason01.googlepages.com/index.htm
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 19th Sep 2007 19:07
@demons breath

Looking good so far! I really like your water texture and the waves.

Here's 2 entries. Actually variations of the same entry. This is all 2d using 3d to screen x and y conversion functions.

@OBese
This uses some of the same methods we talked about before - using 2d to create 3d. Though I force it a bit to look more or less the way I want.

DBC's 2d drawing commands are sooooo sloooow that I had a difficult time trying to come up with a way to represent a matrix drawn with lines. I used the box command and that was actually twice as fast as the line command but it wasn't as flexible, so I used a combination of both.

This first entry just uses the DOT command to represent the vertices of the matrix. There is a sprite that bobs in the water. The trick will be finding a way to make a boat in 2d that behaves like it's 3d. I originally just pasted an image as the "boat", but I figured a sprite was better if the camera moved in or out, I could scale a sprite to give the appearance of gaining or losing distance. Both entries need a lot of work but here is the beginning:

Matrix using dots:


Same entry but using lines and boxes:


Enjoy your day.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 19th Sep 2007 22:01
@Latch
Wow! that's awesome

I added my dline function in, it's 1fps slower
Maybe you can edit it to fit your needs



I haven't done any serious coding for about 2 weeks!

In programming, nothing exists
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 19th Sep 2007 22:07
Interesting. Very... interesting.

............................
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 20th Sep 2007 03:14
@OBese87
Your line function looks like a variation of Bressenham's algorithm. In BASIC, it's very difficult to match the speed of the built in LINE function (even though it is a pretty slow drawing command) because you have to run through loops written in BASIC in your custom function. To speed it up a bit, try reducing the calcuations you have in the REPEAT UNTIL loop. See if you can calculate a final count based on deltax (w) or deltay (h) before the repeat loop - then use the repeat until the count and only have the drawing command in there if you can. Ideally, you would get rid of all of the floats as well - but this can be a bit tricky to get the results you want.

Enjoy your day.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 20th Sep 2007 04:50
Quote: "Your line function looks like a variation of Bressenham's algorithm."

It is? Cool I just made it up
It was originally designed for dotted lines too and i've chopped it about. So I'll work on it and see if I can speed it up

In programming, nothing exists
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 20th Sep 2007 18:46 Edited at: 21st Sep 2007 15:39
OK... I changed my sync rate 30 to sync rate 0 and suddenly it's running at 75 FPS - result



EDIT: Almost finished. I just need to change the code so that you have to pick up the missiles before you fire them... that should be pretty easy... I'm quite pleased by the way this has turned out actually...


http://jamesmason01.googlepages.com/index.htm
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 21st Sep 2007 17:51 Edited at: 21st Sep 2007 18:42
OK Here's my finished entry:

Player 0 move: W,A,S
Player 0 fire: D
Player 1 move: up,left&right arrow keys
player 1 fire: down arrow key

fire missiles once you've picked them up by going into the ghosted cone things

I might actually try and fiddle about with this a bit more some time using external media... but obviously I couldn't use any for this challenge so it looks a little bit simple...


EDIT: sorry forgot one last alteration




EDIT 2: download from http://db1games.topcities.com/boatgame.zip

http://jamesmason01.googlepages.com/index.htm
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 23rd Sep 2007 12:12
come one lads... show some interest... challenge ends tonight in less than 14 hours...

hopefully some more people will enter... I don't mind losing to Latch (as I presumably will) but I don't want to be runner up by default... I'd much prefer to be last in a challenge with more entries than last in a challenge with 2

http://jamesmason01.googlepages.com/index.htm
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 23rd Sep 2007 14:13
It seemed like there was a lot of interest in this challenge. What happened? Come on everybody, there's still a little timeto enter!

@demons breath
I think your entry's a bit more interesting than mine! Your water is great!

I noticed a little camera trouble with the movement of the boats. This can happen when you use TURN OBJECT left or right. It has something to do with the calculation of the angles as euler angles when you use those commands. If you use yrotate, it should correct the problem.

Here's your code with yrotate instead of turn object in the movesub: subroutine



Enjoy your day.
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 23rd Sep 2007 15:11
Thanks for the help and the compliment

unfortunately I can't run yours... my computer's rubbish it usually goes to white screen and then crashes when I try and run a DarkBASIC script so I don't know what's wrong with it but it's getting quite annoying - I'm really impressed that you managed to do this in 2D though.

This is being judged on the level of programming involved - mine's all pretty basic stuff, whereas yours looks more complicated, and it takes a lot more intelligence to come up with a 2d representation of this than a pretty simple programme reliant on the easy-to-use 3D commands. Plus Roddman (was that who set the challenge?) said that 2D would be judged as better - I just visualised immediately how I would do it in 3D whereas I don't think I could have come up with a 2D representation with my level of maths and programming.


I really want to run your programmes... Have you got a compiled .exe?

http://jamesmason01.googlepages.com/index.htm
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 23rd Sep 2007 15:35
Can't you just copy the code and compile them into exes? You don't actually have to run the scripts in DB to compile them.

Enjoy your day.
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 23rd Sep 2007 15:45 Edited at: 23rd Sep 2007 15:47
that worked - it was just my version of DBC that wouldn't let me use the Set Window On commands - need to update it but my computer won't let me...

and I'm in awe... just run the first example and it's a stroke of genius. or genious. that's the one word i can never remember how to spell. but whatever it is, this is it.

EDIT: OK I just ran the second one. I think I'm gonna come third in a 2-man competition here


ahh well at least it got me started with making a game... I'm going to carry on improving it using external media and suchlike... try and make a reasonable minigame out of it.

http://jamesmason01.googlepages.com/index.htm
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 23rd Sep 2007 16:17
I wanted to make 2D water particles and have it act like real water, but I can't even work out where to begin
I will try and come up with a simple entry but it wont compare with your entries.

In programming, nothing exists
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 23rd Sep 2007 16:27 Edited at: 23rd Sep 2007 16:32
good luck mate... there's not much time left... you'll have to do it today to enter officially... but it might be fun to have a go at anyway...


EDIT: also has anyone got any ideas for what I can put in the expanded version of my entry?

I'm putting mines in now, I've got one of the boat models that came with DB, i made a missile in Wings3d, the "no missile"/"missile loaded" icons have been replaced by much funkier looking pictures of whatever you have loaded... I wouldn't mind more ideas for weapons though... I'm doing it quite cartoony and simple in style and my coding, modelling and texturing aren't amazing, so I'm not looking for ideas like "napalm the other boat and watch the other person running around screaming and burning to death." This is happy, childish murder. Not nasty murder.

http://jamesmason01.googlepages.com/index.htm
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 23rd Sep 2007 23:39 Edited at: 23rd Sep 2007 23:42
come on OBese... you've still got a couple of hours time...


gotta say, at the start it looked like there'd be more than just 3 entries. and saying three entries is a bit misleading, because only two people actually entered.

Where's your spirit lads?

http://jamesmason01.googlepages.com/index.htm
roddman
18
Years of Service
User Offline
Joined: 24th Jul 2007
Location: Over There
Posted: 24th Sep 2007 02:07 Edited at: 24th Sep 2007 02:35
The challenge is over, I think
I'm not used to GMT time, it's still only 7:00pm here.

I'll judge the three or so entries and get back with the results in a few minutes.

[Edit]
Okay I've started testing the entries

Demon's Breath Untitled
I've always thought of it as a shame that the only way to create a 2-player game without using the multi-player commands was to constantly move the camera back and forth. "I guess that's why there's DBP". Anyway, I liked your entry especially the way you used the 2d HUD on the screen. Good job

Latch 2-d Matrix Oscillation (matrix)
Incredible, only the line matrix was signifigantly slower than the dot matrix and also was a little choppy in places. I'd like to see this where you could rotate or move the camera and the matrix would adjust on the screen as if you were using the built in commands.

Latch 2-d Matrix Oscillation (dot)
As I said above, incredible, I think that pretty much sums it up.

I would have liked to see more entries, as Latch said there were many people who were considering entering but didn't seem to muster anything up. Oh well

And the winner is


Runners-Up


Good job everyone, (both of you)

Cory
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 24th Sep 2007 04:04
Thanks roddman! I really didn't think I was going to win.

Alright, I'm gonna repeat a challenge from the past. This seems to be an old favorite and it should allow some less experienced prgrammers to get in the mix.


2d Paint Program

Main Objectives:
* Must be able to use the mouse to draw on the 2d screen
* If it is freehand drawing, there must be no breaks in the line as it is drawn by the mouse. The mouse pen or brush strokes strokes must be continuous.
* The mouse should be able to be moved and not draw as well as draw (ex. click to draw, no click = no draw)
* Must have an eraser mode where you selectively erase using the mouse
* The pen color must be selectable by the user. How you do it is up to you. Could be function keys, or an onscreen button, or whatever.
* There must be a control to clear the screen.
* Add the ability to save and load a drawing

Extra Points:
* Add other drawing functions handled with mouse control(ex. line, circle, box, flood fill - whatever you can think of)
* Layers (here's your chance to use hidden bitmap screens, pasting images and sprites with transparency, maybe even using some iamge captures from 3d ghosted images)
* Any bells and whistles you can throw in

Judging will be based on the main objectives and a clean, smooth, and easy to use drawing interface. Extra points of course help, but aren't necessary.

If you want, look back at previous entries and see what others did. Glean some of their ideas to help you along or start from scratch.

Dealine : Monday October 1 2007 at midnight (tuesday morning ) GMT

If this isn't an acceptable challenge, I'll leave it to demons breath.

Enjoy your day.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 24th Sep 2007 04:27
Yep sounds cool
sorry guys I had to go to work lol
I think Demons Breath should've gotten 2nd place, I don't think Latch's second entry had enough work done to it to be considered a separate entry.
Congrats Latch your code should be useful to me as you know I wanted to do something similar before

I WILL WIN THIS ONE!

In programming, nothing exists
Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 24th Sep 2007 04:31
Hmmmmm... Why are you repeating a challenge?

how do you make a sig?
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 24th Sep 2007 04:43
Quote: "Hmmmmm... Why are you repeating a challenge?"


1. Most people that have been posting on this challenge thread lately weren't around or never posted when the 2d paint challenge was up before.

2. There's a lot of flexibility in this type of challenge. Beyond the basic click to turn on a pixel, there are a lot of things that could be done - TDK's grid function, or that cell generation thing Obese was working on for instance.

3. The challenge should be easy enough for beginners as well as challenging for more experienced programmers who want to see what they can come up with.

4. I totally ran out of ideas that aren't too complicated.

Enjoy your day.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 24th Sep 2007 05:24
Can we use memblocks?
*crosses finger*

In programming, nothing exists
luke810
19
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 24th Sep 2007 05:33
I'm going to enter this challenge. I've even started on my entry already.

Quote: "Can we use memblocks?"


I think everyone who wants to be in the challenge should post and say if they have the enhancement pack or not and Latch can make the decision on whether or not we can use them based on how many people have it.
roddman
18
Years of Service
User Offline
Joined: 24th Jul 2007
Location: Over There
Posted: 24th Sep 2007 06:37
Quote: "I don't think Latch's second entry had enough work done to it to be considered a separate entry"

If you'll notice I put "Runners Up" at the top of the second box, I didn't judge by 1st, 2nd, and 3rd. Latch won and I put the other two in the runners up box, the reason I put Latch's second entry first was because that was simply the one I typed in first not because I thought it deserved 2nd place. Sorry for any confusion.

Cory
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 24th Sep 2007 09:01 Edited at: 24th Sep 2007 09:09

2d Paint Program

Quote: "Can we use memblocks?"


Most beginners aren't real familiar with how to use memblocks, and a lot of the things you can do with 2d in regard to memblocks can be mimicked with arrays, files, 3d, and offscreen bitmaps - so I'm gonna say no on the memblocks.

The standard challenge rules apply with no enhancement pack commands.

Enjoy your day.
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 24th Sep 2007 10:25
wohooo! third in a 2-man contest

I'll have a go at the paint programme as well. I'm really starting to get into this losing at challenges thing. Well done latch, a well-deserved win...

http://jamesmason01.googlepages.com/index.htm
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 24th Sep 2007 18:39
Quote: "wohooo! third in a 2-man contest"


Our home is our world, our life, home is our world...
Homeworld: The ladder
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 25th Sep 2007 03:51
Quote: "Most beginners aren't real familiar with how to use memblocks, and a lot of the things you can do with 2d in regard to memblocks can be mimicked with arrays, files, 3d, and offscreen bitmaps - so I'm gonna say no on the memblocks."

OK that's fine.
Is there a way to make a bitmap from an array quickly like you can with a memblock? That's the only real advantage i can see, apart from being able to change the bitmap size more easily.

In programming, nothing exists
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 25th Sep 2007 11:02

2D Paint Program : Deadline oct 01 2007 midnight gmt

@Obese
Quote: "Is there a way to make a bitmap from an array quickly like you can with a memblock"


Not sure exactly what you mean because at some point you have to load or draw the bitmap in all cases. A custom bitmap doesn't come out of a memblock until you put something in there. If you mean MAKE MEMBLOCK FROM IMAGE and MAKE IMAGE FROM MEMBLOCK, unfortunately there's no way to copy arrays in the same way. You'd have to rely on some kind of loop or use file I/O commands. However, you can paste images on other screens and retrieve them just as fast. You can even use images captured from the 3d screen which can be altered with 3d commands on 3d objects, so there are quite a few options without memblocks.

Enjoy your day.
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 27th Sep 2007 23:42
OK I've just started making my entry about an hour ago... having a little problem with the uninterrupted lines but I don't know why; my code should be drawing a line between the last recorded mouse coordinates and the current ones but for no real reason that isn't working right

actually it might be my mouse... it's a bit dodgy


I'm trying to figure out how to draw my tool icons though... that'll be fun

who else is entering? hope it's more people. Maybe it'll be 5 or 6... then I can come about 17th I'm still quite amused that I managed to place outside the actual number of contestants last time... it actually made my weekend

http://jamesmason01.googlepages.com/index.htm
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 28th Sep 2007 20:08
Quote: "actually it might be my mouse... it's a bit dodgy"

Are you getting gaps in your lines that seem totally random?
If you are then it's not your mouse

I made this crazy mirror draw program a while ago

The lines have gaps
I can't remember why I put the sync only when not drawing but it works better than in the loop
I think I made a program with solid lines but I can't find it or remember the solution

Consider this my first entry (just incase I don't finish my real one )

In programming, nothing exists
luke810
19
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 29th Sep 2007 01:30
Quote: "I'm trying to figure out how to draw my tool icons though... that'll be fun "


I'm working on the same thing. I might just use words because its taken me awhile just to get 4/10 done.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 29th Sep 2007 16:30 Edited at: 29th Sep 2007 16:39
draw it in paint first then work out the quickest way to draw it (lines or dots etc)

One way to get around the gap line problem (haven't tested this yet so no flaming ) is to use an array to store the state of each pixel, then as you move over them the pixel data is changed without needing to store where you have been.
Although I did find with my life program that having a large area seriously slows things down, how do I combat this?

[edit]

In programming, nothing exists
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 29th Sep 2007 20:39
hmmm... i think I'll just pretend that it's not happening... if you see it happening just draw in pen on the right colour on your screen okay?

:p


and I think once I start including other things the whole array idea would get too complicated.

This is me so far... haven't had much time on it yet though what with coursework (OK I haven't technically done any yet but avoiding doing it takes a lot of time and effort) and work (12 hours out of the last 24 -5 hr latest shift we do followed by 7 hour earliest shift we do - great fun - very sleepy now).




http://jamesmason01.googlepages.com/index.htm
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 29th Sep 2007 21:59 Edited at: 29th Sep 2007 22:02
Using arrays isn't required:



TDK_Man

Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 30th Sep 2007 02:46
I'll probably enter this one...I'm working on making a normal paint program... except it'll be in one of OBese87's windows. Would I be allowed to do that?

how do you make a sig?
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 30th Sep 2007 12:39
@Obese
That mirror effect is pretty cool!

@demons breath
That seems to be shaping up nicely. I like how clean the interface is.

@sinani
Sure! But hurry. There are only 2 days left.

@Everyone that follows the thread:
Let's see if we can get a few more entries for these challenges.

This one's not too hard but can be a bit challenging depending on how far one wants to take it.



2d Paint Program

Main Objectives:
* Must be able to use the mouse to draw on the 2d screen
* If it is freehand drawing, there must be no breaks in the line as it is drawn by the mouse. The mouse pen or brush strokes strokes must be continuous.
* The mouse should be able to be moved and not draw as well as draw (ex. click to draw, no click = no draw)
* Must have an eraser mode where you selectively erase using the mouse
* The pen color must be selectable by the user. How you do it is up to you. Could be function keys, or an onscreen button, or whatever.
* There must be a control to clear the screen.
* Add the ability to save and load a drawing

Extra Points:
* Add other drawing functions handled with mouse control(ex. line, circle, box, flood fill - whatever you can think of)
* Layers (here's your chance to use hidden bitmap screens, pasting images and sprites with transparency, maybe even using some iamge captures from 3d ghosted images)
* Any bells and whistles you can throw in

Judging will be based on the main objectives and a clean, smooth, and easy to use drawing interface. Extra points of course help, but aren't necessary.

This is a repeat of a previous challenge. If you want, look back at previous entries and see what others did. Glean some of their ideas to help you along or start from scratch.

Dealine : Monday October 1 2007 at midnight (tuesday morning ) GMT

Enjoy your day.
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 30th Sep 2007 14:00 Edited at: 30th Sep 2007 16:15
woah! i didn't realise there was that little time left...

I'm never gonna figure out flood fill in time & I wanted to add another interface for controlling line thickness and the like at the bottom...



EDIT: In case I don't get a chance to work on it some more here's my code so far




I need to implement a couple more tools and add a second, more in-depth tool interface. Got a lot of work to go, and absolutely f***-all time to do it in

http://jamesmason01.googlepages.com/index.htm
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 30th Sep 2007 17:00
@Demon
I tried adding in my dline function to your code but it just made it worse
x# and y# can be x and y as you will never have half a pixel
saves on memory
Unless you have a division that involves x and y then it must be a real number or DB will return an integer (stupid)

Can anyone suggest how I could speed up the dline function?

In programming, nothing exists
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 30th Sep 2007 18:55
Here's my idea for a color selector

I want it to fade from red into green then green into blue then blue back into red
Can't work it out though
I was thinking of having an accompanying contrast slider

Anyone got any unique ideas for selecting colours etc? I want to make this as unique as possible

In programming, nothing exists
Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 30th Sep 2007 20:01
AHH!! ONLY 2 DAYS LEFT!!!! And I haven't even got my file menu or my tools menu done!! WAAAAAAAAAH!!!!!!

how do you make a sig?

Login to post a reply

Server time is: 2026-06-08 11:35:22
Your offset time is: 2026-06-08 11:35:22