Foul ENT

  • Home
  • Blogs
  • Podcasts
  • Videos
  • News shorts
  • About
  • Contact
  • Home
  • Blogs
  • Podcasts
  • Videos
  • News shorts
  • About
  • Contact

Code Club with The Cunt - #3

1/3/2015

0 Comments

 
It's hard to understand why things don't work sometimes. For example, I tried integer division today without typecasting. Meaning, all of the calculations for my dungeon crawler battle system went completely tits up. I've still not figured out how to get it completely sorted yet. Which is why there is no download for it at the bottom of this page. Fingers crossed, by next week, I will have sorted it and moved on to making a boss and an end message and the game will be all yours to mock and deride.
Picture

Integer Division

The way I understand it is, when you divide using integers, they always round down to the nearest whole number. Even if your answer is 3.9999999 it will return 3. This creates problems now and again which can be solved by typecasting, which I understand to be temporarily changing a variable type to another type, for example making an integer act like a float (a decimal number, to me and you).

Note: I wholeheartedly welcome anyone wanting to correct my limited understanding of the matter in the comments, as I said this is my understanding of it and if I'm wrong I will happily hold my hands up and be corrected.

“Why would you ever use integers then?", I hear you mumble in a kind of 'uninterested-but-you-have-to-ask-the-question' kind of way. Well, what about if you wanted to store the number of people in a country. You can't have 3/5ths of a person... can you?
Picture
Image Credit: http://americanvision.org/
Erm... This is awkward.
Anyway, if you declare the variable like this

int numberOfPeople;

It will always be a whole number; it will never return a decimal value (unless it is typecast) and when we assign a value to it, it must be an integer value. I know this may all seem simplistic and easy, but trust me, when you have giant sprawling programs with numerous classes you made, just because you learned how to make a class so you do it all of the fucking time now, it can be easy to forget what type of variable “heightOfCheeseBlock” is. So, when your compiler throws up a stupid error at you, it becomes really annoying. Maybe more experienced and more skilled programmers don't have these issues, but I do.

Coursera

I've been doing the Beginning Game Programming in C# course on this website. So far, the course material has not been too taxing for me. I handed in my first assignment a day after it was given and next week I should find out just how rampaging way off the mark I was with my code. I won't be too upset about it though; I'm all about the learning. I want to do well, obviously, but if I get everything perfect and don't struggle with any of the topics, it means I have wasted my time. 


I won't have learnt anything. There is nothing worse than spending a lot of time trying to improve at something and finding out you knew everything anyway. Except maybe Rastamouse. Or finally convincing your favourite lap dancer to do unprotected anal and catching AIDS.
Picture
Image Components: mackinnonandsaunders.com, stripclubtrappintour.com
I should not have been okay about Photoshopping this. - Mike

Dungeon Crawler

As I mentioned earlier, my latest practice project is a dungeon crawler. It is text based and has pre determined dungeons set out. It's not fancy, it's literally just to practice using arrays as a means to do (very) primitive collision detection. I know that there are much better ways of doing this, but using arrays and lists are something I haven't done a lot of, and I wanted to use this project to do something new and practice using one of those a bit. 

To my surprise, it worked very well. My dungeon has walls that cannot be passed through, random battles, experience levels, skills that improve the more you use them and a shop. All it needs is for me to fix the battle system, so that when your attack skills improve it doesn't break and add in a final boss battle and it will be all yours to play through and pick apart its many faults.

Picture
By The Cunt
Email The Cunt

A hidden face of the crew, The Cunt is main coder for the Foul Entertainment Gaming department. He is currently documenting the progress of our game, Foul Fantasy, in his dev blogs.

0 Comments



Leave a Reply.

    Blogs

    You can find all of our articles right here. Use the menus below to sort by date, author or series.

    Also, click the buttons below to explore our social network antics.

    Articles

    All
    30 Days Of Stuff
    5 Days With...
    Articles By Abdurahman
    Articles By Darren
    Articles By Frank King
    Articles By Jary
    Articles By Joe
    Articles By Mike
    Ask Jary
    Code Club
    Danke-bitte
    Deaf To All But Metal
    Death Of Video Games
    E3 2015
    E3 2016
    Foul Fantasy Devblog
    Foul-To's
    Friday The 12th
    General Foulection
    Jary Files
    Plenty Of Catfish
    Podcasts
    Pop Culture Club
    Rider Report
    Site News
    Star Wars Week
    #Tagurday
    WWE Stats 2019

    Archives

    January 2025
    August 2024
    June 2024
    April 2024
    January 2024
    December 2023
    November 2023
    October 2023
    August 2023
    July 2023
    June 2023
    May 2023
    April 2023
    March 2023
    January 2023
    December 2022
    November 2022
    October 2022
    September 2022
    August 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    February 2022
    January 2022
    December 2021
    November 2021
    October 2021
    September 2021
    August 2021
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2020
    March 2020
    February 2020
    January 2020
    December 2019
    November 2019
    October 2019
    September 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    June 2018
    April 2018
    March 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015
    March 2015
    February 2015
    January 2015

© Foul Entertainment, 2015 - 2022
​
​