Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 ... 91

Author Topic: Programming Help Thread (For Dummies)  (Read 100418 times)

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Programming Help Thread (For Dummies)
« Reply #30 on: May 03, 2011, 11:43:05 am »

It *does* use G++, but likely an outdated version.
Logged
Eh?
Eh!

Darvi

  • Bay Watcher
  • <Cript> Darvi is my wifi.
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #31 on: May 03, 2011, 11:46:45 am »

Does anybody know a Perl compiler and how to install it? 'cause I tried to get the lurker tracker to run and failed even getting that far.
Logged

olemars

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #32 on: May 03, 2011, 01:44:24 pm »

I wonder if there's a compiler that will actually utilize my 6 core processor...
Visual Studio, if you can hunt down the correct option in the settings labyrinth. gcc/make should also be able to. Note that multithreaded compiling is meaningful only for projects with multiple source files.

Maybe you should try the Code::Blocks IDE. Actually, skip the maybe, you might as well get used to good tools right away, and C::B is quite good and less intimidating for the beginner than Visual Studio.



Does anybody know a Perl compiler and how to install it? 'cause I tried to get the lurker tracker to run and failed even getting that far.
Perl is a scripting language, I thought the point was not to compile it.

If you're on linux you already have perl. You need to make the file executable for it to run though. On windows you can get interpreters here.
« Last Edit: May 03, 2011, 05:37:50 pm by olemars »
Logged

MaximumZero

  • Bay Watcher
  • Stare into the abyss.
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #33 on: May 03, 2011, 02:45:59 pm »

I wonder if there's a compiler that will actually utilize my 6 core processor...
Note that multithreaded compiling is meaningful only for projects with multiple source files.
I suppose that makes sense, even though I would rather it not. :P Thank you for the links. There is much !!SCIENCE!! to be done!
Logged
  
Holy crap, why did I not start watching One Punch Man earlier? This is the best thing.
probably figured an autobiography wouldn't be interesting

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Programming Help Thread (For Dummies)
« Reply #34 on: May 03, 2011, 03:49:40 pm »

One thing to consider is how many files you have #included, and the file access speed for all of them, all of your source files, the output program, and any libraries that are linked in.
Logged
Eh?
Eh!

Darvi

  • Bay Watcher
  • <Cript> Darvi is my wifi.
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #35 on: May 03, 2011, 03:54:33 pm »

On windows you can get interpreters http://www.perl.org/get.html#win32]here.
Got that. Can't use it though.
Logged

MaximumZero

  • Bay Watcher
  • Stare into the abyss.
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #36 on: May 03, 2011, 05:04:47 pm »

One thing to consider is how many files you have #included, and the file access speed for all of them, all of your source files, the output program, and any libraries that are linked in.

I know. I only used #include <iostream> on this particular project, no source files (that I'm aware of. I'm still only in my 1st semester of actual programming classes[read: I have no idea what I'm actually doing yet]), no libraries (again, that I'm aware of), and the output program is a command box.
« Last Edit: May 03, 2011, 09:39:05 pm by MaximumZero »
Logged
  
Holy crap, why did I not start watching One Punch Man earlier? This is the best thing.
probably figured an autobiography wouldn't be interesting

olemars

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #37 on: May 03, 2011, 05:40:27 pm »

On windows you can get interpreters http://www.perl.org/get.html#win32]here.
Got that. Can't use it though.

Got what and how can't you use it?
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #38 on: May 03, 2011, 10:20:04 pm »

So... Anybody here know how to do a side scroller with destructible terrain? The idea of the game is that you have to get through each level using the level as a weapon to crush and burn enemies and such, but the problem is with how each atom of stuff interacts with each other. So take for example, I have an atom of water above an atom of stone, and I remove the atom of stone. What is the best way for the water to know it is meant to fall? Should I be doing grounded checks for EVERY SINGLE PIXEL ON SCREEN every frame? I can;t be sure, but if I had to guess I would say that would be fps killing. I could, of coarse, make my map out of a rectangle of nodes, similar to a 2d doubly linked list, and each atom class extends from this node, but without an array of atoms to check against while moving a larger object, such as our hero, things will get tricks. I could, of corse, have an array of nodes that not only link to each other, but fit into an array, so when they speak to each other and decide they have to move or change, they tell the class holding the array of nodes to update them, but something about this screams bad code.

I can think of several ways to do this, but none of them seem to be correct, and this is one of those things that unlike AI or difficulty curve, if I don't get this right the first time, it will be a mess of fixing things later. What is the 'right' way?

MaximumZero

  • Bay Watcher
  • Stare into the abyss.
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #39 on: May 03, 2011, 10:47:20 pm »

That is way above my head, Max. When you figure it out, let me know.

I am, however, pleased to announce that I finally finally finished my scoreboard thing. ^_^
Logged
  
Holy crap, why did I not start watching One Punch Man earlier? This is the best thing.
probably figured an autobiography wouldn't be interesting

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #40 on: May 03, 2011, 10:49:11 pm »

Nice work Maximum! Care to share code?

sonerohi

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #41 on: May 03, 2011, 10:50:03 pm »

At first glance I'd say to do an

 if(stone removal)
then: check water

 every time the stone is removed, rather than constantly. Note: My programming skills are mainly theoretical so I probably butchered every word bigger than the articles I used. Also, try to limit the checks to a small grid with the stone as the origin.
Logged
I picked up the stone and carved my name into the wind.

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #42 on: May 03, 2011, 10:58:55 pm »

Well that was sort of the idea of the linked nodes, they seem ideal at first glance. Both the stone and water extend a node class, and this node class keeps pointers to four (Or eight if I want things to work diagonally) other nodes, that correspond to those around it. So when stone is removed, stone tell the block above it that it has been removed, and the block above it, in this case water, figures out what to do for itself. It would make for a simple and elegant object oriented solution.

Were it not for the fact that I want objects larger then a single node, that will have to do checks on many nodes at ones, so a large grid made of links will make this very hard to do. I would prefer to do this all with an array of atoms, but then checking turns into a bitch. I could, of course, give the atoms bidirectional navigability to see the array, or at least what ever is holding the array, and tell it when they are doing something, but then again it was most likely telling them they were doing something, and the system doesn't seem very object oriented at all.

MaximumZero

  • Bay Watcher
  • Stare into the abyss.
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #43 on: May 03, 2011, 11:08:45 pm »

Nice work Maximum! Care to share code?
I know it's not super-impressive, but it's a start.
Spoiler (click to show/hide)
Logged
  
Holy crap, why did I not start watching One Punch Man earlier? This is the best thing.
probably figured an autobiography wouldn't be interesting

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #44 on: May 03, 2011, 11:10:27 pm »

That will do it! So are you interested in improving it, or are you going to keep it as it is?
Pages: 1 2 [3] 4 5 ... 91