Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - InCreator

#641
Well, to *know* that there's a collision there I have to *check* it, right...?

So -- erm... it's collision-check routine this way or another. If i'd let game magically know where collision areas are, I wouldn't need spiral checking at all?
#642
Yes... well, spiral decides to which square should unit *start* looking the path to. Pathfinding itself is grid-based A* which works quite well.

QuoteWouldn't you not want to iterate through collision because it's just wasted work?
I have no clue what you just asked  :P

Spiral IS for figuring out which nearby squares are collision-free when middle (the clicked onto) one isn't. Also, when there's a group, every unit reserves itself a square (even before moving) and every unit after first one uses spiral to get theirs.

Now, buggy and stupid part in this is that other units cannot occupy or pass those squares even when unit meant to stop there is still half a map away... but I'm looking solution for this one also.

Maybe program different logic for pathfinding to define "pass while moving" and "stop moving on" squares?  or skip reserving and do spiral checks more often.

I'm still not sure if programming is fun or frustrating. Feels both...  :P
#643
Well, it's used for 2 things: grouped unit movement and position when unit is built from a house.

Let's say I have 9 units grouped. I click on a square. Now, one unit can occupy this square. But what should others do?

Of course I want other units to go as near as possible also.  Logic says that using infinite (or rather really big) spiral would generate closest possible waypoints. And infinite because it doesn't care how much units are selected. it will go spiraling outwards until free square is found for every unit.

For speed purposes, I will either limit maximum amount of units grouped or simply let game fail pathfinding if spiral gets too big, otherwise pathfinding would simply get super slow for masses.

As for collisions, I haven't given it much thought yet but yes, I'll probably simply mark everything unwalkable as not-free-square and continue spiral checking until squares are found.

Also, spiral motion is what you see in old RTS games where units are created from building: they occupy squares around building in same way. That's what led me to spiral.

I'm trying to get atleast something on the level of warcraft 1/Dune 2 etc. So I try to keep things rather simple - spiral doesn't let me use unit formations, for example. But that would be way above my skills too.

...
In the past I used to count number of grouped units, taking a square root of their amount and building a square-shaped grid of waypoints, but spiral feels much more reasonable here.

EDIT: ...and after lots of coding and fixing, problem is solved! Thanks again everyone, especially Radiant for figuring out simple logic behind spiral. Following is already computer-generated image using the logic supplied above, nothing was hand-drawn, a spiral of 150 steps, number shows repetition amount in one direction.



#644
Aha!

Radiant, you quite simply pointed out what I need -- to check z amount of squares, adding 90 degrees to move direction, repeat, and then add +1 to the z and restart loop. I didn't notice such logic in this.

Yeah, that's an usable pattern and loop.  I can do boundary checks simply by putting upper limit to z so pathfinding wouldn't last forever and would fail if no free square was found after z reached some number.


Thanks! Others too, since after adapting, I can chop something together from this code.
#645
I'll start with an image, since text will be messy...



Observe. Starting square is (x,y). I drew only a quarter of the "circle" to keep it simple.

On 8 directions, there's a clearly visible pattern. We add or subtract an incremental number to X and Y, forming a cross similar to the one on UK's flag.

Now, in a code - as I drew, we would need 8 lines to define the possible variants of square position and a variable for increment. This would be simple for any amateur programmer. It would cover all squares I drew position values to -- to infinity. That's the amount of problem I *can* solve...

But as spiral gets bigger than 9 squares, there will be gaps... and uncovered variants will be infitite (squares marked with asterisk) so manual checking would be wild and some smart snippet of code should do it.

What I want is some kind of pseudocode to do grid checks in a perfect spiral. Code that spirals outwards and checks EVERY square, not only in 8 directions.

By pseudocode I mean anything readable to AGSer/C/delphi/basic programmer. All of those languages are similar and I guess that it's behind some simple (and similar in all languages) -  trigonometric function, but cosines and tangents at school managed to avoid me like cats do water.

It's not AGS-related really, I'm trying out my hand on real-time strategy game and this is last bit of pathfinding I cannot figure out.

EDIT: Fixed error.

Also, thinking about it, i've heard about crazy mathematical term "modulo"... could this be applied here? how?
#646
...Bluetooth?
Ask a friend-whoever who has neater phone to aquire song however (s)he could (USB, net, whatever) and bluetooth it over to yours.

Also, what phone are we speaking about? Mine has also M2 memory card, which - packed into plastic "enlarger" adapter - I can actually plug right into my card reader on computer
#647
Windirstat helped alot, thanks... Really "nice" to find useless 150GB folder full of junk just after you've erased load of more important things just to free up space  :P
I'm too lazy to write DVDs anyway ::) And even if I do, they end up stuck somewhere between bookshelf and wall on the floor, to be found on some spring cleaning year after
#648
* Webattack didn't have anything useful. Thanks anyway
* Total Commander? Tried a bit. Despite windows-look, it's still pretty much old-good-loved-Norton commander. I have it installed on my work computer but never found excuse to actually use it... yet.

I remember back in 1996, I totally refused to go with Windows 95 because I was able to navigate any folder DIRECTORY with Norton Commander in 2 seconds, using keyboard, or do any other file function, from copying to renaming to... I still remember most of the keys.
Mouse felt so... slow and useless. And when TC came, Windows-look on Total Commander felt so... crappy.


But yeah, it's awesome. With good search function and directory info, it might do the trick, thanks.
#649
I got 2 terabytes and 5 years worth of mess on my 3 hard drives and decided to do some clean-up.

Problem is, my both hard drives have survived over uncountable windows reinstallations, attempts to start over "organized", duplicate installations of same program, etc... and therefore, it's one helluva mess.

While everyday-essential stuff is more or less reachable, there's folders and files that need -- er -- archaeological approach.

Like misnamed big files, too well hidden pr0n ::) suspicious & LARGE files without extension, billion "this time I will keep it clean"/"save it wherever, erase later"-kind of download folders, impartial download files from numerous P2P programs I've had in the past, all kind of art, music and game projects that are forgotten or lost and covered with spider webs... and so on.

What I want to do is complete overview what's on my hard disks, is there some files where they don't belong & where they are, etc.

So basically, a program that gives me sizes of folders, finds files by size (under/over some size limit), finds all that hidden or forgot junk and so on.

Windows 7... doesn't really come with any tool to do this. Even search function doesn't start anymore for me   :P

I tried googling, but found only something named "simpli-file statistics" which doesn't even install since it fails to detect .NET framework even AFTER I installed both old 1.1 and that new beta. Maybe it's some kind of Vista incompatibility. So,

Does anyone know a powerful, Windows 7 (or Vista, same) -compatible tool to solve my mess?
#650
Well, I plan to go for a scouting trip to my countryside tomorrow and bring a laptop :-X with me. And 2,5m USB extender.
Also tinfoil... lot's of it :D

If I can try out reception here and there and maybe some DIY directional antennae/reflectors, I would have a clearer picture of what to do next.

But if all fails...
...there's a tavern with internet connection next door. Maybe with a little sum and about 50m long network cable things would turn out even better.

Not sure where would I acquire the cable though. My vacation is a week away so there's time to get ready.
#651
1 Megabit, I meant  :-X Reading tons of material on gigahertzes and megabits etc stuff made me make this typing/measurement error...

Well, I finally came up with rock solid plan.
I will gather all the humorists here and make them stand in line, holding mirrors and reflect signal at my machine.

That'll work.


#652
Maybe I should stay in city :P
#653
Well, to put anything electronic into garden, I would need protection from rain and moisture, and also a loooong power & network cable.

Cabling costs money and so does in-out router. My current router takes internet from cable and transmits over WiFi, but doesn't receive from air. So I use USB receivers.

I'm still leaning towards buying a good directional wifi antenna for whole setup. Or try to make one out of Pringles'  can :D

EDIT: Reading further, I learned that for WiFi, "direct eye contact" is absolutely needed (Or specifically, direct contact for 2,4GHz radio waves, which is often similar to direct contact for visible light, with few exceptions, like thin walls etc), and pine trees (or trees overall) are considered as barrier for such signal. I read a story where tree was between wifi bridge and it worked okay during winter. But when tree grew leaves, connection went dead.

This sounds like serious problem. I can move receiver high enough to pass the house, but not pines. And there's quite a few in the way.
Still fighting the problem!
#654
4,5 metre limit comes both from signal and power loss. USB has little voltage of which, more gets loss the longer the cable is.
I did some soldering & tinkering for audio at teen age, so I know that loss is actually quite high. Especially if there's cable cut and extended somewhere inbetween.

In terms of internet connection, it probably means both weak antenna (due power loss) and bad connection - CRC failures etc.

Ethernet, wireless bridge... I have no clue what that means  :P
Care to enlighten me?'

P.S. Elephant picture is wrong, since there's a laptop on image. Otherwise I'd replace elephant with a pine tree.
#655
Thanks.
I researched if further and bah, USB cables are maximum 4.5 meters long :( what a shame

Well, so it leaves me with only roof.

I tried really quick with simply ripping Lay's chips pack to a sheet and positioning reflective side around USB reciever -- it actually found 2 extra networks and improved found ones by a bar or two... so the DIY reflectors actually do work. And here, in city, I'm surrounded by concrete walls, not wooden house as it will be at countryside.

And with my grand plan failed, I think I need every bit of signal I can get.

My router - unfortunately, doesn't recieve WiFi signal, only transmits.

...and well, deals with neighbors won't work. Not in this county... and even country!

Last altenative I have is to dish out some cash and buy a solid wi-fi reciever. Not some USB-joke, but more serious one. I can stay at countryhouse and I can use it always when I'm there... I don't like this option at the moment, but mostly because I'm not sure if it would actually improve anything or just waste money.
Or would it? And which kind of weapon should it be then, considering distance and signal? It's not like I know anything about those :p
#656
Okay... a bit technical thread, but I haven't made one for a long time.

:: Prologue ::
I'm planning to have my 3-week vacation at country house.
3 weeks with camera, endless photo-opportunities and my darling machine. 3D-textures ahoy!

Problem is, there's no internet... and sooner or later I need internet. I will die without internet.
Also, it's raining all time. Especially there, since I live stone throw away from sea.

Shadowless, cloudy weather is perfect for 3D texture shooting, but I cannot do it 24/7, so I need internet in-between to amuse myself.

Okay.

:: Situation ::

Is following: About 160m from my house is one of 2 wifi transmitters in whole county. It's a local public library.


Rumors say that this particular wifi transmission reaches about 175m and has speed of 1GBit at best. I tried last summer, and from my house, I didn't get signal strong enough to have a working connection. Just some hopping on-off one barful of internets (in terms of windows wifi stuff). That's clearly not enough.

It looks like this:


"Normal" people would take laptop, sit infront or inside library and do their mail checks and facebook updates, but my lifestyle is a bit different - first, laptops are doings of devil, and second, I live at night.

So, I need to think of something.
Having fiberoptic cable in my reach always, I don't know much about WiFi thing. Only as much as I set up a wifi router to supply my cable connection to rest of 2 computers in my apartment.
As I mentioned, I've never been (and never will be) a laptop user, I like cables. Lots of em'.

:: The plan ::

I thought of using cheap USB wifi reciever (I have handful of those, they always break quickly) and moving it closer to the local library.
There's 2 versions:

1) Move it to the corner of the yard (thus being about 145m from transmitter, see picture below)
2) Move it to the intersection of little street to our house, at the corner of main street (100m from transmitter, see picture above)



3) Aquire super long USB cable to do this (will be really, really complicated)
4) Make some kind of cheap reflector to get more signal

About reflector: I've watched some DIY videos on this, the windsurfer and that one where all kinds of cheap kitchen utensils are used, bowls and tinfoil.

My own idea was to make much bigger reflector, and use carton or cardboard for this. I work as a designer for corrugated board-made stuff and I could make quite precise model with CAD & get good material for this. Either carton & tinfoil or even Metalprinted carton (which might or might not be super for such thing).

There's also a possibility: move reflector & transmitter to the roof. It will be considerably easier to do, I could make a high mast for this and use less USB cable (which is impossible to aquire I think).

:: Questions ::

...are:

1 )  Does whole thing have a point?

2 )  Could there be big difference between mentioned 105m and 145m reception? I couldn't use reflector with 105m version, only plain USB reciever hidden behind mailbox or bush so people on street wouldn't steal or break it.

3 )  Could mast & roof thing work better than moving closer to transmitter?

4 )  Would bigger reflector do better job than small one, and would it be considerable plus?

5 )  To keep USB reciever from rain, I think I have to cover it with little opaque plastic bag. Would it make connection worse?

6 )  Can I make my own long USB extender? I have some short cables around, would cutting one in two and putting wires between work? I'm not into soldering and such electronics much - so it would be messy, and I'm afraid that over 20-40 meters, that weak voltage USB-port provides (9V if I'm correct) would simply be lost in wires so antenna would work even worse if at all.

7 )  Can I fix issues of #6 with a battery...er... somehow?

8 )  Is there a sane alternative to my let's-make-long-cable madness?

Anyone who thinks (s)he might say something useful or has any thoughts on issue, I'd be really thankful.
#657
General Discussion / Re: firefox issues
Tue 21/07/2009 10:40:18
Using firefox 3.5 beta, which feels like lightspeed-accelerated compared to FF3
Also, built-in video/flash playing and less need of plugins of any kind makes it worth every second

ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-1.9.1/

I had cookie problem... with FF2? It solved with FF upgrade
#658
Critics' Lounge / Re: Faty Character crit
Mon 20/07/2009 16:08:00
Keep the original(different arm pos) character and shade it like Brad did (use same colors too).
Or use Brads body with original head.
Perfect.
#659
Critics' Lounge / Re: Paunch Characters' C&C
Sun 19/07/2009 20:02:19
Nothing really, IMO. They're pretty cool as they are now. Robin could wear a hat though. Ogre reminds me of Gobliins somewhat... http://img4.abload.de/img/gobliinsbjxko.jpg
#660
Is heavy voice resampling allowed? Like putting a vocoder and shitload of filters over the sang lyrics?
SMF spam blocked by CleanTalk