Thread: I'v just created Snake Game,Rate it!:) + Laptop?

  1. #1
    Registered User Foxefde's Avatar
    Join Date
    Mar 2013
    Location
    Lithuania
    Posts
    17

    Wink I'v just created Snake Game,Rate it!:) + Laptop?

    Hello everyone,

    I'v just created snake Snake Game Cpp By Foxefde - YouTube

    Rate it: )

    Ofc,I'v used windows functions ,like colors and clearscreen,but these can be simply replaced,as code is really not messy ,heh.

    Probably my best game made with c++ so far !Moving to directx now !;D


    And the question as well:

    I'm thinking about buying new laptop.

    Price about 850-1100 Dollars,for programming?
    Any advices?

    Thanks

  2. #2
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694
    Can we play it somewhere?
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Foxefde View Post
    And the question as well:

    I'm thinking about buying new laptop.

    Price about 850-1100 Dollars,for programming?
    Any advices?

    Thanks
    Well, I could write a wall of text on this subject, so that's precisely what I'm going to do.

    So first, you need to decide what you want to do with it. You say you want programming. Okay. But what about gaming? What about portability and weight? How much performance do you need?
    It's all about tradeoffs: gaming means heavy laptops. Performance does too, in a way. You can get away with pretty good performance with little weight if you skip the dedicated graphics card, though.
    Think about how much it should weight (I usually don't care about the weight, since I prioritize other things first; there just are no good laptops that weight less than 2-3 kgs anyway IMO), performance and what gaming means to you. Quad core processors exist in some laptops, but may increase the price a little.
    As for processors, go for Intel's Core i-series. Core i5/7 have hyperthreading which may or may not be of benefit to you. Otherwise, it's mostly all about the gigahertz. Go for generation 3 or later since I think that's where they added integrated graphics. Don't know if the 4th generation is shipping yet. Newer generations is always better in terms of performance and battery.

    Second, the amount of RAM. I'd say 8 GB is minimum, but for developers, 12 GB may be better. If you run a lot of ram hungry programs, virtual machines and/or ram disks, you may need 12. Otherwise, 8 is probably sufficient. Remember to actually make sure your laptop supports this much ram! Most laptops support 8, but you shouldn't buy one that supports less than 16 so as to give you a little headway for upgrade. Don't worry if your laptop doesn't have the target amount of ram. You can always upgrade. Check to see that there are at least two slots for memory, though.

    Regarding disk space... most laptops ship with a HDD. If that's the case, put in your budget to buy an SSD if you don't already have one. I recommend 128 GB minimum; more if you want games on it. This is for OS + applications only. You should also buy an external hard disk cabinet and put your HDD in it for extra storage. Store anything not applications + OS there (because generally they do not gain that much from being on an SSD). If your laptop comes with an SSD, make sure it's 128 GB or more and buy an external HDD and repeat the above.

    USB3 is a nice thing to have, especially for external hard drives, but I would say it isn't absolutely needed. It will max transfers to your external drive to around 50 MB/s (I've gotten 100 MB/s speeds with USB3 for reference). Go for a 1 gbps ethernet port. It's pretty standard. Makes it fast to transfer files over the network between computers if you need. Also gets you past the 100 mbps broadband barrier if your country have that high speeds. Don't worry about the number of usb ports. You can always extend that with usb hubs.

    Now, as for the screen and keyboard. I'd recommend a minimum of 15 inch display with a full numeric keyboard. Makes it easier when programming, if you ask me. Less screens do not tend to have a full numeric keyboard. Screen resolutions should be 1280 x 768 or 1600 x 900 for 15 inch displays. Higher means you won't see what you're doing. Then there's matte vs high blank screens. High blank screens tend to reflect a lot of light. Matte screens don't, but they're said to have worse colours. I digress. I never see a difference and the reflection freeness of matte displays makes all the difference for matte displays.

    Now, as for security... can't talk about computers without security these days.
    Try to find a laptop with fingerprint reader. It will make life so much easier. It's very difficult to find external ones.
    Good password advice is to use a password manager with all your passwords which you can unlock with your fingerprints to access your passwords. It makes it fast, easy and comfortable to use high-grade, impossible to memorize, unique passwords for every site. Be sure to remember the master password or store it somewhere safe.
    Windows also has the ability to encrypt the file system transparently (ie, applications will read them as normal files, but they're actually stored encrypted). I always use this. Adds an extra layer of security and stops anyone from getting your data if someone steals your computer. Be sure to back up the cert in some online service, such as Dropbox!

    As for brands... well, everyone have their own ideals. I would say, at least avoid Lenovo. Horrible support (they provide only technical support and only under warranty and furthermore non-technical is redirected to their forums which Lenovo staff seems to mostly ignore; there's been a long problems with fans on some Lenovo models and it's been over a year since it was reported and it's still not fixed).

    Whew, that was my wall of text. Hope it helps something.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Registered User Foxefde's Avatar
    Join Date
    Mar 2013
    Location
    Lithuania
    Posts
    17
    stdi,

    Sure,but I'd like to get a little bit more views before that heh.


    Elysia,

    Thanks for this post,i'm currently thinking about 15.6 inches+ laptop with windows as default OS .I don't really need a laptop,with which I could play games like Battefield 3 or etc,If I play any game,it's quite old one,made like from 2002(as example,stronghold crusader) to 2010.I don't really care about its weight,it's "fat" or "slim".
    By the way as i'm going to start directx,i'm sure it's not enough just to have a weak laptop,so probably Medium-Good for games should be perfect for me.But it's really hard to choose one,if you have any idea which computer could be perfect according to these requirements - great,just post it here.Thanks.

    I appreciate any help ;]

    Also about a snake game,please share,if it's not hard to do so ;]

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    It's very difficult to propose models since they vary greatly depending on country. What I would do is figure out what I want, then go to a price comparison site and look at laptops in my pricerange. If I can, I would filter them to my requirements and then look at the models to see that they fulfill my requirements and finally, look for reviews.
    If you've got specific models you're unsure whether they meet your requirements or not, feel free to post them here to get opinions.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Snake was the first game I created. It's a fun little endeavor and I used it to teach myself linked lists... :P Probably not the most efficient approach to building a snake, but when I was struggling to find a good example for learning linked lists, snake just kind of popped into my head. Eventually, I ended up implementing features like having the fruit rot, changing color and reducing points over time, options to travel through the walls and to the other end, options to travel through its own body, and eventually an AI to play the game automatically which I used as a backdrop to the main menu screen.

    The second game I create was a little command prompt Tetris game, which I created because I saw Elysia post one and I was unsatisfied with the fact that I had been programming for a longer period of time and I never made one... so I built a quick version for myself in a night to satisfy my competitive nature.

    Unfortunately, I think I had saved both of those games to an old Google Pages before they converted to the new format and they're lost forever.
    Last edited by SlyMaelstrom; 08-14-2013 at 02:52 PM. Reason: Yes, please.
    Sent from my iPad®

  7. #7
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964
    Quote Originally Posted by SlyMaelstrom View Post
    Snake was the first game I created. It's a fun little endeavor and I used it to teach myself linked lists... :P Probably not the most efficient approach to building a snake, but when I was struggling to find a good example for learning linked lists, snake just kind of popped into my head. Eventually, I ended up implementing features like having the fruit rot, changing color and reducing points over time, options to travel through the walls and to the other end, options to travel through its own body, and eventually an AI to play the game automatically which I used as a backdrop to the main menu screen.
    I did the exact same thing, for some reason a linked list seemed like the perfect data structure for a snake that grows, it just fit so well.
    How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.

  8. #8
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Quote Originally Posted by Neo1 View Post
    I did the exact same thing, for some reason a linked list seemed like the perfect data structure for a snake that grows, it just fit so well.
    I also used a linked list for Snake, my first real SDL game. Perhaps it's because the body segments are linked, or perhaps because the first node in a linked list is referred to as the head - or maybe because it was the only data structure I knew at the time. Such fun.

  9. #9
    Registered User Foxefde's Avatar
    Join Date
    Mar 2013
    Location
    Lithuania
    Posts
    17


    And about laptop:Acer Aspire V3-772G-9829

    What about this?
    Although for me Dell is the best ,+ i need windows 8

  10. #10
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Although specs look good on paper, it's missing a fingerprint reader, which is reason enough for me not to recommend it.
    There are a couple of missing details on the homepage such as max ram, type of screen, though. You should figure those details out, if you haven't already.
    Battery life seems very, very poor. Probably a very small battery?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  11. #11
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    I'd recommend the Asus Ux31 (or a variant of it), fits most of my 'specs' for an ideal development laptop.

    Should I need to code away from my lovely desktop, I'd immediately buy that.
    Last edited by manasij7479; 08-16-2013 at 10:23 AM.

  12. #12
    Registered User Foxefde's Avatar
    Join Date
    Mar 2013
    Location
    Lithuania
    Posts
    17
    fingerprint reader?

    Well,I think this asus is a little bit too expensive for me.

    I don't really care about its weight at all,it should have windows8(as i'm learning directx 11);
    I'm thinking about at least 15inches size,as it will not be for programming only.

    I'v checked some laptops again,these look quite good for me,what do you think?

    Acer Aspire V5-571P 572

    Lenovo IdeaPad Z580 552 ~Pounds~

    Asus K55VD 531

    But..Prices are so diffirent in websites
    Last edited by Foxefde; 08-16-2013 at 10:46 AM.

  13. #13
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Acer Aspire V5-571P 572: Garbage. Dual core, max 8 gb ram, too low resolution, ships only with integrated graphics and 4 GB ram, and all for that price? I think not. Plus, no mention of a fingerprint reader.

    Lenovo IdeaPad Z580: Garbage. Dual core, low resolution, no gigabit ethernet port. No mention of fingerprint reader.

    Asus K55VD: Garbage. Only up to 8 GB of ram (too low!), too low screen resolution.

    Asus Ux31: Garbage. From what I see, it's costly, max ram is 4 GB (that seems too low, though, so perhaps it's faulty information; maybe 8 is more like it?), insane resolution (up to 1920x1080 on a 13 inch screen)), no dedicated graphics card, no numeric keypad because it's just too small, the screen is just too small (13 inch doesn't cut it for programming), no quad core processor. This is completely against what you want for your type of computer.

    I can throw you a bone, perhaps. If you can find a Lenovo Edge E530 for a sound price, it might be a good investment. It comes in several different configurations, so make sure to get one with a fingerprint reader. I'm using this model, and while it's not perfect (especially the fan), it has all that I look for in a laptop (minus the SSD; but that's something you're going to have to accept), and I got it for around $650 here. It's the best laptop I've seen so far, pretty much. Don't know if it exists there, but it's worth a shot, I guess.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #14
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    The rule of thumb for me on a laptop is to buy the best hardware possible, because the prospect of upgrades is bleak on the machine.

  15. #15
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    I don't know why Elysia keeps banging on about how important a fingerprint reader is, when they're such rubbish.
    https://www.youtube.com/watch?v=WEjkts7Fn3I
    https://www.youtube.com/watch?v=MAfAVGES-Yc

    What happens if you injure your finger (or worse), are you then permanently locked out of the machine?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Dat snake game...
    By esrelmantis in forum C++ Programming
    Replies: 3
    Last Post: 05-19-2013, 04:24 AM
  2. Snake game..
    By Marcus007 in forum C Programming
    Replies: 0
    Last Post: 12-05-2011, 06:58 PM
  3. Help with a snake game?
    By awr7126 in forum Game Programming
    Replies: 2
    Last Post: 12-06-2010, 06:39 PM
  4. Help with snake game in sdl/c
    By joellllmal in forum Game Programming
    Replies: 4
    Last Post: 08-22-2010, 12:14 AM
  5. About SnaKE game..
    By ozumsafa in forum C Programming
    Replies: 3
    Last Post: 10-19-2007, 05:46 PM

Tags for this Thread