First steps of the blueprints concept

begla

Project Founder and Lead Developer
Contributor
Architecture
Logistics
I've played around a bit... Started out with Rasmus' develop branch, created a new branch from that and finally rebased it on top of the current develop branch. That was my starting point.

From there I first created a simple interface class for tools (currently only supporting methods for right and left clicks) and used this to create a class for the basic put-block-remove-block-tool. I used this concept to replace the switch in the tool belt (I think you had something like this planned there). It is not perfect, but it is a starting point for my prototype.

Then I created another tool which allows the selection of an arbitrary amount of blocks. I did not use this for anything specific though, but it helped me to create a simple class to render a block grid. This "monster" is very unoptimized at the moment, but it can be extended/modified very easily. I also modified some of the rendering interface stuff to support the easier addition of renderable objects at any time (like this block selection grid).

All this helped me to create the first somewhat useful tool: the rectangle selection tool. Select two blocks and all blocks intersected by the rectangle defined by those blocks gets selected while air blocks are ignored. I extended this tool to support the generation of simple blueprints and the "pasting" of a previously selected blueprint. Nothing gets saved to the disk at the moment, but this can be easily added.

So... Rasmus, please take a quick look at this concept. Maybe it is enough to get you started playing around a bit? You could evaluate combining the saving of the blueprints with Groovy and ConfigSlurper (as you mentioned in the other thread). If you give me some information on how those blueprints should be structured etc. I can continue to work on that, of course.

I've recorded a small video showing off this prototype. I'll add this here as soon as its finished uploading. :laugh: Ah and the branch is available in our repository of course. :geek:
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Woo! That was fast. Can't wait till I get home and get a chance to play with it :D
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Dang, I didn't think it was that complete before looking at the video. Dunno why, either, since you clearly included "pasting" in there. I guess it is just something else to actually see it work, especially with an entire hill :D

And by all means refactor the heck out of it - the switch was just a hack, showing that my rusty layers are still firmly in place, but beginning to flake off. I had to actually look up the proper syntax of a switch :laugh:

Code looks much improved already, getting more ideas already. Not getting more time tho, argh!

Going to try forcing myself back to finishing intro stuff so I can start poking people already. Must resist tinkering with block selection for just a bit longer! Short enough on time trying to keep up with the AI class :)
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Bump - realized after writing the Portal thread that I never realized how exactly you were doing the pasting. I played around with and looked at the blueprints and tools, but despite you clearly pasting a blueprint I couldn't find what would trigger it?

Some more notes for blueprints for us to go after at some point when we have time:

* Coloring selection boxes non-black to distinguish from normal highlight
* Tool ("pen and paper") to "store" a blueprint using a tool (to where tho? We don't have items yet, hmm). Could be as simple as left = copy target selection, right = paste from memory (again makes me feel silly for not spotting how the pasting works currently)
* Tool ("designation" - clipboard? heh) to take a selection (made by the selector tools) in the world and flag it as a particular workshop (specific to the tool - one per workshop type, embedded within a specific item later), maybe changing the color to one associated to the workshop type? Left click = designate/undesignate target selection (colors it), right click to make that target workshop designation visible/invisible (works for all workshops of that type, could also activate it as showing on a minimap)

I'll probably throw together a WorkshopManager or something over the next few days :)
 

begla

Project Founder and Lead Developer
Contributor
Architecture
Logistics
The copy and pasting is currently only possible using the rectangle selection tool. The two initial left clicks select the two blocks defining the rectangle. A third left click pastes the selection at the specified position. A right click deletes the selection and the saved blueprint. :)
 
Top