Author Topic: Programming Megathread  (Read 115095 times)

i don't know any of whatever you're programming in but im not seeing anything that increments counter at all. counter will always be at 1 and will never reach 50. is that the issue?
it's visual basic, I imagine. I don't know it either, but judging by the syntax, it looks like it will automatically increment it with each loop?

but maxwell, maybe it's because you're saying "Loop until counter = 50"? shouldn't it be counter2? I feel like counter would be outside of the scope by that point. but if that was the case I guess it'd give you an error...
like I said, I don't know vb, so I don't really know what that bit means
yeah, should of made that clearer
I had little doubt

it's visual basic, I imagine. I don't know it either, but judging by the syntax, it looks like it will automatically increment it with each loop?

but maxwell, maybe it's because you're saying "Loop until counter = 50"? shouldn't it be counter2? I feel like counter would be outside of the scope by that point. but if that was the case I guess it'd give you an error...
like I said, I don't know vb, so I don't really know what that bit meansI had little doubt
I do use counter2, I don't know if you caught the edit or not but I do use counter2 there and it still just freezes

I'd post the entire program if I could but it's only the loop that's making the thing crash. It's also messy as hell because I let myself get carried away, so I'm hesitant on posting it
« Last Edit: February 25, 2016, 06:31:16 PM by Maxwell. »

I do use counter2, I don't know if you caught the edit or not but I do use counter2 there and it still just freezes
oops, no I didn't notice that
I'd post the entire program if I could but it's only the loop that's making the thing crash
you should. the problem may be happening there but something before could be the cause. and don't worry about it being messy, lol

but also, try using "Loop until counter2 >= 50" instead. I don't know if it'll do what you want then, but it may not freeze. freezing is often a sign of an infinite loop
« Last Edit: February 25, 2016, 06:41:38 PM by Foxscotch »

Keeping this topic alive. Here's something I posted in the GD topic, but it's more about programming.

Ratchet & Clank 3 is a complex game, as I've discovered. I'm currently working on building a framework by reprogramming the entirety of Ratchet & Clank 3 from scratch in Unity, and I've started mapping out what systems need to be made.

I'm not aiming for complete accuracy (for example, I'm happy to have a different solution for dealing damage to an enemy vs. the original programmers, so long as the result is the same between my framework and the game). I'm just looking to get something extendible.

Quote
So, it's time to talk about some of the initial design challenges of this project. Because I've been carefully planning out my work before starting, I've realised where a lot of difficulty will lie. Firstly, here's an overview of the code classes I've planned which I think I'll need. Right now, this is only for ACTOR types (i.e. objects that are spawnable in-game).



Quote
That's probably very complex, but keep in mind that it's not finished. There's still many scripts I need to plan out for specific world objects, and I haven't even detailed the System/Data scripts yet that handle all the behind-the-scenes code.

I've posted some stuff about the big 4 current design challenges I'm facing in this post if you'd like to read more.

Seems like that should be in more of a design document format than a spreadsheet format...

Can I make a .bat that opens an ungodly amount of cmd programs?

Can I make a .bat that opens an ungodly amount of cmd programs?
i dont see why not but then again im no expert
but
why?

Can I make a .bat that opens an ungodly amount of cmd programs?
Code: [Select]
@echo off
:loop
start
goto loop

Seems like that should be in more of a design document format than a spreadsheet format...
Currently just quickly jotting down what I need. I plan on building a full on documentation resource with the goals and specifics of each source file once I know how they all generally link into each other.

I don't even know HOW to plan something. like in my head I generally know how I'm gonna do x or y but I don't know how to write that down right?
and I'm okay at documenting something after it's written but how t f do you do it beforehand
why?
cus he wants to pretend he's a "hacker"

I don't even know HOW to plan something. like in my head I generally know how I'm gonna do x or y but I don't know how to write that down right?
and I'm okay at documenting something after it's written but how t f do you do it beforehand
Yeah, I always just do all the logic in my head and then just write it and it's done. I have a very hard time planning out large projects because of this.

I probably should, but I pretty much never plan out my programming. If there's something I need to wrap my head around, like an algorithm or something, I just write out a bunch of math on my whiteboard until I understand what I need to do.

Whiteboards are an awesome thing to have for software dev, by the way. Paint + a drawing tablet is pretty great too.

but how t f do you do it beforehand
When I do systems design, if I go straight-ahead, I tend to throw in a lot of dirty code without comments that becomes extremely hard to manage. It's therefore best if I know what I want to achieve and design the rules for the system first (with proper documentation!) so that future system updates are easier to manage.

I start by thinking about everything in the game as part of a class hierarchy (not worrying about implementation, just about who is a parent and who is a child via their similarities/differences); I'll also make notes about things that can be instanced rather than requiring a whole new class.

Once I'm happy with the layout, I'll then write down implementation notes for each class that include stuff like data they need to track (variables), things they need to do (methods), things they need to react to (events) and so on. My goal is to try and get a clean network that's modular.

I'll then take the notes and build a full documentation for the system. It will definitely change after implementation, but it helps me stay focused when writing code; it's almost like a programming homework exercise you get in university, since I've written down what I need to achieve, some rules about how it works, and what the end result should be. It's also great since I have more energy at the beginning of projects, and writing documentation can be a slow and painful process at times.

Once I'm happy with the plan, I'll start laying out the roads. Things will absolutely get switched around, break or require solutions I didn't have access to before, but it's always handy to have something to stick back to.

ok so I WANT to use requirejs but why tf does it make me do this

define(function () {
  return {
    junk() {},
    moreJunk() {}
  }
});


WHY
commonjs way:

function junk() {}
exports.junk = junk;
function moreJunk() {}
exports.moreJunk = moreJunk;


is like 100x simpler. I can't even think of any advantages to the first one. I mean, I'm sure there's something, or they wouldn't have done it, but wtf is it??

Try webpack. It lets you bundle JS files together, and it supports CommonJS and AMD (the format RequireJS uses). At first it might seem a little complex to use, but going through the tutorial once makes it fairly easy to get into using.

Beyond just simply bundling files together, though, I wouldn't know stuff. That's where it gets complex, when you throw in plugins and other overly-engineered trash in the mix. Avoid that and you should do alright. Just try to make sure you don't spend too much time on your build system more than you do actually making a thing.