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.

Newcomers DBPro Corner / Polygon drawing in DBPro

Author
Message
TCat87
17
Years of Service
User Offline
Joined: 27th Dec 2006
Location:
Posted: 5th Jan 2007 17:19
For my first attempt at DBPro I am looking at re-writing a board game I did in Java. The game is played on a grid of hexagonal tiles with hexagonal pieces. I did a lot of drawing and filling of hexagons in the code. The tiles rotate and change background colors. I don't see an easy to do this in DBPro. Should I make all the tiles, pieces, etc. sprites? Should I do all the artwork in some other program and import as images? If so, what free drawing program do you recommend?
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 5th Jan 2007 20:45
I dont think you understand what polygons are. Polygons arent 2D images, they're 3D shapes that join with other polygons to create a 3D mesh, or object. To create 3D models/objects, you need to get a modelling package, 2 good ones are Blender 3D and Wings 3D, do a google search for them. You could easily make a hexagonal model in one of those modelling apps.

TCat87
17
Years of Service
User Offline
Joined: 27th Dec 2006
Location:
Posted: 5th Jan 2007 21:04
Thanks RUCCUS!
lower logic
18
Years of Service
User Offline
Joined: 15th Jun 2006
Location:
Posted: 5th Jan 2007 21:15 Edited at: 5th Jan 2007 21:19
Quote: "Polygons arent 2D images, they're 3D shapes that join with other polygons to create a 3D mesh, or object."
Um, polygons aren't 3D shapes, strictly speaking: "A polygon is a plane figure that is bounded by closed planar paths composed of a finite number of sequential line segments." ( http://en.wikipedia.org/wiki/Polygon )

Tcat:
If you just want to draw the edges/outline/perimeter of a hexagon, drawing lines would be the best. If you want to draw solid hexagons, sprites/images would be faster/easier to program. If you plan to draw them in an drawing program, I'd just use MS Paint and do some math to figure out where the 6 vertices of the hexagon should be and then just connect the dots and flood fill the shape with whatever color you need.

If the hexagons themselves need to change colors, it's possible to do it with images (but not without a lot of memblock coding), but it may be easier to glue several triangle objects together to form hexagons, and then just change the color of the objects to change the color of each individual hexagon.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 5th Jan 2007 21:17
If I had said that would it of made it any easier for him to understand?

TCat87
17
Years of Service
User Offline
Joined: 27th Dec 2006
Location:
Posted: 5th Jan 2007 22:48
I guess polygons aren't what I need. The attached Word document has a screenshot of what I am trying to duplicate. All of the hexagons in the grid rotate and change background colors during game play. (I am currently generating all of this in Java code.) Everything is currently 2D. The grid here has 7 tiles per side (the game allows up to 10 tiles per side). Each tile is an object in Java. There are 13 different tiles possible and each has 3 sizes, 6 orientations, and 4 background colors; a lot of images if I have to create and store each one seperately. That's where I thought sprite commands to size and rotate would help.

Attachments

Login to view attachments
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 6th Jan 2007 01:40
Polygons are basically flat shapes with three or more sides - starting with the triangle, square, pentagon and so on.

DB's objects are constructed of triangle polygons (most often referred to as poly's).

A cube for example has 12 poly's - six sides, each made of two triangles.

If you want polygons in a 2D program - regardless of the number of sides - and they need to be rotated, then sprites are the way to go as you have the rotate sprite command. But, this command is only in DBPro - not DB Classic.

If you only have Classic, you might want to consider doing a top down view 3D version and greate the objects in a modelling program.

TDK_Man

Login to post a reply

Server time is: 2024-11-26 23:44:24
Your offset time is: 2024-11-26 23:44:24