text
stringlengths
1
330k
def main():
# Pygame stuff
screen = pygame.display.set_mode((640,480))
pygame.display.set_caption("Parallax Starfield Simulation")
clock = pygame.time.Clock()
while True:
# Lock the framerate at 50 FPS
# Handle events
for event in pygame.event.get():
if event.type == pygame.QUIT:
if __name__ == "__main__":
Click here to download the source code.
In this tutorial we made a vertical parallax starfield. Try to modify the code to make an horizontal starfield.
That’s everything for now. In the next tutorial I will show you how to make a 3D starfield simulation.
What do you think about this? Please comment, share or subscribe.
1. Fantastico
2. I came up with a modified version of this code that makes the star speeds floating-point (so there’s not just 3 visible layers of stars) and uses an image for the stars, among other minor tweaks:
Since the original code here wasn’t explicitly placed under any license, I’ve tentatively licensed my modified version under the MIT license. (if I should change this, please let me know!)
• Hello David. Thank you for sharing your code with us. I have tried your code and it looks great.
I have no concern about the use of the MIT license. Indeed, I am considering using the MIT license as the standard for my blog.
3. Hey, thanks for the code! I’m using it to build a simple space shooter.
I turned it into a class if anyone is interested: http://dl.dropbox.com/u/41670/stars.py
• Hello Nick!
I am glad to hear that.
I would be glad to play your space shooter as soon as you finish it.
Please, let us know of your advances.
Thank you.
4. Cool and simple demo!
It took me maybe an hour to port it to Delphi XE2 and FireMonkey for iOS.
5. Hello, just wanted to say, I liked this blog post. It was helpful. Keep on posting!
Reply to www.jddesignwebmstr.com ¬
Cancel reply
Monday, March 18, 2013
The Euro crisis as "Cheese Touch"
My favourite scene in the first 'Diary of a Wimpy Kid' movie is the 'cheese touch'. A piece of mouldy cheese is left in the schoolyard, and the kids keep well away from it as it gets greener and slimier. Until, one day, someone touches it - and they are ostracised until they can pass it on to someone else who will get ...
The euro crisis is starting to look a bit like the cheese touch. The banking crisis of 2007-8 created a financial blackhole, and at some point we are going to have to come to terms with the losses and start from scratch. But of course none of us want to take the losses ourselves. In the absence of some kind of sensible...
The answer has got to be that the burden of adjustment is shared. This is for moral, political and economic reasons. Morally, because, well, life isn't fair but it shouldn't be Mad Max. Politically, because unless we give up on democracy, the victims of adjustment will protest and remove representatives who impose unfa...
Who decides how to share the pain of adjustment? In Wimpy Kid, the responsible adult - the school janitor - is also disgusted by the mouldy cheese and sweeps around it. The EU is probably our demotivated janitor. And in Wimpy Kid, the cheese touch's journey around the school ends when it lands on Dieter Muller, a Germa...
Avalokitesvara statues (rupas)
Bodhisattva of Compassion
Avalokitesvara statues, embody symbolically Chenrezig/Avalokitesvara, lord of the Dharma who looks upon all beings with infinite compassion. He is known as Chenrezig in Tibetan, kannon in Japan and Kuan-yin in china. His mantra is “om mane padme hum”. Avalokitesvara is the Bodhisattva of Compassion and the essence of t...
toy royal mail van with parcels
We have no ‘buy now’ facility because we need to calculate the best postage and packing price for your order. We will invoice you with the total cost.
Help with making a heatmap
I want to make a heatmap that tracks the user sessions as described on this page:
I want to mimic the heatmap from that example.
How exactly do I make a similar heatmap on Kibana? When I search for a log line of "user logged in". I get a count but I cant seem to group this count like the example. Here is what I get:
(CJ Cenizal) #2
Hi there, I've put together a small demo using our sample data:
In this example, I used the hour_of_day field to create Histogram bucket for the X-Axis. If this field isn't available in your data, you could look into creating a scripted field to extract the hour data from your time field.
Does this help?
That helped thanks, there is only one small issue where the Y axis is not sorted by the day like in your example image:
(CJ Cenizal) #4
I'm not 100% sure of why you're getting these results, but it's possible this is due to a bug that will fixed in the 6.5 release:
Yeah sorting it will most likely fix it, thanks for the help and I have marked your answer as the solution.
(system) #6
Engagement Rings Brundage Jewelers Louisville Kentucky
Brundage Jewelers
141 Chenoweth Lane
Louisville, KY  40207
Ph 502-895-7717
Looking for wedding rings is a stressful time, come let us help you find the perfect rings at Brundage Jewelers. We have an experienced staff that can create a diamond bridal ring for you if you cannot find that perfect piece. Brundage Jewelers has a wonderful collection of engagement rings to meet your wedding needs.
One of the most significant events in any anyone’s life is an engagement, a time when one  accepts a proposal of marriage from their beloved. A sign of love and commitment a diamond engagement ring will be cherished forever. Therefore, an engagement ring purchase should not be a rushed decision. For most, a primer in d...
Centro Cultural Costarricense Norteamericano is host to EducationUSA, a program of advising in the area of higher education.
EducationUSA offers guidance and informational talks on the system of higher education in the United States of America, as well as cross cultural orientation and constant updates on educational opportunities in that country.
In Costa Rica, the Educational Advising center is the exclusive affiliate of the US State Department, authorized to provide information on the scholarship programs offered by the US Embassy.
Additionally, this office provides accreditation services on behalf of the Costa Rican Ministry of Education for primary and secondary school studies completed in the United States.
For a meeting with an advisor to find out more about EducationUSA services, or for information on requirements, costs, admission processes, etc, please send an email to, or call 2207-7592.
You can also visit and our Facebook page: EducationUSA.CostaRica.
Chocolate Poached Pear and Beets
Chocolate Poached Pear and Beets
By: Rose Marie Jarry, Master Chef at Kronobar
40 minutes, 3 servings, gluten-free, vegan.
• 3 whole pears
• 2 cups water
• 3 tablespoons apple cider vinegar
• 3 tablespoons organic cane sugar
• 1 tablespoon vanilla extract
• 1 cup small diced raw beets
• ¼ cup dark chocolate to melt
1. Peel the beets and pears.
2. Dice the beets into small pieces.
3. In a not too large saucepan, pour the water and add the beets, sugar, apple cider vinegar, and vanilla. Bring to a boil and then reduce to medium heat. When it starts boiling, add the pears to the beet water. Let it simmer for 30 minutes.
4. Make sure the water covers the pears. This is why we used a smaller sauce pan.
5. Using a double boiler, melt the chocolate in the top bowl. Keep warm and set aside.
6. After 30 minutes, remove the pears from the water, drain the leftover of water and keep the beets pieces.
7. Place the pears on a plate.
8. Use the diced sweet beets to cover the bottom of the plate, drizzle melted chocolate all over the beets and pear.
9. Serve warm or cold.
10. Enjoy!
1. Become a DoA Archivist!
Volunteers Needed!
Dismiss Notice
Mirodoll Banned from DoA
Dismiss Notice
Feedback Thread for Rosa
Jul 11, 2006
1. Updated 6/21/2007 and I always feel like I'm forgetting someone...
Anyone is welcome to add. These are pretty much added in date order...
Great Doll Transactions