Alfonso Crawford, the Slackerjack

  • Random
  • Archive
  • RSS
  • Ask
  • Submit

Why do Do-While Loops Exist?

esotericdrabbles answered your question: Anybody have a coding-related problem I can help with?
why do them do-loops exist i dont want them anymore

It’s actually pretty simple~!

  • Normal while-loops check the condition before ever running.
  • Do-while loops check after running, meaning that the loop will run at least once.

I’ve never had to use it, myself. Here’s my attempt at an example:

So you’ve got a game. It’s got a timer; and once that timer hits zero, the game exits. Let’s say that something craps out, and you’re in the game before setting the timer: say this is a problem, because the game checks for player-connections and reports on ‘em. If the game just clocks out without doing the checks, everybody’ll be reported as rage-quitting! You wanna ensure that people are registered as properly connected, so a do-while loop would be preferred.

There are better ways around that particular problem, but hey. Do-while loops are a lot like exclusive-or, in that they’re real purpose is to just prove how clever you are.

Hope that all helps!

    • #esotericdrabbles
    • #correspondence
    • #code
    • #programming
  • 1 week ago
  • 2
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Anybody have a coding-related problem I can help with?

I did want this blog to have a programming-theme, after all: I’ve strayed way too far from that.

    • #code
    • #programming
    • #python
    • #c++
    • #php
    • #javascript
    • #html5
    • #game development
    • #game design
  • 1 week ago
  • 3
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
Even though it’s a series of events which caused this, it’s that my single line that caused this.
The XKit Blog, “A series of unfortunate events”

Source: xkit-extension

    • #code
    • #programming
  • 3 weeks ago
  • 2
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Q:Ooh! OohOohOoh!! Mememe!!! *raises hand* Why don't you start using Unity3d with the big boys like me? ouo

kittfiev

My current projects are about more than just a finished product. They are about fixing long-standing problems in the artistic, cultural, and industrial facets of video gaming. No engine provides a data-management system on par with Blender, and that is absolutely the most critical component to my entire plan.

In the future, with other games that have different goals, I have no qualms whatsoever using tools I’m not using now: those tools just don’t help with what I am trying to do right now.

    • #kittfiev
    • #game design
    • #python
    • #blender
    • #data management
    • #open source
    • #foss
    • #culture
    • #gaming
    • #correspondence
    • #tmi tuesday
    • #business
    • #programming
    • #code
  • 3 weeks ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Q:What exactly is it that you do? I know from looking at your blog that you make video games, but do you work for a company or by yourself? How hard is it to learn how to program video games (because it looks really hard)? Do you ever plan to use source filmmarker?

visambros

I’m kicking off a graphics-design career, apparently. I have no day job. In the near future, I’ll be taking up video-editing and whatever it’s called when you start doing YouTube as a thing.

Learning “how to program video games” is excruciatingly difficult, unless you learn the more important skill of “how to order your thoughts.” What kind of game are you making? How do you want it to be played? How much time do you have to work on it? How do you convey your own thoughts? If you don’t know how to answer those questions, making video games will be tough. If you don’t know how to ask those questions, making video games will be impossible.

I see the value in SFM, but I see myself hiring someone else to use it before I would.

    • #visambros
    • #game design
    • #personal development
    • #programming
    • #code
    • #personal
    • #tmi tuesday
    • #correspondence
  • 3 weeks ago
  • 1
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Does anyone else sleep on algorithms?

I know what I gotta do next, with this C/Python integration, but it feels like I gotta let it sit for a little while?

    • #code
    • #programming
    • #c
    • #python
    • #game development
  • 2 months ago
  • 1
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Should I write up what I’ve learned of Blender-modding, when I’m done with this add-on I’m making?

I’d gladly share what I’ve learned, if anyone’s interested.

    • #blender
    • #programming
    • #code
    • #game development
    • #open source
    • #linux
    • #python
    • #c
    • #c++
  • 2 months ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

I’m so messed up over my projects that I can’t even enjoy porn.

This is surely hell.

    • #personal
    • #programming
    • #code
  • 2 months ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
Computers v. Developers
View Separately

Computers v. Developers

    • #code
    • #programming
    • #lol
    • #puppies
    • #animals
    • #pugs
    • #humor
    • #pictures
    • #java
    • #python
    • #c++
    • #c
    • #javascript
    • #linux
    • #open source
    • #windows
    • #cute
    • #seizure warning
  • 2 months ago
  • 16
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
I didn’t know I had access to curses! Shit!
Something I just said completely without irony, when browsing Blender’s built-in Python library
    • #programming
    • #adult
    • #humor
    • #lol
    • #code
    • #blender
    • #python
    • #open source
    • #foss
  • 2 months ago
  • 1
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
Page 1 of 24
← Newer • Older →

About

Avatar

Need help making games? websites? mafia hits? I'll help you do it more simply. There's a lot of nonsense out there in development, and I've got as little patience for it as you. My focus is, right now:

  • Blender / Python
  • HTML5 / JavaScript
  • PHP / Ancient Necromancy

On this site, you'll find a mix of detailed tutorials and quick tips to keep from losing nights to stupid hiccups. Along the way, I will spam fanart and digressions regarding modern survivalism, personal projects, and tales of my antagonizing the animal kingdom.

This blog is LGBT Friendly

WARNING: the author of this blog has an unhealthy interest in women, and it is periodically reflected in the content shared. Most of the sick displays will be safe for work.

Pages

  • An Important Sidenote
  • Fluffernutter Peanut-butter with a Slice of Cheese

Me, Elsewhere

  • @MadamLaunch on Twitter
  • My Skype Info
  • Linkedin Profile

Twitter

loading tweets…

  • RSS
  • Random
  • Archive
  • Ask
  • Submit
  • Mobile
Effector Theme by Pixel Union