• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Landshark

Members
  • Content count

    48
  • Joined

  • Last visited

Community Reputation

182 Neutral

About Landshark

  • Rank
    Member
  1. New (and permanent) site is up.   http://www.gamedev4beginners.net   The old site will be taken down soon. 
  2. For quality tutorials, check out: http://thenewboston.org/tutorials.php   Personally I went through his javascript tutorials, then grabbed the book 'Head First Javascript' from amazon and was able to finish the book, 1 chapter per day until it was done.   Javascript (40 videos): http://thenewboston.org/list.php?cat=10   HTML5: (53 videos): http://thenewboston.org/list.php?cat=43   XHTML & CSS (46 videos): http://thenewboston.org/list.php?cat=40     I don't know what the general feeling is here on GameDev about the "Head First" books, but I am finding them very helpful in the learning process.  I've completed the javascript one and am working through the C# one right now.  They are very hands-on books and presented in a way that you aren't staring at a wall of text, page after page.     Book: "Head First Javascript": http://www.amazon.com/Head-First-JavaScript-Michael-Morrison/dp/0596527748/ref=sr_1_1?ie=UTF8&qid=1359607773&sr=8-1&keywords=head+first+javascript
  3. I've been using Windows 8 Pro for about 2 weeks now.  So far, I absolutely enjoy it!   I do gaming, social media, movies, music, C# and Java development and just about everything with it.   The major complaints are kind of odd, imho.   ---- People say, "It's basically the same thing with a little better memory management" then go on to say "It's a regression", yet give no reasons why it's a regression.     ----"It's designed for tablets" isn't really a negative comment about Windows 8.  Instead, the comment is just a simple fact, the new start menu is much more usable for a tablet than the old start menu (from Windows 7).  But did you also notice the new start menu is more usable for desktop/laptops as well, when compared to the start menu from Windows 7?   ----"History shows us every other Windows OS release is bad".  Are you going to base your judgement of Windows 8 based on that statement alone?  MEME's on the Windows 8 logo isn't really a professional or logical way to review an OS.  Think about how ignorant that thought process is.     Windows 8 seems faster and cleaner to me.  All of the desktop/start menu clutter is now gone and I'm left with a much more usable desktop interface.  I almost never have to use the new start screen, but when I do it's faster than using the old start menu.  I can also have 'metro style' apps running in the background (great for iHeartRadio and other music apps) that don't clutter up my workspace.     Windows 8 is almost exactly like Windows 7, except it now has a MUCH more robust start menu and better search function.  It also supports multi-monitors in a much more functional way.  For example, I can have my taskbar items only show up on the monitors that they are open on, which is very useful (and again removes clutter).  Another example, those linux users who gloat about having multiple desktops at once can now lavish in the ability to do just that with Windows 8.  You have the traditional desktop and you have a new 'metro' style desktop, both can be open at the same time and multiple monitors running different apps (granted, the metro 'desktop' only runs metro apps).  Try and think about the usefulness of the new setup.  Personally I've found it very very useful to have 2 desktops running at the same time.   The problem is, I believe people WANT to hate it before they use it.  So, when they finally do use it they only see the negative, but ignore that fact that nothing has been taken away from their regular desktop experience.  In fact, the new start menu, search function, and ability to install metro style apps greatly enhances the Windows OS experience.   Anyway, I haven't seen a logical reason for why Windows 8 is worse than Windows 7.  I have, however, experienced a lot of reasons for why Windows 8 is much improved over Windows 7.
  4. Is there any recommended reading material in relation to functions, defining functions and examples? I don't know why, but I have major 'writers block' when trying to rewrite this code using your above lesson plan. So far I'm trying to write a function for each section of the code (using readable function names). Some of it works so far, but the part I'm stuck at is trying to pull one of the items from the questions list (just a fun thing to try and make work). I have a list: questions = ("question 1","question 2","question 3") I use a questions.pop(0) function to ask the questions in order, but when the list is empty the program errors (I understand this). I'm not sure how to avoid this though, although I've thought about adding a retry argument in the function that counts down to 0, at which point it will break out of the function loop. Here's the code so far, it's not completed obviously. import random questions = ["Are you ready to play? [Yes/No] ", "How about now? [Yes/No] ", "Are you finally ready to play? [Yes/No] ", "I'm getting really bored, are you ready yet? [Yes/No] "] def ask_play_game(): if questions == []: ##I have no idea how to get the function to stop .pop'ing the list once it's empty. print "Fine, if you don't want to play then neither do I!" quit ready = raw_input(questions.pop(0)) if ready == "y" or "ye" or "yes": def create_random_number(): number = random.randint(1,10) def play_game(): create_random_number() guess = int(raw_input ("What number am I thinking of? ")) if guess == number: print "Congratulations, you guessed the number!" As you can see I'm writing the functions that will later be called using loops (I hope this is on the right track for what was suggested in the post above this one). I think I have the idea down, but am just missing some understanding of the techniques. Being the beginner that I am, perhaps I should try some more basic function lessons before completing the above code. I'm still waiting for the 'Ahh hah!' moment when dealing with functions. I know how to use arguments in functions, but haven't really seen it put to real world use yet to fully understand it.
  5. Thanks sneftel, My program actually was working as intended the way it was originally written. Original code: """ This is a guess a number game. It's created using while loop to only break when the user guesses the correct number """ #Need to first have the code find a random number and set it to a variable import random number = random.randint(1,10) ready = 'placeholder' phrases = ["How about now? [Yes/No] ", "You're not ready yet? [Yes/No] ", "Seriously, what are you doing that's taking so much time? Can we play now? [Yes/No] ", "I can't wait any longer! Last chance, are you ready? [Yes/No] "] #Here is the intro text to the game print "" while 1: quitnow = False print "Welcome to the Number Guessing Game!" print "" print "I will now think of a number between 1 and 10 and" print "you will try to guess it." #Ask the user if thye are ready to play while 1: if quitnow: break if ready == 'yes': break ready = raw_input("Are you ready to play? (Yes/No) ") if ready == 'yes': print "Alright, let's begin!" break elif ready == 'no': while 1: if quitnow: break try: ready = raw_input(phrases.pop(0)) if ready == 'yes': print "It's about time! I was getting bored." break except IndexError: quitnow = 'quitnow' #next, create the while loop that controls the guessing while 1: if quitnow: print 'That\'s it, I\'m leaving!' break guess = int(raw_input("What number am I thinking of? ")) if guess == number: print "Congratulations, you have guessed the correct number!" break elif guess != number: print "Try again..." playagain = raw_input('Play again? [Yes/No] ') if playagain == 'no': break I was trying to condense the code using some people's suggestions (using the for function, as an example), but right now it's looking even more complicated to me than before. I guess a good question I should ask is, does a good programmer focus on readable code or shorter code as a priority? And, does my source of the completed program qualify as easily readable? Maybe I should have just left this one alone and gone on to something new.
  6. I could use a bit of help with this, my brain is not happy about it. (see previous post)
  7. I'm rewriting my code for this small program, because I want to learn how to write it more efficiently. Basically, here's what I've come up with so far (using many of the above suggestions and tailoring them to my program): I'm calling this program "Guess a Number Game V2.0" import random quitnow = False test = "test" #only used for testing purposes ready = "placeholder" phrases = ["Are you ready to play? (Yes/No) ", "How about now? [Yes/No] ", "You're not ready yet? [Yes/No] ", "Seriously, what are you doing that's taking so much time? Can we play now? [Yes/No] ", "I can't wait any longer! Last chance, are you ready? [Yes/No] "] #Here is the intro text to the game print "" print "" while 1: if quitnow: break print "Welcome to the Number Guessing Game!" print "" print "I will now think of a number between 1 and 10 and" print "you will try to guess it." print "" #Ask the user if they are ready to play while 1: number = random.randint(1,10) if quitnow: break if ready == 'yes': break for que in phrases: ready = raw_input("%s" %que) if ready == 'yes': print "Alright, let's begin!" while 1: guess = int(raw_input("What number am I thinking of? ")) if guess == number: print "Congratulations, you have guessed the correct number!" break elif guess !=number: print "Try again..." print "" playagain = raw_input("Play again? [Yes/No] ") if playagain =='no': quitnow = True break break I'm trying to work through the issues on my own, but so far here's what up. First, if the player completes the game (guesses the number) and chooses to play again, when the program restarts it grabs the 2nd string in the 'phrases' list rather than starting over with the first one. I tried to combat this by tossing in the very last break to hopefully get out of the 2nd while loop, but it doesn't seem to work. Second, same issue, because I'm not able to get out of the 2nd while loop the random number is not random after the first play through, the code 'random = random.randint(1,10)' is only checked once, so it's keeping the same number value in the 'number' variable. I think the major issue (unless I'm missing something else) is figuring out how to break out of the 2nd while loop. Other than that, my code looks a lot cleaner than what I previously had.
  8. Hey Wazzatman, thanks for the post and for all the info (and mini review). I was waiting for someone to answer your questions (because I have similar questions!), but looks like you found a good answer. My next step in learning Python is GUI design, so this is going to be a great help.
  9. I know this post a couple weeks old now, but.... Take a look at this as well http://rene.f0o.com/mywiki/PythonGameProgramming It uses Python 2.4.3 (I have 2.6.2), but hopefully it might be helpful to you. It's a tutorial on how to make simple games using pygame. I plan on following it in a day or two. OR you can watch this: http://www.youtube.com/view_play_list?p=8E21BDD0981FDF66 There's a number of video tutorials from the youtube user "thenewboston". It's python 2.6 and he's very easy to follow along in his tutorials. I'm using his regular python tutorials to learn some python. When did you start learning Python, if you don't mind me asking? I'm curious how far behind I am from you. I just started less than 2 weeks ago and today came across your mud question too. :)
  10. Hey Monkey, thanks again. Using bools solved my last issue. My program now works completely as intended. Now it's just a matter of making the code cleaner (such as not catching an exception and using it as a function of the code). Full source: """ This is a guess a number game. It's created using while loop to only break when the user guesses the correct number """ #Need to first have the code find a random number and set it to a variable import random number = random.randint(1,10) ready = 'placeholder' phrases = ["How about now? [Yes/No] ", "You're not ready yet? [Yes/No] ", "Seriously, what are you doing that's taking so much time? Can we play now? [Yes/No] ", "I can't wait any longer! Last chance, are you ready? [Yes/No] "] #Here is the intro text to the game print "" while 1: quitnow = False print "Welcome to the Number Guessing Game!" print "" print "I will now think of a number between 1 and 10 and" print "you will try to guess it." #Ask the user if thye are ready to play while 1: if quitnow: break if ready == 'yes': break ready = raw_input("Are you ready to play? (Yes/No) ") if ready == 'yes': print "Alright, let's begin!" break elif ready == 'no': while 1: if quitnow: break try: ready = raw_input(phrases.pop(0)) if ready == 'yes': print "It's about time! I was getting bored." break except IndexError: quitnow = 'quitnow' #next, create the while loop that controls the guessing while 1: if quitnow: print 'That\'s it, I\'m leaving!' break guess = int(raw_input("What number am I thinking of? ")) if guess == number: print "Congratulations, you have guessed the correct number!" break elif guess != number: print "Try again..." playagain = raw_input('Play again? [Yes/No] ') if playagain == 'no': break I've used the for loop in practice, but I'm not grasping your for loop code at a glance yet, so that's my next step. Thanks again everyone, this is really fun and awesome. :)
  11. Monkey, thank you. I'm not reading your spoiler quite yet. :) I was able to get the program to actually function. I figured out I was causing an infinite loop here: while 1: try: ready = raw_input(phrases.pop(0)) if ready == 'yes': print "It's about time! I was getting bored." break except IndexError: quitnow = 'quitnow' Because it would just keep looping the 'try' and the list was already empty, so it would keep catchin the exception, over and over, infinite loop. :) I fixed that by adding if quitnow == 'quitnow': break under the while 1: One problem fixed, another one emerges. So, I have a problem now where if I do get to the prompt "Play again? [Yes/No]" and choose 'yes' it will continue with this prompt: I can't wait any longer! Last chance, are you ready? [Yes/No] no That's it, I'm leaving! Play again? [Yes/No] yes Welcome to the Number Guessing Game! I will now think of a number between 1 and 10 and you will try to guess it. That's it, I'm leaving! Play again? [Yes/No] yes Welcome to the Number Guessing Game! I see that 'quitnow' is now equal to 'quitnow' which is then caught in the first while loop if quitnow == 'quitnow': break So it skips all of the code and goes to the end of the first while loop. Now I am trying to figure around using the quitnow/break scenario inside the first loop. I know the code is a bit messy, but it's teaching me good things so far. :)
  12. Thanks a million Choffstein, I figured it out using lists. Now I have a totally new error happening, my program hangs (crashes) when I receive the IndexError (which I catch the exception for). I don't know what I'm missing, the except IndexError is suppose to be caught, but when it gets to that point the program freezes. Here's the whole thing: **Note, running this program will cause the program to hang/possibly freeze your pc** """ This is a guess a number game. It's created using while loop to only break when the user guesses the correct number """ #Need to first have the code find a random number and set it to a variable import random number = random.randint(1,10) ready = 'placeholder' quitnow = 'placeholder' phrases = ['How about now? [Yes/No] ', "You're not ready yet? [Yes/No] ", "Seriously, what are you doing that's taking so much time? Can we play now? [Yes/No] ", "I can't wait any longer! Last chance, are you ready? [Yes/No] "] #Here is the intro text to the game print "" while 1: print "Welcome to the Number Guessing Game!" print "" print "I will now think of a number between 1 and 10 and" print "you will try to guess it." #Ask the user if thye are ready to play while 1: if quitnow == 'quitnow': break if ready == 'yes': break ready = raw_input("Are you ready to play? (Yes/No) ") if ready == 'yes': print "Alright, let's begin!" break elif ready == 'no': while 1: try: ready = raw_input(phrases.pop(0)) if ready == 'yes': print "It's about time! I was getting bored." break except IndexError: quitnow = 'quitnow' #next, create the while loop that controls the guessing while 1: if quitnow == 'quitnow': print 'That\'s it, I\'m leaving!' break guess = int(raw_input("What number am I thinking of? ")) if guess == number: print "Congratulations, you have guessed the correct number!" break elif guess != number: print "Try again..." playagain = raw_input('Play again? [Yes/No] ') if playagain == 'no': break It took me about 30 minutes just to figure out I originally had my except in the wrong indent (IDLE was giving a syntax error), and I finally got in the right place (I think), and now my program freezes. :(
  13. Ok, I'm trying to do something new to me, not sure if it's even possible going the route I'm going and I am having trouble finding any good search results for my attempt (so assuming I'm trying something wrong or taking it the wrong direction). In my program I have a nested while statement that asks for users to answer a yes/no question. If they answer yes, the loop breaks and the program continues, however, if they answer 'no' then it currently re-asks the same question. Here's the code: while 1: ready = raw_input("How about now? (Yes/No) ") if ready == 'yes': print "It's about time! I was getting bored." break What I'd like to do is if the user types 'no' that the program asks a question, but it takes the questions from a pre-made dictionary or list. Then, every time the user types 'no' the program will take the next response from the list and print it. So, if I have a dictionary or list of 5 responses, each time the user types 'no' it will respond with the next phrase in the list. So far I've been trying to figure out how to do this using a dictionary to hold the phrases. response = {1:'phrase 1',2:'phrase 2',3:'phrase 3'} I am not sure if this is the right way to approach it, but I don't know how to handle getting each value (or returning the key as a value) one at a time and being able to print the result(well ok that's not true, I know how to get the value from a dictionary using the dictVar.get method). I don't want to have to write a new line for every response and make a ton of while loops. I figured there must be a way to have the code automatically pick the next phrase in some sort of loop using a dictionary or list. So, I don't want or need the answer to the question all coded out for me, I just need a hint at what direction I should be going. I'd like to figure some of this out on my own if possible. Should I be using a dictionary? A List? Should I write my own function to handle some of this? Thanks a bunch! [Edited by - Landshark on August 19, 2009 12:21:54 AM]
  14. Thank you Zahlman for your detailed reply. I've really been enjoying Python so far, I'm about 1.5 weeks into learning it completely on my own. Your reply helped me wrap my head around the concept a bit more and I appreciate it! I made my first game today from scratch (just a simple 'guess the number' game), but I'm hoping to use it along with a stock profit calculator (really really basic) program I made to practice making GUI's in python. Although I'll probably end up using pygame for both GUI's just to get use to how it works. I'll check out wxPython as well.
  15. Thank you very much, that's exactly what I needed to know. :)