Recent

Author Topic: dartboard  (Read 30257 times)

Xienix

  • New Member
  • *
  • Posts: 26
Re: dartboard
« Reply #30 on: December 26, 2014, 04:02:56 pm »
so 2 pictures on top of each other, the lowest one having all different colors and to top one a picture of the dartboard?
No need to physically put two TImages on the form. Just one - nice looking dartboard.
The map should be invisible and it's better to load in the code. Thus you can use TBitmap class.

lets say I've done that, how do I use it? writing the codes for it and connect each color to a variable?
Yes, you need to write the code to connect a color to a score value or a variable.
By using a lot of IF statements, or CASE statements, or arrays with loops... or anything else that seems reasonable.

I don't have the any idea on how to do that .-.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: dartboard
« Reply #31 on: December 26, 2014, 04:04:37 pm »
I don't have the any idea on how to do that .-.
Bring up your thoughts. We (your teacher and I) trust in you here.

...is using C# an option?

Xienix

  • New Member
  • *
  • Posts: 26
Re: dartboard
« Reply #32 on: December 26, 2014, 04:19:47 pm »
Quote
Bring up your thoughts. We (your teacher and I) trust in you here.

...is using C# an option?
well...I don't know how to load in a bitmap, and I have no idea how to write the code for connecting a color to a variable

I wish C# was an option but unfortunately it's not

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: dartboard
« Reply #33 on: December 26, 2014, 04:27:24 pm »
well...I don't know how to load in a bitmap, and I have no idea how to write the code for connecting a color to a variable
Should this page be of any assistance (look for Loading/Saving an image from/to the disk section)

I wish C# was an option but unfortunately it's not
How would you do the whole task in C#?

Bart

  • Hero Member
  • *****
  • Posts: 5576
    • Bart en Mariska's Webstek
Re: dartboard
« Reply #34 on: December 26, 2014, 04:28:04 pm »
Do you have to draw the board (in code) yourself, or are you allowed to use a picture to display the board?

If you have to draw it yourself, are the alternating colors (per radial) and indicating colors for double, triple and bull required?

Bart

Xienix

  • New Member
  • *
  • Posts: 26
Re: dartboard
« Reply #35 on: December 26, 2014, 04:37:20 pm »
Quote
Should this page be of any assistance.
thanks, I'll try to make something of it :)

Quote
How would you do the whole task in C#?
I don't know, I've never worked with it. I only know that there's a lot more information to find about C# and it's used more then Lazarus Pascal.

Quote
Do you have to draw the board (in code) yourself, or are you allowed to use a picture to display the board?

If you have to draw it yourself, are the alternating colors (per radial) and indicating colors for double, triple and bull required?

Bart

Well, we have to make the board working, he didn't say how to but just said what he wanted and gave us a deadline, that's it. 
I don't know if they are required....

Xienix

  • New Member
  • *
  • Posts: 26
Re: dartboard
« Reply #36 on: December 26, 2014, 04:53:11 pm »
I've read it a few times but I can't figure out how it works

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: dartboard
« Reply #37 on: December 26, 2014, 05:09:27 pm »
well, as teach said "you have the knowledge to do it".

Now the question is - what were you taught?
If you were NOT taught to load images from files then you shouldn't be using bitmap approach at all.

Bart

  • Hero Member
  • *****
  • Posts: 5576
    • Bart en Mariska's Webstek
Re: dartboard
« Reply #38 on: December 26, 2014, 05:11:49 pm »
Well, we have to make the board working, he didn't say how to but just said what he wanted and gave us a deadline, that's it. 
I don't know if they are required....

Well, do you get the assignement in text, or did you just get it verbally?

Je bent niet de enige die ermee stoeit hoor.

http://www.nldelphi.com/showthread.php?38604-Dartsbord&highlight=dartboard
http://www.nldelphi.com/showthread.php?38027-Component-TDartboard&highlight=dartboard

Bart

Xienix

  • New Member
  • *
  • Posts: 26
Re: dartboard
« Reply #39 on: December 26, 2014, 05:16:53 pm »
well, as teach said "you have the knowledge to do it".

Now the question is - what were you taught?
If you were NOT taught to load images from files then you shouldn't be using bitmap approach at all.

We were taught nothing, that's the problem. It's all been self teaching and a lot of searching on the internet

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: dartboard
« Reply #40 on: December 26, 2014, 05:24:20 pm »
We were taught nothing, that's the problem. It's all been self teaching and a lot of searching on the internet
What were you told to search for?

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: dartboard
« Reply #41 on: December 26, 2014, 06:19:31 pm »
2 Bart. Xienix is specifically looking for this

Xienix

  • New Member
  • *
  • Posts: 26
Re: dartboard
« Reply #42 on: December 26, 2014, 06:32:26 pm »
Quote
What were you told to search for?
nothing at all, he just said what we had to make and that's it

Quote
2 Bart. Xienix is specifically looking for this
...yes specifically for that .-.
I don't want to sound like a know-it-all but the x3 and x2 have to be the other way around....

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: dartboard
« Reply #43 on: December 26, 2014, 06:43:31 pm »
nothing at all, he just said what we had to make and that's it
So ... on your first day of classes he told you: "You guys need to show me dartsboard in XX days. You should find all your answers at google.com. Now be gone!"
?
If so, well, there's something wrong with the system of education :D

I don't want to sound like a know-it-all but the x3 and x2 have to be the other way around....
Indeed. Here you go!

Please note, that you can resize the form, and there's also a prize once you win the game!

Xienix

  • New Member
  • *
  • Posts: 26
Re: dartboard
« Reply #44 on: December 26, 2014, 07:53:55 pm »
Not really on the first day, this is our last project using lazarus. at  all the the project he gave part of the final code but this time he only told us what to do, this is also my last lazarus project (if we assume I'll make it through my exams of course)
but he basically gave us the deadline and said good luck

Im typing from my phone right now but I'll check it asap

the deadline is really close as well .-. is there a chance I can get the code?
« Last Edit: December 26, 2014, 08:09:03 pm by Xienix »

 

TinyPortal © 2005-2018