Tuesday, March 24, 2009

SWEATing...Day 2

Boy, I'm lost in today's notes (no pre-programming bank in my CPU), but I've typed it here for future reference. The key concepts are game loop and variables.

Programming Notes

  • game loop
  • loops for (i=0; i<10;>
  • steps=unit of time
  • basics (game maker help ref.-->actions-->control actions)
  • variables-common types (bool, int, flout, text (string), date/time)
  • set, test, ?? draw
  • help-->using expressions and variables (**need this for game)
  • expressions: calculation/can be rep by boolean (sp?) value
  • "If" state'mt-->"If-else-" blocks
  • e.g. collisions, whether an obj. is empty, chance (ie. _ in this _ chance of this happening, multiplied by framerate-->60X)
  • If block:
Actions
If ( )
Block Begin
:
:
Block End
Else
Block

  • looping:
Repeat (value or variable name)

  • scripting: advanced GML
  • f(x)'s and parameters
  • prgm:
  • use { and }
  • state'mts inside: (statement); <-----semicolon imp!
  • e.g. ammo-= 1;
  • &&
  • <>
  • ==
  • +-
  • ||
  • x/
  • ! (convent'n for 'not')
  • global.player1.name
  • alarms are global
  • individual vs. global
  • var
  • e.g. globalvar_
  • repeat ( ), while ( ) <-------no end
  • do...until ( )
  • for using if, else, if, else--->there's a switch...
  • switch (keyboard_key) {case vk_left :::break; case vk_right}
  • break--->for breaking!!! stops reading remaining sequence of code
  • continue: inside a loop, skips remaining part and goes to next???
  • exit; --->jumps out of script entirely
  • f(x)'s--->collision_point (x, y, obj, prec, not me)
The above is all the notes I've taken today and is not a full rep of today's notes since I was befuddled. Today was essentially a work day with some intro notes on programming and scripting to get us going. My game is going okay so far as I have the visual aspects near to completion (though arcade-like which is fine with 2D games) but now I need to start with the real scripting component-which I haven't done any in my life since...(drum rolls!) SuperCard!!! (All hail SuperCard...)

We had our final game idea evaluated by others this morning.

Evaluator Comments:
  • good mix of events happening
  • beach balls makes it a bit odd, try to stick w/ the hockey theme (on a side note, go to Youtube plus his trade to LA=beach ballz)
  • overall, game sounds fun/interesting
  • 2 seperate game mechanics but might want to make them more similar you you can use same code w/ diff. graphics to save time
  • in interest of time, focus on hockey aspect first and if time permits, add the driving
I'll gladly add the driving part if I can; Luongo is God-which reminds me, the Canucks need a win tonight against the Stars to stay close to the Flames, as they beat Detroit yesterday =(

For some parts of lunch, a few of us played L4D via streaming. It looked fun...(do all zombies come from pre-existing humans infected w/ a type of virus?)

Anyway, today was a simple day: work on game, and some notes on scripting.
Can't wait for tomorrow as we tackle on implementing the AI in our games...fun.......artificial intelligence...
I'll try to see if I can install GM on my PC at home to save time since it seems like every else have quite a bit of knowledge on this already.

Btw, Brett's PC had some graphical challenges this morning at startup and opted to go on beeping non-stop. No, he didn't bastardize the PC but simply went to another one. The PCs used XP.

Btw2, Liam was noticeably absent at lunch again, but Joel states that he's in another building. So all is well...my lunch was once again corned beef sandwich yum!

2 comments:

  1. for starters, yes all zombies come from pre-existing humans infected w/ a type of virus.

    Secondly, SuperTalk is hardcore.

    And most importantly, moving on to scripting eh :) This is when things should get fun. Your notes actually look to cover most of the things I would expect you to need, so if you stick to thoes, and do research when needed, you should be fine.

    Variables are key. use them to store any information that is bound to change. Once you get good at thinking in terms of variables (which sometimes takes a short while until it clicks in your mind) things will become a lot clearer.

    also, the control structures (if...else/the loops/switch statements) are what will make you game run. You will be surprised at how much you can do with if/else, for loops, and while loops alone. For loops especially. even though they are slightly harder to grasp at first, they are very useful.

    I see the logical identifiers there aswell, your &&, || and !, these will also be valuable to use in your control statements to check for situations.

    Once you start to work with these things it should get easier. also these are all things you will see in pretty much any programming language, so it should act as a good intro to anything you peruse in the future.

    If you have any questions about how to code something, I haven't used GM, but I may be able to help with some procedures that you could then convert into code.

    I look forward to reading about Day 3.

    P.S. ....haha Brett, ha ha

    ReplyDelete
  2. Wow!---Thx for your input!

    It'll still take me a few more tries to get the hang of it, especially variables, as it's an entirely new thing that I've encountered, at least imho.

    At least I enjoying it ;)

    ReplyDelete