Bay 12 Games Forum

Please login or register.

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

Author Topic: Trying to make a game.  (Read 5679 times)

sonerohi

  • Bay Watcher
    • View Profile
Re: Trying to make a game.
« Reply #15 on: July 09, 2009, 11:00:16 am »

I quickly had a falling out with Game Maker do to it not supporting any sprites or sounds I tried to make myself.
Whaaaat?
Quite a few people dare to disagree.

 Although considering the complexity of anything made to make anything resembling a game, such a feature could be in an obtuse location.

I ever said it was a world-wide problem  :-\. Besides, part of the little contract thing equated to:"all games made in gamemaker lite are property of the yoyogames people".

I've found that, thanks to the educational tutorial, I can now stumble through basic lines of code and understand what is happening.
Logged
I picked up the stone and carved my name into the wind.

Muz

  • Bay Watcher
    • View Profile
Re: Trying to make a game.
« Reply #16 on: July 09, 2009, 11:37:06 am »

I DONT recommend using a Game Making Engine because they're script based and it may be hard (and pointless) to go from one script based language to a real programming language.

Not really. I started off using Klik & Play, which is as noobish as game making engines go and am now working professionally with programming language. You learn (or you should learn) good programming skills from scripts, the very least in how to sort out your code. Besides, some of them are quite advanced. Game Maker has been viewed as crap by a lot of people, but really, Spelunky proves that a tool may not be so bad with a good craftsman.

I really wouldn't recommend a "professional language" unless you're either making a roguelike or an epic game. And if you are making an epic game that needs a programming language, you're better off taking a degree or at least a course in it.

Game making tools work best for hobbyists. You could create games like Jagged Alliance or LCS with one, provided you have decent programming skills. Anyway, I greatly prefer Construct over GameMaker. It's easier for newbies to do tough stuff, but gives advanced users a lot more options.
Logged
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: Trying to make a game.
« Reply #17 on: July 09, 2009, 01:55:03 pm »

Little time so short answer...

LAter I'll develop...

My own experience was starting with AGS (Adventure Game Studio) Wich is a very similar to c++ script... It was a cool tool but when I had to move to real c++ I had to forget a lot of wrong concepts I had...

That's why I suggest a professional language to start with.
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: Trying to make a game.
« Reply #18 on: July 09, 2009, 02:13:41 pm »

I started out by downloading a MUD server source, and hacking around in it to add stuff (I used ROM2.4).  If you want to get a feel for C, hacking up someone else's C code is a great way to start.

I recommend C# / XNA, too.  It's good stuff.  XNA is actually somewhat easy to use (although it still takes some experience to make an actual playable thing out of what you start with).

If you want to have a game within a couple months though, definitely go with Game Maker.
Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

sonerohi

  • Bay Watcher
    • View Profile
Re: Trying to make a game.
« Reply #19 on: July 09, 2009, 05:48:45 pm »

I've run into a rough patch in understanding switch-cases. Can someone help me out with it?
Logged
I picked up the stone and carved my name into the wind.

Ohaeri

  • Bay Watcher
    • View Profile
Re: Trying to make a game.
« Reply #20 on: July 09, 2009, 05:57:49 pm »

I've run into a rough patch in understanding switch-cases. Can someone help me out with it?

What exactly do you need help with: understanding theory, or syntax? Theory I can help with, but probably not syntax as I've only programmed in Java and C++ and it's been a few years.
Logged

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Trying to make a game.
« Reply #21 on: July 09, 2009, 06:35:18 pm »

Code: [Select]
switch(statement that is evaluated to a number)
{
  case #:
    (code)
  case ##:
    (code)
  default:
    (code)
}

Unless you end a case with break or return, it will also run the next case.
So, for example, to count backwards from a small number,
Code: [Select]
int n=(get number however you feel like)
switch(n)
{
  case 5:
    (output 5)
  case 4:
    (output 4)
  case 3:
    (output 3)
  .....
    break;
  default:
    (output "The number must be between 1 and 5, inclusive)
}
The code starts at the matching label until it reaches either return, the closing }, or break.

Often, people will use #define to set a (usually) all-caps word to a number so rather than case 5:, they use case WOODEN_DOOR:
Logged
Eh?
Eh!

sonerohi

  • Bay Watcher
    • View Profile
Re: Trying to make a game.
« Reply #22 on: July 09, 2009, 09:24:55 pm »

Qwertyuiopas post helped a bit. I still don't get what exactly they would be useful for, or how they count down. Wouldn't it be easier to put in the code for "if n > 0, -1"? That way, it loops downward until n=0.
Logged
I picked up the stone and carved my name into the wind.

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: Trying to make a game.
« Reply #23 on: July 09, 2009, 09:30:48 pm »

It doesn't count down.  It's as if it were a set of if/else where it choses the exact value and compares it until it founds a match (Or doesnt and uses the default option).

Don't get mixed up between loops (while, for, do) and selections (If, else, case)
It's useful:
Imagine a menu:

Main Menu
1. New Game
2. Load Game
3. Highscores
4. Exit


You CAN do if else but case is more organized and easier to read and change. 
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

sonerohi

  • Bay Watcher
    • View Profile
Re: Trying to make a game.
« Reply #24 on: July 09, 2009, 09:39:15 pm »

Ooooooooh. Now I see the practical use of it! Qwerty made it sound like a countdown. Well, now that that is cleared up, it is time to integrate it into my code.

Incidentally, I hit up Barnes and Noble for some tutorial books on C++ and only found books on C#. It would seem that C# is more expansive, but still uses a lot of syntax from C++, so it would be beneficial to learn C++ first. My question is, what does C# offer over C++ that would be more useful?

Also, take some sympathy on me for this question as I have oceans behind my ears given that I'm 14 and started 2 days ago. What,exactly, must be done to make something in C++ be more than text based? Is it possible? What programs would I need in addition if it is?
Logged
I picked up the stone and carved my name into the wind.

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: Trying to make a game.
« Reply #25 on: July 09, 2009, 10:03:43 pm »

Incidentally, I hit up Barnes and Noble for some tutorial books on C++ and only found books on C#. It would seem that C# is more expansive, but still uses a lot of syntax from C++, so it would be beneficial to learn C++ first. My question is, what does C# offer over C++ that would be more useful?
MSDN is your friend!

One VERY RELEVANT feature is that c# wraps up any "memory trash" that may remain... like java.  So you don't have to be THAT careful as you had to be in c++ regarding strings and other stuff.

Quote from: sonerohi
Also, take some sympathy on me for this question as I have oceans behind my ears given that I'm 14 and started 2 days ago. What,exactly, must be done to make something in C++ be more than text based? Is it possible? What programs would I need in addition if it is?
It's not about programs but about libraries or GDI. 
There's some libraries you can use to "draw" things using a c++ compiler.
allegro is a library specifically designed for game making.
DirectX and Opengle are other Development kits to make graphics.
There's also GDI "system" that use DOS/windows functions to make graphics. 

I don't recommend you to focus on graphics just yet.  Make sure you fully grasp the basics of C++ to advance... Step by step :)

I hope I would've started at 14...
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

IndonesiaWarMinister

  • Bay Watcher
    • View Profile
Re: Trying to make a game.
« Reply #26 on: July 10, 2009, 04:35:09 am »

Quote
I hope I would've started at 14...

Did you just ordered me to learn C++??

Negative, sir, I'll learn Construct / Python + Rabbyt first.
Logged

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Trying to make a game.
« Reply #27 on: July 10, 2009, 12:01:05 pm »

Ooooooooh. Now I see the practical use of it! Qwerty made it sound like a countdown. Well, now that that is cleared up, it is time to integrate it into my code.

Incidentally, I hit up Barnes and Noble for some tutorial books on C++ and only found books on C#. It would seem that C# is more expansive, but still uses a lot of syntax from C++, so it would be beneficial to learn C++ first. My question is, what does C# offer over C++ that would be more useful?

Also, take some sympathy on me for this question as I have oceans behind my ears given that I'm 14 and started 2 days ago. What,exactly, must be done to make something in C++ be more than text based? Is it possible? What programs would I need in addition if it is?

The result is a countdown if you arrange it in decending order and do NOT return/break from the higher numbers.
Usually, you will break or return(depending on the use) after every case, and in that situation if/else if/else works.

Here is a better example(I hope) somewhat like a roguelike.

A door can be broken by explosions, but a player can also kick a door down.
Both have the same result, but the player may fail to kick down the dor, and if they succeed, they get skill.
The diffrent cases are assumed to have been #defined elsewhere.

KICK_DOOR uses the "fall through" thing so that the program flow continues through DOOR_BROKEN, doing both.
The return; at the end of DOOR_BROKEN ensures that the program does NOT dontinue to do OTHER_ACTIONS, although break; would also have worked if there was something that had to be done after the switch() before the function return;s.
Code: [Select]
switch(n)
{
  case KICK_DOOR:
    if(failure)return;
    do_some_skill_up_stuff();
  case DOOR_BROKEN:
    break_door();
    return;
  case OTHER_ACTIONS:
}

Edit:
The code is the same as
Code: [Select]
switch(n)
{
  case KICK_DOOR:
    if(failure)return;
    do_some_skill_up_stuff();
    break_door();
    return;
  case DOOR_BROKEN:
    break_door();
    return;
  case OTHER_ACTIONS:
}
Logged
Eh?
Eh!

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: Trying to make a game.
« Reply #28 on: July 10, 2009, 04:36:45 pm »

Just my opinion, but I never use switch-case blocks. Seems like unnecessarily compicated syntax to do basicly the same thing as a string of if-else blocks. Plus if-else blocks let you use any boolean expression instead of having to use a number. I'd probably end up making a bunch if-else blocks anyway to come up with the number to feed to the switch block anyway.

Java-using seventeen-year-old here, BTW.
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: Trying to make a game.
« Reply #29 on: July 10, 2009, 04:46:13 pm »

It's a matter of opinion if you feel is tidier or not...  BUT, switch IS faster.
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.
Pages: 1 [2] 3