Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 290 291 [292] 293 294 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 882302 times)

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: if self.isCoder(): post() #Programming Thread
« Reply #4365 on: April 22, 2013, 08:59:16 am »

yea, that was necessary in order to get the full curve of the tab edge without images. at least the lmost logical way, there is another hack that could produce similar results without the extra divs.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4366 on: April 22, 2013, 09:42:09 am »

Try this:
It's cleaner, syntactically more correct, and 2/3's of the size of yours, however it won't work in IE 8 and lower (but who supports those anymore). I was also bored :)

Code: [Select]
<html>
<head>
<title>tabset</title>
<style>

.tabset {
background-color:rgb(100,100,100);
height:50px;
width:500px;
vertical-align:bottom;
}
div.first {
margin-left: 20px;
z-index: 10;
}
div.second {
z-index: 10;
}
div.third {
z-index: 10;
}
div.fourth {
margin-right: 20px;
z-index: 10;
}
.tabset div.tab {
margin-top: 20px;
position:relative;
float: left;
height: 30px;
border-radius: 18px 18px 0 0;
}

.tabset a {
display:block;
padding: 10px 20px 0 20px;
}

.tabset div.tab:hover {
z-index: 20;
height: 50px;
margin-top:0;
}
.tabset div.tab:before,
.tabset div.tab:after,
.tabset div.tab a:before,
.tabset div.tab a:after {
width: 20px;
height: 20px;
content: " ";
position: absolute;
}

.tabset div.tab:before,
.tabset div.tab a:before {
left: -20px;
bottom: 0;
z-index: 10;
}
.tabset div.tab a:before {
z-index: 20;
border-bottom-right-radius:20px;
}

.tabset div.tab:after,
.tabset div.tab a:after {
right: -20px;
bottom: 0;
z-index: 10;
}
.tabset div.tab a:after {
z-index: 20;
border-bottom-left-radius:20px;
}

.first a:before,
.fourth a:after {
  background-color:rgb(100,100,100);
}
.first,
.first:before,
.first:after,
.second a:before {
background-color:rgb(200,200,100);
}
.second,
.second:before,
.second:after,
.first a:after,
.third a:before {
background-color:rgb(150,200,100);
}
.third,
.third:before,
.third:after,
.second a:after,
.fourth a:before {
background-color:rgb(100,200,150);
}
.fourth,
.fourth:before,
.fourth:after,
.third a:after {
background-color:rgb(100,200,200);
}

</style>
</head>
<body>
<div class="tabset">
<div class="tab first">
<a href="#">
first
</a>
</div>
<div class="tab second">
<a href="#">
second
</a>
</div>
<div class="tab third">
<a href="#">
third
</a>
</div>
<div class="tab fourth">
<a href="#">
fourth
</a>
</div>
</div>

<div class="cool">howbout that</div>
</body>
</html>
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

DrPoo

  • Bay Watcher
  • In Russia Putin strikes meteor
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4367 on: April 22, 2013, 10:45:26 am »

How would one, with C++ make a function that displays a character at a specific coord in a windows terminal, without libtcod or other bloated packs of uselessness?
Logged
Would the owner of an ounce of dignity please contact the mall security?

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #4368 on: April 22, 2013, 10:59:10 am »

Either you do a hacky thing where you rewrite the screen every turn, or you use a 'bloated pack of useless'. >_> Console w/o a library also is terrible at getting input.

I suggest Curses? It's not bloated, and it does what you want. Cataclysm uses it.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

DrPoo

  • Bay Watcher
  • In Russia Putin strikes meteor
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4369 on: April 22, 2013, 11:20:25 am »

Ill try that. Thanks
Logged
Would the owner of an ounce of dignity please contact the mall security?

Mego

  • Bay Watcher
  • [PREFSTRING:MADNESS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4370 on: April 22, 2013, 02:33:15 pm »

Well, here I go, attempting to teach myself C#. Let's see how long it takes before I get frustrated and quit.

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: if self.isCoder(): post() #Programming Thread
« Reply #4371 on: April 22, 2013, 02:36:44 pm »

Well, here I go, attempting to teach myself C#. Let's see how long it takes before I get frustrated and quit.

Its not a terrible language, but the web stuff can be a royal pain in the ass.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

NobodyPro

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4372 on: April 25, 2013, 04:39:00 am »

*fixed*
Quote
True_Sword,_The Robinson,_Alexander Crazy_Scribe 2001 Fantasy 8803-7860-1683-6 13 29.0
I'm okay with this.

EDIT: And run into the main program I get this:
Quote
-----
Title:  Unburnt Armour, The
Author:  Clarke, Lily
Publisher:  Running Computer
Published in:  2002
Genre:  Fantasy
Stock:  2
Price: $ 40.0
ISBN:  7192-4887-1152-0
-----
Feels good.
« Last Edit: April 25, 2013, 04:58:44 am by NobodyPro »
Logged

Dutchling

  • Bay Watcher
  • Ridin' with Biden
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4373 on: April 25, 2013, 05:18:21 am »

Seems like you got some serious bugs to fix ;)
Logged

GlyphGryph

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4374 on: April 25, 2013, 07:35:23 am »

This was a bigger pain in the ass than it should have been.
I don't know what you're doing or why, but this is terrible and makes me cry! >_<
Logged

Puzzlemaker

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4375 on: April 25, 2013, 01:47:34 pm »

I got boids to work in Unity.

http://en.wikipedia.org/wiki/Boids

I think I will expand it and make a "swarmy" type game.  Downloaded a pathfinding library as well.
Logged
The mark of the immature man is that he wants to die nobly for a cause, while the mark of the mature man is that he wants to live humbly for one.

forsaken1111

  • Bay Watcher
    • View Profile
    • TTB Twitch
Re: if self.isCoder(): post() #Programming Thread
« Reply #4376 on: April 25, 2013, 02:31:35 pm »

I got boids to work in Unity.

http://en.wikipedia.org/wiki/Boids

I think I will expand it and make a "swarmy" type game.  Downloaded a pathfinding library as well.
I'd love to see that in action...
Logged

Puzzlemaker

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4377 on: April 25, 2013, 05:48:38 pm »

Working on it now.  Figured out how to make them not be so stupid (Pathing was interfering with the swarming, I figured out an awesome solution; when they collide, share pathing information and choose the more pertinent one).

Once I have something I am proud of I'll share it.
Logged
The mark of the immature man is that he wants to die nobly for a cause, while the mark of the mature man is that he wants to live humbly for one.

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4378 on: April 25, 2013, 06:10:32 pm »

Working on it now.  Figured out how to make them not be so stupid (Pathing was interfering with the swarming, I figured out an awesome solution; when they collide, share pathing information and choose the more pertinent one).

Once I have something I am proud of I'll share it.
Wait, why do your boids even need pathing?
Logged

Puzzlemaker

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4379 on: April 25, 2013, 07:12:53 pm »

Working on it now.  Figured out how to make them not be so stupid (Pathing was interfering with the swarming, I figured out an awesome solution; when they collide, share pathing information and choose the more pertinent one).

Once I have something I am proud of I'll share it.
Wait, why do your boids even need pathing?

Getting the boids working was easy.  But I want them to path through an area as a group.  Like a swarm of bees.  That way I can actually use them in a game type thing.  I am going to set it up so they automatically avoid areas that they died previously, and with the swarming and pathfinding should make it interesting to fight against.  Sorry I wasn't clearer.

Think of the idea like a zombie game, but the zombies are smarter and they work in groups better.  That's what I am aiming for.
« Last Edit: April 25, 2013, 07:17:31 pm by Puzzlemaker »
Logged
The mark of the immature man is that he wants to die nobly for a cause, while the mark of the mature man is that he wants to live humbly for one.
Pages: 1 ... 290 291 [292] 293 294 ... 796