Make a Game. Win a Bitcoin.

00
Days
00
Hours
00
Mins
00
Secs

Until Jam Ends on Apr 18

Posts
Pinned
Rules for Posting - Read me!
Some rules and guidelines to keep in mind as you share your great work on our boards: 1 - Be kind and courteous to others 2 - Make sure that any feedback you provide is constructive. 3 - Outside links are allowed, but you must provide the source. Ideally, things that you post will have been created on Repl.it. 4 - Avoid posting overly promotional material - the focus is, and always will be, a programming, learning, and collaborative community. :) 5 - Don't spam / keep things SFW (Safe For Work). We may revoke your access to these boards if you are found to be in violation of any of these rules. Feel free to ask clarifying questions. Last updated 7/10/18 12:09 PST
61
posted to Share by timmy_i_chen (596) 9 months ago
Pinned
👾We're hosting a Game Jam! 👾
# Our First Game Jam! You asked, we answered: **on March 18 at 12:00 AM PST, we’re kicking off our next challenge!** ### The theme & our grand prize You might have heard that our grand prize is 1BTC ($3,829.00 USD... give or take depending on the day!). In light of that, the theme is cash. Crypto, fiat, paper, coin... whatever cash means to you. ;-) ### How to submit Submitting is easy! All you have to do is: 1. Start a project by picking a [language/framework](https://repl.it/repls). We recommend checking out Pygame, LOVE2D, Tkinter, and Java Swing. 2. Share your repl on the [challenge board](https://repl.it/talk/challenge) Make sure to do this by **April 18, 2019 at 11:59 PM PST.** ### Our winners **First Place & Best Overall Game** **Best Individual Game** **Best Group Game** **Best Story** **Best Graphics** **Community Vote (Honorable Mention)** ### How to work in a group You can submit individually, but for this challenge, you’re also more than welcome to submit as a group. Groups can collaborate together in real time using **Multiplayer**—learn more about how to use it [here](https://repl.it/site/blog/multi). (If you want to work in a group but can’t find one, we’ll be informally matching people on our [Discord server](https://repl.it/discord) under >Challenge >#matchmaker.) ### Starting with tutorials for inspiration We know designing a game in a month is no easy feat. Here are a few tutorials to help get you started: * [A starter guide to Pygame](https://repl.it/talk/learn/A-Starter-Guide-to-Pygame/11741) * [How to make a puzzle platformer with HTML5 and Javascript](https://repl.it/talk/learn/How-To-Make-A-Puzzle-Platformer-In-HTML5-And-Javascript/7584) * [How to make a phaser game with HTML5 and Javascript](https://repl.it/talk/learn/Making-a-Phaser-Game-with-HTML5-and-JavaScript/7593) * [Build AI game with p5.js and ml5.js](https://staging.repl.it/talk/learn/Build-an-ML-app-with-just-a-little-JavaScript/10372) * [Game Tutorial: Canyon Runner](https://repl.it/talk/learn/Game-Tutorial-Canyon-Runner/5748) * [Text-based adventure games in Python](https://repl.it/talk/learn/Cave-Commander/7029) * [JavaScript Games: Lesson 1, GuessIt](https://repl.it/talk/learn/Javascript-Games-Lesson-1-GuessIt/9494) * [JavaScript Games: Lesson 2, Awari](https://repl.it/talk/learn/Javascript-Games-Tutorial-2-Awari/9631) * [JavaScript Games: Lesson 3, The Canvas](https://repl.it/talk/learn/JavaScript-Games-Tutorial-3-the-Canvas/11299) * [World-map generation for Ultima-style RPGs](https://repl.it/talk/share/FantasyMapGenerator/6883) * [Beginner 3D Graphics](https://repl.it/talk/learn/3D-graphics-a-beginners-mind/7909) * [How to draw pixel art on Python with Turtle](https://repl.it/talk/learn/How-to-draw-Pixel-Art-on-Python-with-Turtle/7556) * [Game Tutorial: Tetris in Python] (https://repl.it/talk/learn/Game-Tutorial-Tetris/9041) * [Game Tutorial: SSSnake in Python](https://repl.it/talk/learn/Game-Tutorial-SSSnake/8923) * [Game Tutorial: Space Invaders in Python](https://repl.it/talk/learn/Game-Tutorial-Space-Invaders/9550) * [Learn Space Shooter with HTML5](https://repl.it/talk/learn/Space-shooter-with-HTML5-and-Nodejs/8236) ### FAQ Click [here](https://repl.it/talk/challenge/Game-Jam-FAQ/11433) for our full FAQ. P.S. Don’t forget to invite your friends! We created a handy sign up page just for potential challenge participants [here](https://repl.it/jam).
250
posted to Challenge by KatyaDelaney (181) 1 month ago
Pinned
Game Jam FAQ
*This is a living document!* # RULES 1. All entries must be completed by April 18. You're welcome to work prior, but **submissions** begin March 18. 2. You must submit a game. If it's not obviously a game, let us know why you're submitting it and how to play! 3. Work must be developed on repl.it and run on repl.it. 4. All work must be your own or properly credited. Feel free to reach out to us with any questions. 5. No purchase of any kind necessary. # FAQ **How long is the challenge going to run for?** It opens on March 18th and ends on April 18th. You’ve got a full month to create a cool game! **How will the prizes be distributed if a group wins?** If a group wins the top prize, we'll distribute it evenly. **How will entries be judged?** That's up to our judges! Read more about them [here](https://repl.it/jam). No more upvote rigging, folks. **Does my game have to fit the theme?** The theme is **CASH** and it's there to inspire you! Feel free to interpret it however you’d like. But no, no points off if your submission doesn’t have a “cash” element in it. **Can I submit with a friend?** Yes! Groups up to 10 and individuals can submit. We’ll be giving out awards for best individual project and best group projects, but any submission is eligible for the top prize. **I want to submit with a friend, but I don’t have any. Help?** Check out #Challenge > #matchmaker on our [Discord server](https://repl.it/discord)—you’ll be able to find a group there. **Can I submit something I created before the challenge started? I mean, how will you even know I did otherwise?** We’d love to see it, but all games have to be designed on repl.it. We’re able to check the history… so don’t cheat! **Can I share my challenge entry before it’s finished?** Absolutely! You can edit your submission at any time, but you’re not permitted to make changes after April 18, 2019. **Can I change my entry after I’ve submitted it?** You can edit your entry up until April 18 at 11:59PM PST. After that, our submission period is closed! **I’m a member of the press and think this is cool. Who do I reach out to?** Shoot an email to [email protected] **I still have questions. Halp.** That’s okay. We’re here to help. Just send me an email at [email protected] # Asset Resources Need a little bit of help to get you started? Here’s a (n ever evolving!) list of free game assets. Just be sure to read the site carefully and give credit where credit is due ;-). ##### Art & Palettes [Itch.io’s Free Game Assets](https://itch.io/game-assets/free) [OpenGameArt] (https://opengameart.org/) [CraftPix Freebies](https://craftpix.net/freebies/) [Kenney Free Assets](https://www.kenney.nl/assets) [LoSpec Palettes](https://lospec.com/palette-list) ##### Music & Sound FX [FreeSound.org](https://freesound.org/) [Get-Sounds.com] (http://www.get-sounds.com/) [Free Music Archive](http://freemusicarchive.org/) [Free-Loops](http://free-loops.com/) Have assets you want to share? Let us know and we’ll add your download link!
110
posted to Challenge by KatyaDelaney (181) 1 month ago
7
DomBoom
Introducing **DomBoom**, a fun game to raise awareness about deprecated HTML elements. The rules are simple: - Shoot all the deprecated elements - Leave the valid ones alone It has three game modes: - **Beginner:** if you don't know what elements are deprecated, this will highlight them red - **Casual:** nice and casual, probably what you want to play - **Shazam:** everything is faster, harder, larger, including spawning; I wish you luck playing this mode Please give me feedback, I'd love to improve this to make it more fun for everyone! Right now it's a WIP. **Hint: get to 1500 points for something special :P** [Play it!](https://domboom.kognise.repl.co/) [Read the source code.](https://repl.it/@Kognise/DomBoom)
2
posted to Challenge by Kognise (48) 11 hours ago
21
Pokemon Battle Game
![Pokemon Battle Game](http://quizzzes.com/wp-content/uploads/PoK%C3%A9MoN.jpg) # Introduction Hello Guys, This is my game for GameJam. I just started learning python and thought I should participate in this event too. :) So, the idea is to unlock all the pokemons and all the evolutions available in the game. You meet Professor Oak and he gives you 10 coins and 3 options for your first pokemon. Pokemons gain exp and coins by fighting and after getting certain amount of exp points they evolve. Evolving a pokemon makes them strong but it also increases the difficulty level of the game. Since the theme of the competition is CASH, there's no catching pokemons in the game instead there is a shop from where you can buy pokemons and attacks. **If you guys find any bugs please comment down below.** **Also, if you like the game, don't forget to upvote it. :) ** https://repl.it/@SuyashAgarwal/PokemonBattleGame
7
posted to Challenge by SuyashAgarwal (20) 2 days ago
2
Pychat?
I'm making a Python chat server to mimic this one: https://repl.it/talk/share/Working-Chatroom/3741 But that one does not work anymore. Here's mine: https://repl.it/@ebest/cha I still want to encrypt it though. More features coming soon! (hopefully) oh it's not working right now -Ebest
11
posted to Share by ebest (27) 16 hours ago
2
python version 3, without turtle, does nto run code it previously did
https://repl.it/@LiekeSaxion/ScientificPlainTransversal
18
posted to Ask by LiekeSaxion (2) 1 day ago
2
For every x amount of messages sent wait x amount of time and continue
Is there a way to make it so for example, you send 1000 messages per second and you send the first 1000 messages to then wait like 1 second and continue?
28
posted to Ask by MATTHEWBECHTEL (17) 2 days ago
14
earthlings vs space
https://repl.it/@dhruvPATEL564/Space-kings
5
posted to Challenge by dhruvPATEL564 (13) 2 days ago
14
Maze game
Use the arrow keys to navigate the three levelled maze. It will keep repeating.
18
posted to Challenge by Ciang (13) 3 days ago
5
Worlds Hardest Game
Worlds Hardest Game, almost impossible. Still really hard. If you don't guess correctly you lose. 1 or 2 Winners: @TommyIsAwesome @LucasOrdway @Aidan72 @Minion3665
29
posted to Share by Pythonier (25) 3 days ago
27
How Did YOU Find Repl.it
Repl.it is one of many online coding platforms. How did you find this one? Did you do a google search? A friend? Why did you choose Repl.it over the many others that exist out there. Currently repl.it is one of the most popular. I will say that if i google's filtering and searching system were different, i wouldn't have found it. I found Repl.it with `online python3`. Comment below your own story! ### Reasons so far: + Coding on multiple computers + Learning at school + Looking for better online compilers/interpreters + Searching on google for online <coding language> + Friends + Coding in school without downloading interpreters/compilers + Making games that wouldn't work on normal compilers/interpreters + Entering competitions that require repl.it + Storing code online. To show other people, or other uses It's really cool to see how other people found repl.it. If I had been told to list as many reasons as I could, I would have gone with Bullet 1, Bullet 2, Bullet 3, and maybe Bullet 5.
143
posted to Ask by PYer (1247) 11 days ago
212
The Fishing Game
# The Fishing Game Hi!! This my fishing game. Here's a bit of an explanation that you also get ingame: The aim of the game is to reach level 100 as quickly as possible. Catch the rarest fish you can and level up! You can sell your fish in the shop. Rarer fish bring in more gold. You can use this gold to purchase bait, which is needed to catch fish, and rods, which make catching rarer fish easier. New types of fish are unlocked as you level up, and at higher levels, it's easier to catch fish. The game saves your progress at the end of each day, so you can just log in again and pick up where you left off. Not gonna lie, it's pretty fun. *** ## Backstory I made this game last July. The reason I choose fishing was mainly because it makes plurals easier - the plural of most types of fish is the same as the singular ;) (This doesn't work for anchovies though... or mythical creatures. Oh well). To make it I did have to learn a little about using classes and objects - I find them really useful now though. My coding's definitely developed a bit since I made this (it's a mess), but I can't really be bothered to make the code any neater (I did a tiny bit). I have edited it a bit since I originally made it to make it ready for the game jam. Here are some of the additions (spoiler for past level 100!!) : * There are new "mythicals" which are extremely rare fantasy creatures, like mermaids. They can only be encountered after level 100. You can't sell them, though the game remembers which ones and how many you've seen. You need the special new moonstone rod. * The game's harder now, in that the XP needed to level up increases exponentially as you go up the levels. I really should have had that from the beginning, because levelling up was way too quick. * Some new types of fish! * Highscore board for how many days it takes to reach level 100. I'm not sure if this was in the original fishing game that I posted in July, but I don't think it was. It's empty currently because the new XP-level scale has made all the previous highscores made by me and my family during testing unfair. Let's see who get's the lowest! * Rarest fish stat. Within the rarity boundaries like common, uncommon, rare ect, there are varying rarities based on a number. If you catch a fish with the same rarity number as your rarest fish stat, it counts as rarer if it's unlocked at a higher level. Basically, higher level is used to decide rarity in a couple of cases. The point is, I wanted to add something that made the game more orientated to getting the rarest fish - kinda like pokemon. Anyone got the blue whale? * Changed the rod names from "default, alright, decent, good, great" ect. to "wooden, bamboo, copper, iron, steel" ect, just for added character. The only one that stayed the same was the awesome golden rod ;) *** ## In the Future... I've got a few ideas for what I want to add to the fishing game... * A little addition of telling you the current highscore when you sign up, or when you log in, or at the top each day in game. I just don't really know which one would be best. Let me know what you want! * More fish of course! I just don't want to bombard you with them. Maybe if some of you guys really like the game I'll put a personalised fish in for you ;) * More ideas post level 100. Maybe some cool non-mythical fish. * Having the option to change rods using ones you've already bought, because at the moment if you want to change your rod you have to repurchase any you've already bought and that's just dumb. * New rods with cool properties, like extra attempts per day, or unlocking specific types of fish, unlocked at certain levels. * Maybe, but probably not, lengths of fish - they'd be a mean length for each type, and the fish you caught would be around this. The price could depend on length. There could be a new stat with longest fish caught? I feel like this is just too complicated for my simple little fishing game though. * Music! I feel like it would really benefit from some tunes but I don't know how to implement that. I'd have to look in to it. * Your suggestion here. Seriously, I would really love it if you guys could tell me what you want to see, if you like the game of course. *** Well that's it. I really hope you guys like it. If there's any bugs let me know, and if you want any improvements, let me know too! Thanks so much for trying it out! (also sorry that it doesn't fit the cash theme. I edited it to make it more appropriate to the cash theme, but it kinda sucked. I prefer the cutesy fishing element) On a final note, let me know if you encounter all the mythicals! That would be seriously cool! Edit: don't really care if you don't like that it's in all lower case. I think it looks nicer. *** ## Change Log since posting * Input validation for a, b, c at the start of the day, to avoid the "press enter and run up your days" error * Input validation for logging in or signing up * More input validation for selling some fish, plus added capability for selling multiple fish at a time (not all fish) and fixing a bug that would've prevented fish with spaces in their name - eg electric eel - to be sold. * Fixed the printing of high scores so that it's in actually in the correct order, plus accounting for ties. * Disallowed "-" characters in the username, which would've messed up the accounts file, had it been working anyway. * Lowered the power of the rods and raised the prices for a more difficult game ... sorry if the highscores are now unfair but I can't let it be the same game forever :( * More input validation in the shop... it never ends * Weirdly, more input validation in the shop, I thought I caught it all, but nope. thanks for catching that, TechGamer * Added the "fishedex"!! It's amazing! It's literally just a pokedex. go to the shop to see it. Unfortunately this is another thing you will need to tell me about to save on to your account (obviously if you don't care about the fishedex, there's no need to remember how many individual fish you've caught). Repl.it's file system is still broken and it's not working consistently for me either anymore, but you might be able to go into the accounts.txt file and copy the code for your account (the whole line beginning with your username) to easily tell me the pokedex data. Also, check out the crazy boolean code for a little congratulations message if you fill up the whole fishedex. I honestly have no idea if it works or not. If you do manage to catch em all then tell me if this crashes or you get a congratulations. hope you all like the fishedex, thanks to Hamloid for the idea! *** ### New: Competition! Anyone who can reach level 100 in under 300 days can have a personalised mythical! Screenshot the highscore board once you reach 300 and tell about what you want your mythical to be. Maybe they'll have even more XP than normal mythicals. Good luck!! *** **Important - known bug - the logging in account system is not working. Don't leave the page or refresh. I'm really sorry about this bug. It works for me but obviously not other users. edit - doesn't work for me either anymore :(** **Temporary fix - screenshot or type in your stats - username, password, level, gold, bait, what number day you're on, rod, rarest fish, inventory contents and any mythicals encountered [and fishedex data if you care. Try going into accounts.txt to find your account; copy the line starting with your username and comment it here to make it easier for both of us. however, the file saving isn't working very consistently so it might not even save it during your repl anymore]. I'll manually save them for you so you can log in and return to that state. Also, if you reach level 100, tell me what day you did it on so I can save your highscore too.** **Also - I know that the account system isn't secure. I'm looking into google API's to fix this problem, since it would be cool to learn something new. I'm sorry that I haven't got round to this yet; I'm really busy with school. Logging into someone else's account can't actually affect anything at the moment though because the account system is broken anyway :( I wasn't really thinking about security when I wrote the game.** **Don't forget to upvote if you enjoyed the game! Thanks so much to everyone who has done so, or commented, already!**
259
posted to Challenge by AmeliaBlackwell (387) 23 days ago
5
Game In Python
Hello, I'm remaking a game in python and i was wondering if there is a way i could shorten some of my code, here it is: ```python import time def displayIntro(): print("This is the story of a man named Stanley.") time.sleep(2) print("Stanley worked for a company in a big building where he was employee # 427.") time.sleep(2) print("Employee # 427’s job was simple: he sat at his desk in room 427 and he pushed buttons on a keyboard.") time.sleep(4) print("Orders came to him through a monitor on his desk, telling him what buttons to push, how long to push them, and in what order.") time.sleep(5) print("This is what employee 427 did every day of every month of every year, and although others might have considered it soul rending, Stanley relished every moment that the orders came in, as though he had been made exactly for this job.") time.sleep(10) print("And Stanley was happy.") print() print() time.sleep(4) print("And then one day, something very peculiar happened.") time.sleep(2) print("Something that would forever change Stanley;") time.sleep(2) print("something he would never quite forget.") time.sleep(3) print("He had been at his desk for nearly an hour when he realized that not one single order had arrived on the monitor for him to follow.") time.sleep(6) print("No one had shown up to give him instructions, call a meeting, or even say 'hi.' Never in all his years at the company had this happened, this complete isolation.") time.sleep(7) print("Something was very clearly wrong. Shocked, frozen solid, Stanley found himself unable to move for the longest time.") time.sleep(3) print("But as he came to his wits and regained his senses, he got up from his desk and stepped out of his office.") displayIntro() ``` as you can see it is quite lengthy im really new to python so if this is normal please let me know
14
posted to Ask by AidanSlyker (11) 2 days ago
32
The Quest into Abquoria
This is my game for game jam, it's a text-based adventure game, although it has an Easter egg in it. The Easter egg is the 'magic word' from another text based game from the 70's, good luck! If you notice any errors or glitches or even just have a suggestion please tell me I would love to fix/add it. btw the easter egg can only be entered on the main menu (fight, run, inventory, use item). If you want more information about the objects in the game, https://docs.google.com/spreadsheets/d/1uUFn2Lqmx402hcrLUkteJnVjh0p2PSQC1AzkdJrybls/edit?usp=sharing use that spreadsheet. Audit Log: 4/3: fixed error with wrong input from .env file, and fixed easter egg 4/4: fixed hash for the easter egg because somebody who remain unnamed [ @aiden2904 ] reverse engineered the hash (this is not saying you should too) 4/5: Added a point system 4/8: Added gambling! it is probably very broken as I have had little time to test it, comment if you find an error or irregularity 4/9: Numerous patches to the gambling, more will come Click below for the game. https://repl.it/@JohnnyWobble/The-Quest-into-Abquoria Please upvote if you enjoyed it
25
posted to Challenge by JohnnyWobble (54) 8 days ago
28
The Repl.it Chrome Extension 🌐
Hey everyone, One of the coolest things about repl.it is how fast and simple it is to experiment with others' code. I've been working on a chrome extension which allows you to run code all over the web on repl.it, with just one click. The chrome extension adds prompts to NPM Packages and Github Gists - letting you try out examples as soon as you see them. ![Gist + NPM demo](https://storage.googleapis.com/replit/images/1554287819263_b57c54681794c790cff4bb6eea83602f.gi) But, that's not all! The chrome extension lets you run literally *everything* on repl.it! Just select some code, enter a language and boom 🤯 ![Right click run demo](https://storage.googleapis.com/replit/images/1554287926512_0df04df5f9eb5c6d4bf7db61e74131a8.gi) 🚀🚀🚀 Get it now on the [Chrome Webstore](https://chrome.google.com/webstore/detail/replit/kihnihckibjknmebghcjpmemaginnipl) I'm looking forward to hearing ideas + feedback from y'all :)
16
posted to Announcements by jajoosam (451) 7 days ago
14
Learning Web Development w/ Python Part 1
# Learning Web Development with Python and Django ## Part 1 *If you already know a bit about web development, then check out [Gareth Dwyer's Tutorial](https://repl.it/talk/learn/Tutorial-Building-a-Django-web-application/6660). This tutorial is intended for beginners, and takes things a bit more slowly.* ## Welcome! In this tutorial, I'm going to be teaching you how you can use the `Django` web framework to make your own web apps with Python. ### Prerequisites For this tutorial, you should have a decent understanding of Python. Knowing some `HTML` and `CSS` helps. ## The Client and the Server Before we can start coding our own web app, we need to know a little of how the internet actually works - clients and servers. **Servers** Servers are basically the computers that 'run the websites'. Each website has its own server (in reality, large websites have lots of servers). Each server has its own **domain name**, e.g. www.google.com or www.repl.it. **Clients** Clients are computers that connect to servers - i.e. people who visit the website. ### How do Clients connect to Servers? This depends largely on what **protocol** is being used. The most common protocols are `http` (hyper-text transfer protocol) and `https` (secure hyper-text transfer protocol). On a very basic level, what happens is: * The client sends out a message saying "I want to see this page on this website, my address is xxxxx". * The message arrives at the server. * The server checks which page to send and then sends it back in the form of `html` (and often other filetypes, but we will be focusing on html here). * The browser of the client interprets the html to give a visual output. ### How does this apply to Django? When we use Django, we're basically writing our own server. Django takes care of all the sending and stuff, all we have to do is add our pages, and put them in a place Django can find them. ------------------------------------------------------------------------------------------ By now, you'll be itching to write some code, so lets get started! When you create a Django project on repl, there is already some code in there, so I have made a [basic template](https://repl.it/@ArchieMaclean/Basic-Template) which has the bare minimum. Open the template, and click the `fork` button at the top to make your own copy. ![image](https://storage.googleapis.com/replit/images/1554625804315_2a5ed0a55c14c016feacd6dc438d3b20.pn) You can now rename it to `hello-world` (or something else if you prefer). ## Creating your very first app Before we make any changes, you can click the square icon in the top right of the view panel: ![image](https://storage.googleapis.com/replit/images/1554625969590_1b80aeda3f1db062a5e7916c97db3ae3.pn) This will open the page in a new tab so you can see the fullscreen version of it. You should get a page like this: ![image](https://storage.googleapis.com/replit/images/1554626030130_fdf8263732fa1645061a5e309c29154f.pn) This is just the standard Django page, which appears when you haven't written any code yet. ### Creating our first web page When you type in a URL (such as https://ww.repl.it/languages/python) on a browser, there are three parts: * **Protocol** - almost always `http` or `https`. * **Domain name** - looks like `www.repl.it/`. * **Page name** - looks like `languages/python`, and is after the domain name. With our project, we don't need to worry about the domain, because `repl` creates one for us to use (in the form `<repl-name>--<username>.repl.co`). However, we will need to think about our page names. #### URLs and Views There are 2 parts to displaying a page on Django - the URL, and the `view`. The `view` is what the client will see when they visit the page. ##### Writing our view For this first project, we will be using **function-based views**. This means that each view is a Python `function`. Navigate to the `views.py` file, and add the following code: ```python from django.http import HttpResponse def homePageView(request): html = "Hello, World!" return HttpResponse(html) ``` So, what does this code do? `Line 1` imports HttpResponse , which we will need in order to return the html in the correct format. On `Lines 3-5` we create our view. * `Line 3` - this is our function, called `homePageView`, because it will be the homepage of our website. It takes `request` as an argument - for more advanced projects, you will use `request` in your function, but we don't need to worry about it right now. `request` is a request **object**, that carries information about the request for the page. * `Line 4` - this is the html for the website. This is extremely simple hmtl - it doesn't have any tags, all it has is the text `"Hello, World!"`. * `Line 5` - this is where we return the html, in a form Django can understand (`HttpResponse`) If we run this code, we get...nothing! The reason for this is that Django doesn't know what to do with the view. ##### Adding the URL (Page name) We need to tell Django where the view should be displayed. Navigate to the `urls.py` file, and add the following: ```python from .views import homePageView ``` Then change `urlpatterns` to: ```python urlpatterns = [ url(r'^admin/', admin.site.urls), url('',homePageView,name="home"), ] ``` Before we analyse the code, go to your website (in the other tab), and refresh. You'll see we got we wanted! ![image](https://storage.googleapis.com/replit/images/1554627432054_c0f2284207576ce83123b494a7735ee8.pn) So how did this happen? Let's look at the code. ```python from .views import homePageView ``` This imports our `homePageView` function from the `view.py` file. The period `.` at the start tells Django to open it from the current directory (`main`). This is needed because the code will be run from somewhere else, so Django could get confused and try to import it from a different folder. In `urlpatterns` we added ```python url('',homePageView,name="home"), ``` (Note that `''` is 2 single-quotes, not 1 double quote) This tells Django to treat it as a url. There are 3 arguments given: * The first (`''`) is the page name, which I described earlier. If it was something like `about/aboutme` then the page would be located at https://domain.name/about/aboutme (replacing `domain.name` with the domain name, obviously). However, it is just `''` so the view will be located at just https://domain.name/. * The second is our view that we created in `views.py` and imported earlier. * The third is the *name* we give our page. It is not essential, but will come in useful later when we want to keep track of all the pages. ------------------------------------------------------------------------------------- ### Congratulations! You've made your first web page with Django! It may seem a bit convoluted right now, but this format is very helpful when we make bigger web applications and have many files. #### That concludes Part 1 In [Part 2](https://repl.it/talk/learn/Learning-Web-Development-with-Python-Part-2/12884), we will be looking at the more powerful `class-based views`, as well as multiple pages in out project. Please upvote if you found this tutorial helpful, it supports me and lets me know that you want more! If you have any questions, post in the comments and I (or someone else) will answer them.
2
posted to Learn by ArchieMaclean (142) 3 days ago
139
Three Ways
Hello ! This is my three ways game. You can move the ball with k, l, and m or arrows. Press enter to play and retry. It's better to play in a new tab. I hope you will enjoy it. I'm still working on it, so it's not finished. I will add a system to change the size of the game on the screen, change the menu screen, and add a config to move with the arrows. You can tell me if you find bugs or things to improve. __If the screen is oversized, you can go to this link :__ https://three-ways--equation.repl.co/ You enjoyed the game ? Don't forget to upvote ! Now available : gold rush ! Go on the paddle to earn gold ! Have fun ! (Sorry for my bad English, this game comes from France ;)
89
posted to Challenge by Equation (150) 22 days ago
2
(solved) Why is my Python stuff not working at all?
That's right. Not even print('string') statement is working ;/
25
posted to Ask by ZControls_Games (12) 3 days ago
14
Destroyer of Crapcoins
A space invaders inspired game written in PyGame. Destroy coins to collect BTC and move to the next level. Don't destroy Bitcoins or let the "sour" coins get away - they will make you lose a life! This game was made by brothers Andrew and Ethan MacDonald. - Programming by Andrew and Ethan - Pixel art and font designed by Ethan - Coin logos from github.com/atomiclabs/cryptocurrency-icons **Our GitHub Profiles** https://github.com/ajmd17 https://github.com/emd22 **We both hope you enjoy this game!**
12
posted to Challenge by ajmd17 (16) 5 days ago
94
Goblin Hunter
Hello! This is the game I created for the game jam: Goblin Hunter. There are 2 players, the idea is to hunt (touch) the goblins that appear on the map, first to 20 points win! Player 1 moves with the arrow keys, and the Player 2 with WASD. Feel free to give feedback, if you want, you can look at the source code, I added comments so it's easier to understand. I recommend playing in a new tab/window.
28
posted to Challenge by Luisfetoga (107) 19 days ago
9
UPDATE: 📕Language Learning Club 🤓
Hey everyone! Following up on @amasad's post [here] (https://repl.it/talk/announcements/Language-Learning-Club/11191). We're building out some learning materials over on our [Discord server](http://repl.it/discord?channel=llc), and we would love your input! We've now added a few Language Learning Club channels, with the idea being we'd all learn together. Before we choose our very first language, I'd love to see what you all are interested in learning. If you could fill out [this survey](https://docs.google.com/forms/d/e/1FAIpQLSeP5Y5MplZbX5oMScat21zV0eJlnXLb7audGT5EC13zizbuUg/viewform?vc=0&c=0&w=1) by Weds at 5:00 PM CST, that'd be great. Feel free to post any questions/concerns below. P.S. YES, we will have voice chat for this! 🗣
10
posted to Announcements by KatyaDelaney (181) 4 days ago
4
The tree of peace
This is a game I spent a little while, on after completing my first entry. This game is in early stages of development, but I will show you what I have so far. This game combines both text adventure and graphics. This is all done in vanilla python. If you like it then upvote. If you want to join development, then comment below. I hope you enjoy the game. https://repl.it/@PCL/The-tree-of-peace
1
posted to Challenge by PCL (215) 14 hours ago
15
Mine Runner
https://repl.it/@sebolof/minerunner This game is started by just clicking start square. You must find a path without any mine to reach finish square. Enjoy!
14
posted to Challenge by sebolof (14) 6 days ago
58
Making Friends
Use the WASD keys to move up, left, down and right respectively. There is only one objective to the game, have all the colourful objects overlapping. Feel free to close the game or the browser, your current level will be saved to your computer - no need to do *all* of those levels again. If you want to restart from the first level click ***Full Reset*** button, if you want to retry the current level press ***F5*** or click the ***Restart Level*** button. Please comment how far you get, if anyone manages to reach the end I'll make more levels. Good Luck If you enjoy the game ***please upvote***, also, as with many games *Making Friends* is **not** finished if you find any thing you think might be a bug or anything you might like to see added I'll do my best to fix/implement them. Thank you. Edit -- with requests and recommendations i have added: a slider to change the speed of the game; golden coins/moneys/pounds to collect during the game (they're needed to progress from level to level; automatic reset upon touching a black block https://making-friends--bearbearmo.repl.co/
27
posted to Challenge by bearbearmo (91) 16 days ago
71
Swing!
Here's a little game I've been working on - Swing! (yes, you have to shout it) The gist is pretty simple - you swing around using a grappling hook and you must avoid dying. Progress from checkpoint to checkpoint and things will slowly get harder. Controls: - Space bar to jump. - 'a' and 'd' to move side to side. - Aim with mouse pointer. - 'w' to fling your grappling hook. - When hook has stuck to a block, hold 'w' to pull yourself. Let go of 'w' to release rope (you'll get the hang of this, I promise). - While hanging from rope, use 's' to release hook without pulling yourself. - While hanging from rope, use 'q' to shorten rope and 'e' to lengthen it. I'd love to hear your feedback. Does the game lag or is it nice and smooth? (I can't tell because I'm using an old, slow-as-f*** laptop). What improvements could I make? Are my colour choices horrific? Could the game use sound effects? Any and all feedback is welcome : ) PS. Open the game in a new tab for the best experience. Link: https://Swing--matthewstirling.repl.co version 3.0 - added main menu - added buttons - changed appearance of predictive turrets - made level 2 final challenge easier (you're welcome)
59
posted to Challenge by MatthewStirling (77) 20 days ago
6
Missile Defense: RETRO
I created this game a long time ago, and finally found it in the midst of the junk in my computer. Well, here are the rules: The game in a nutshell: > You are a square shooting squares at more squares to protect other squares. Okay, maybe I should backpedal a bit: You are a gray rectangle (tank) that is supposed to protect the yellow rectangles (cities) by shooting at the pink rectangles (missiles). To move, use the arrow keys or "AD" keys, and to shoot, you can press the spacebar, "W" key, and up arrow. Sometimes at the same time. I don't reccomend it though, since you have limited ammo. To gain ammo and fuel, go to the orange and purple boxes to refill. That's about it! Enjoy! (Press enter/return to continue...) ========================== https://repl.it/@GrantKeo/Missile-Defense
3
posted to Challenge by GrantKeo (33) 2 days ago
57
🔴🔴 | A S S A U L T M A N |🔴🔴 - A TOP DOWN SHOOTER
🔴| Survive and Attack! Increase your specs by killing enemies and enemy bases! | ASSAULT MAN | A top down shooter | Made in Javascript |🔴 I'll take any sort of feedback - good or bad. Just be sure to reccomend what I could do to satisfy your needs. :) To do: Enemy Counter Enemy Health Bars Objective? Regenerative Bases The game: https://repl.it/@h3xed/Assault-Man
51
posted to Challenge by h3xed (83) 19 days ago
79
Lost souls don't come back.
This is a small game with many endings, that I made in repl.it for the game jam. I made this in one day. Please enjoy. I am not going to spoil the game.If the character moves slow, it is because of your computer. If you like this submission, then check out: https://repl.it/talk/challenge/The-tree-of-peace/12976 .
39
posted to Challenge by PCL (215) 22 days ago
2
C++ code won't Run (again)
I'm so sorry, but my C++ codes won't run anymore. When I click run it does nothing other than change to "stop". I have waited several days for it to start working again, but it hasn't. I've tried to run several of my programs, but for some reason none of them work anymore. One of my classmates said he was having the same problem as well on some of his computers. Here's a link to one of my programs that should run: https://repl.it/@tgs2796/Set-Template Here's screenshot of what I see when I try to run it: ![stop](https://storage.googleapis.com/replit/images/1554746045970_09e4e5be6bcb4158b2a549d82cd9581e.pn)
10
posted to Ask by tgs2796 (3) 2 days ago
Load more