Author Topic: What are you working on? :D  (Read 34845 times)

0 Members and 1 Guest are viewing this topic.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: What are you working on? :D
« Reply #555 on: December 04, 2011, 08:40:02 PM »
Anyways, nice to see you here! Were always looking for fresh faces  ...hooded figures made of binary strings.

Pilchard, a bot in a human disguise!

Anyways, cool to hear about your ideas, I'm here to help, unless I'm at school or sleeping, if you come to need help :P

collapsoul

  • No Intel Inside
  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 54
  • a bot in a human disguise
Re: What are you working on? :D
« Reply #556 on: December 05, 2011, 05:56:26 AM »
There's a few rallying systems that shouldn't be too hard to drop into a map. Mine, I know shouldn't mess with the game.
Well, you may be right. Maybe it's better to start off with something less complex and to use some modules that already has been released to not be sunk down by own ambitions. In RPG, for instance, you never go for raid-boss if you're level one ;) Gonna think on it.

Also, how does your computer still work? I though P4 chips were designed to overheat and explode?
Nah-uh. Old horse runs good and feels alright since mid 2006. The only part that required replacement since this time was power supply unit.

Anyways, nice to see you here! Were always looking for fresh faces  ...hooded figures made of binary strings.
Thx, and it's nice to see that community ain't hibernated completely. Such a pain being a slowpoke like me ;)

I might dust of the old programmer's notepad and restart my AI experiments, too.
Been watching Merchant vs Infected and Merchant vs Mihhaelo's AI guy. Been, like, amazed. Wanting moar show. Dreaming of participation  8)

Pilchard, a bot in a human disguise!
A somewhat 'matricized' Darlok actually. They were my all-time favourites at MOO series.

Anyways, cool to hear about your ideas, I'm here to help, unless I'm at school or sleeping, if you come to need help :P
Hehe. Shall do my best to keep you busy  :P
You never get involved in a pig fight. If you do, three things happen: you get dirty, you get tired, and only the pig has fun.

collapsoul

  • No Intel Inside
  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 54
  • a bot in a human disguise
Re: What are you working on? :D
« Reply #557 on: December 06, 2011, 09:56:55 AM »
ok. Tryng to generate random irregular convex polygon (next step will be to populate its edges by asteroids, overall goal is a spiderweb-like design consisting of several such polys and connectors between vertices)

Anyone knows a better way of doing this poly than to seed a plenty random points and pass them to one of the following algorythms: Gift wrapping / Graham's scan / Quickhull / whatewer there are else?
You never get involved in a pig fight. If you do, three things happen: you get dirty, you get tired, and only the pig has fun.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: What are you working on? :D
« Reply #558 on: December 06, 2011, 01:33:35 PM »
A web like this:



or anything else?

That web is incredibly easy to replicate, just use sin and cos and multiplay by size, there you have the points, now to connect them... Thats also easy xD

A little code showing howto:

Code: [Select]

local points = 6

for point = 1,points do
 
 local angle = (point/points)*(math.pi*2)
 local angle2 = angle
 
 DrawSprite(1,X[roid]+math.cos(angle)*size, Y[roid]+math.sin(angle)*size, 1, 1, 1, 1, size/points) --DrawSprite(ID,X,Y,R,G,B,A,Size)
 
 if (point == points) then
 
  angle2 = (1/points)*(math.pi*2)
 
 else
 
  angle2 = (point+1/points)*(math.pi*2)
 
 end
 
 DrawLine(X[roid]+math.cos(angle)*size, Y[roid]+math.sin(angle)*size, X[roid]+math.cos(angle2)*size, Y[roid]+math.sin(angle2)*size, 1, 1, 1, 1, 1, 1, 1, 1, (size/points)/1.33)
 
end

Hope you get what I mean, there are variables missing and stuff, but that's how :)
« Last Edit: December 06, 2011, 01:41:40 PM by Aino »

collapsoul

  • No Intel Inside
  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 54
  • a bot in a human disguise
Re: What are you working on? :D
« Reply #559 on: December 06, 2011, 03:56:00 PM »

or anything else?

Something else actually ;)

Hope you get what I mean, there are variables missing and stuff, but that's how :)
The code is clearly understandable, thanks. Though it's not quite what I meant, it will certainly come handy at some point anyways.

Now, moving to what I'm trying to achieve here...
This web of yours consists of regular polygons. I meant irregular ones, i.e. they should have sides unequal to each others, therefore same applies to their angles.

Attached is a sketch example of what my goal sequence is.

Line 1: generate random convex poly
Line 2: concentrically replicate it inside/outside itself random number of times
Line 3: connect vertices accordingly
Line 4: populate this calculated carcass with asteroids - more or less regularly. There are three options:
 - asteroids lie on vertices only (first image of line 4)
 - asteroids lie alongside lines only (second)
 - vetices AND lines are used (third)

The reason behind all of this vanity is that I wanna get a stylish-looking map either with sufficient number of organically placed dead-ends (vertices only option) or without any dead-ends at all. Dead-ends are very strong strategical bonuses when there are more than two competitors aboard - they need no defence, all seedlings may freely be drawn from them. When I find myself surrounded by some enemy empires in such a way that all of them cant compete anyone else but me - well, it's chalenging... but still way too unfair. That's how this layout invaded my brain =-)

Anyhow, the algorithm creation is underway currently (chosen simple "Gift Wrapping" route). Dunno how much time it will take. I'm a coder, but all my previous experience lies within relational data base manipulations area - nothing game-related or just graphical. (Oh, FoxBASE, FoxBASE, old friend, where have you gone? What have you become since? All that left are nostalgic teenage memories...)
You never get involved in a pig fight. If you do, three things happen: you get dirty, you get tired, and only the pig has fun.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: What are you working on? :D
« Reply #560 on: December 06, 2011, 04:36:00 PM »
just use the example I gave you and just make an array for the sizes, arrange them from 5000 to 20000 and you get the web.
To achieve the multilayered web, just do a for loop inside the for loop with the amount of layers, and then just do size+(layer*layer size)

Easily achievable :D

Edit: Oh, didn't see the asteroid in between :/

Anyways, you can just do atan2 between them and use sin and cos. That's how I'd do it though :P

How to do atan2: math.atan2(roid1.Y - roid2.Y, roid1.X - roid2.X)
« Last Edit: December 06, 2011, 07:24:50 PM by Aino »

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 3
  • Posts: 148
Re: What are you working on? :D
« Reply #561 on: December 06, 2011, 06:53:54 PM »
I had an idea for a "web" - based map with spider animation a while back, and tried to generate concentric circles with spokes using a simple looped formula versus drawing the whole thing mechanically. Although successful, it became apparent to me that rendering the number of line-segments necessary for my vision created quite a bit of lag, and so I abandoned the effort. Since I am not a programmer or mathematically gifted, maybe I was just being inefficient with my code. My computer is also very slow so that could've been part of the problem, too.

From that experiment I eventually just created this little program for animating a wheel or regular polygon. You can adjust the parameters to achieve different effects and appearances. I'm easily amused like that!
« Last Edit: December 07, 2011, 05:43:45 PM by Lost Seedling »

collapsoul

  • No Intel Inside
  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 54
  • a bot in a human disguise
Re: What are you working on? :D
« Reply #562 on: December 08, 2011, 06:31:53 AM »
Oh well. I simply done it the way I originally assumed to do it, and it works exactly as I want it to. Done so because school and university are past. Since then I accidentally managed to forget most part of the trigonometry. In other words, I left her. Now this Trigonometry chick seems to be sooo offended... Bites and kicks me randomly :) I have yet to befriend and tame her once more ;) That seems to be inevitable though if I decide to stick with mapping/modding.

So here's a demo. Step 3 from my pic done so far. Selecting any asteroid generates new pattern. Thought about some optimization first, but my single-cored granny processes those nasty nested loops in milliseconds anyway, so this part is considered done.

Next I'll just populate lines and intersections with asteroids. SendDistances, Radiuses, mutual reachabiities, their dependencies on minimum line lenghts, proper randomizations etc... Seems not too complicated (holding fingers crossed ;) )

As for spider... Several different thoughts, none finished  ::)

<edit> foud rare happening bug. Line 188.
Code: [Select]
webangle = 0should be
Code: [Select]
webangle = -1to be sure that all works as intended. Anyway, it happens approx 1 time out of 50...
« Last Edit: December 08, 2011, 06:40:30 AM by collapsoul »
You never get involved in a pig fight. If you do, three things happen: you get dirty, you get tired, and only the pig has fun.

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 3
  • Posts: 148
Re: What are you working on? :D
« Reply #563 on: December 08, 2011, 07:12:14 AM »
Wow! Very nice. My head is spinning but I had a good laugh at 287.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: What are you working on? :D
« Reply #564 on: December 08, 2011, 01:49:14 PM »
Wow! Very nice. My head is spinning but I had a good laugh at 287.

Haha :P

Good job, Collapsoul :)

collapsoul

  • No Intel Inside
  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 54
  • a bot in a human disguise
Re: What are you working on? :D
« Reply #565 on: December 08, 2011, 04:22:17 PM »
Next I'll just populate lines and intersections with asteroids. SendDistances, Radiuses, mutual reachabiities, their dependencies on minimum line lenghts, proper randomizations etc...
...and that's when I must thank RingDesigner and its authors for its existence! Currently implanted the web-drawing thingy into it and estimating variations of roid values of all sorts, writing down reasonable boundaries =-)

Arts Project will do later on too. Got bold plans for visuals.
You never get involved in a pig fight. If you do, three things happen: you get dirty, you get tired, and only the pig has fun.

collapsoul

  • No Intel Inside
  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 54
  • a bot in a human disguise
Re: What are you working on? :D
« Reply #566 on: December 09, 2011, 06:22:55 PM »
Anyways, cool to hear about your ideas
It appears that you have already done something very similar to Nebula which I've listed as planned. Holy Pluck. Sorry. Didn't mean any plagiarism. The only difference is that my plan was to bind those coloured transparent sprites to/near asteroids and make em big and dynamic (pulse/move slowly). Like, Nebula's insides. Well, I understand that those are released for public use. Just won't state anymore that such effects were my idea at first place.
You never get involved in a pig fight. If you do, three things happen: you get dirty, you get tired, and only the pig has fun.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: What are you working on? :D
« Reply #567 on: December 09, 2011, 06:27:29 PM »
Heh, don't worry about that. Even if I made it, it's always cool to see more :)

collapsoul

  • No Intel Inside
  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 54
  • a bot in a human disguise
Re: What are you working on? :D
« Reply #568 on: December 12, 2011, 09:42:52 AM »
Next I'll just populate lines and intersections with asteroids. SendDistances, Radiuses, mutual reachabiities, their dependencies on minimum line lenghts, proper randomizations etc... Seems not too complicated (holding fingers crossed ;) )

Indeed, it's not any much hard to position roids at where they belong to - along web lines if you use this:
Quote
x=(x₁+λx₂)/(1+λ),  y=(y₁+λy₂)/(1+λ).
where λ=L₁/L₂
where L₁ and L₂ are lenghts of two lines we get by splitting initial one with point we calculate.

Max roid radius is also easy to calculate - it depends either on minimum web line length or, more often, on minimum distance between two parallel lines of the web (calculated as a height of the trapezoid shaped by four adjacent vertices)

Now to what is really challenging here... Surprisingly or not, it's task of reducing overall resulting asteroid count. I'm trying to arrange send distances in such way that you can't hop from one line to the parallel one, only using the "node" roids at vertices. So layout is happening to be somewhat condensed because of SendDistance severe reduction. Who for his life's sake would play a map consisting of 200-300 asteroids - even with proper rally system? 4k seedling limit is too easily hittable.

So atm I'm tweaking web generation parameters, hoping to find the balance between roid count and pattern diversity.
You never get involved in a pig fight. If you do, three things happen: you get dirty, you get tired, and only the pig has fun.

collapsoul

  • No Intel Inside
  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 54
  • a bot in a human disguise
Re: What are you working on? :D
« Reply #569 on: December 20, 2011, 10:02:09 PM »
Whew. Last week (weekend included) were very busy. Now back to it. Finally all calculations are made. Took 31 804 bytes (782 lines) to justify it all as it should be. I consider that 'total done' percentage counter is somewhere about 45..50% now.

Now ready to place actual roids and go on with rally system (notice roid counts, less cause the mess (tree caps will not be big though); so rally is inevitable, I dont' want players to get upset of all clicking). From all rallys that are already existing, Pilchard's one is which I like the most, as simpliclty is the key to user's well-being.

Planned is something mathematically average between Pilchard's and Aino's ones, but I got a different UI paradigm for it in my mind.
You never get involved in a pig fight. If you do, three things happen: you get dirty, you get tired, and only the pig has fun.