Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 June, 2013, 09:52:15 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 [2] 3   Go Down
  Print  
Author Topic: How do you make games with coding??? -  (Read 1142 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
BlakPilar
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 20 February, 2013, 02:38:22
Date Registered: 16 July, 2011, 02:50:55
Posts: 735


Total Post Ratings: +43

View Profile
« Reply #15 on: 25 February, 2012, 18:29:51 »
0

Did you watch the video? To do what you asked, you would just update everything that needs to be updated when your update method is called. Here's some pseudocode to demonstrate what I mean:

update:
    move ball based on travelling direction
    if ball collides with wall or paddle
        method to make ball bounce off of surface
    if ball has passed some paddle
        add point to winner
        reset ball location
    if user presses a key we will use (i.e. Up, Down, W or S)
        update player's paddle location
    update AI
draw:
    clear background
    draw scores
    draw walls
    draw ball

Basically after each draw method is done, the update method will be called, and when each update method is done the draw method will be called.
Logged
runeazn
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 04 March, 2013, 19:27:00
Date Registered: 15 August, 2011, 15:21:06
Posts: 191


Topic starter
Total Post Ratings: +2

View Profile
« Reply #16 on: 25 February, 2012, 18:29:53 »
0

thats no explanation Big frown
Logged
aeTIos
You got stair'd!
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: Today at 06:09:33
Date Registered: 15 September, 2010, 06:00:00
Location: Netherlands, Overijssel
Posts: 3146


Total Post Ratings: +120

View Profile
« Reply #17 on: 25 February, 2012, 18:32:16 »
0

Do you know what you should do? get a 84+ and learn programming in BASIC and then in Axe. I'm not rude, but that REALLY helps A LOT. In fact, w/o my 84 i would never have been programming stuffs.
Logged

If something above sounds rude, feel free to vote it down, it was not meant to be rude<<lolol
--Always stay relAXEd!--


Spoiler for Hidden:


[







Spoiler for Still Alive:
This was a triumph.
I'm making a note here: HUGE SUCCESS.
It's hard to overstate my satisfaction.

Aperture Science:
We do what we must because we can.
For the good of all of us
Except the ones who are dead.

But there's no sense crying over every mistake
You just keep on trying till you run out of cake
And the science gets done and you make a neat gun
For the people who are still alive.

I'm not even angry.
I'm being so sincere right now.
Even though you broke my heart and killed me.
And tore me to pieces.
And threw every piece into a fire.
As they burned it hurt because
I was so happy for you.

Now these points of data make a beautiful line
And we're out of beta we're releasing on time.
So I'm GLaD I got burned think of all the things we learned
For the people who are still alive.

Go ahead and leave me.
I think I prefer to stay inside.
Maybe you'll find someone else to help you.
Maybe Black Mesa -
THAT WAS A JOKE. HA HA, FAT CHANCE.
Anyway, this cake is great:
It's so delicious and moist.

Look at me still talking when there's science to do.
When I look out there it makes me GLaD I'm not you.
I've experiments to run there is research to be done
On the people who are still alive

And believe me I am still alive.
I'm doing science and I'm still alive.
I feel FANTASTIC and I'm still alive.
While you're dying I'll be still alive.
And when you're dead I will be still alive.

Still alive
Still alive
Munchor
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: 13 June, 2013, 19:29:09
Date Registered: 16 October, 2010, 15:39:13
Location: Position
Posts: 6209


Total Post Ratings: +174

View Profile
« Reply #18 on: 25 February, 2012, 18:33:22 »
0

OP, if you don't have much experience, I don't recommend you to try out coding games just yet. However, in the near future, try pygame, it's great for making games with Python. I don't recommend C# or XNA because it's not cross-platform Smiley
Logged
Spyro543
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: Yesterday at 01:49:00
Date Registered: 15 April, 2011, 01:42:09
Location: Ohio
Posts: 998


Total Post Ratings: +59

View Profile WWW
« Reply #19 on: 25 February, 2012, 18:36:13 »
0

If you're doing pong, you're going to want four variables for the ball: x, y, x velocity, and y velocity. To start the ball going to the lower right, we'd set the x vel. and y vel. both to 1. Then we'd increase x by x vel. and y by y vel. each loop iteration to make the ball move. To flip the direction of movement do
velocity variable *= -1
« Last Edit: 25 February, 2012, 18:36:19 by Spyro543 » Logged


I own a Compact Computer 40!
Programming languages known: BASIC, C
Favorite Pokemon: Dialga
Favorite games: Super Hexagon, Torchlight II
runeazn
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 04 March, 2013, 19:27:00
Date Registered: 15 August, 2011, 15:21:06
Posts: 191


Topic starter
Total Post Ratings: +2

View Profile
« Reply #20 on: 25 February, 2012, 18:47:48 »
0

how do you make the bal move?
yes let it draw every frame but how do we let it add the x and y coordinates?

as the spot where the ball hits the uhh stick it will decide the movement the ball will make.
Logged
aeTIos
You got stair'd!
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: Today at 06:09:33
Date Registered: 15 September, 2010, 06:00:00
Location: Netherlands, Overijssel
Posts: 3146


Total Post Ratings: +120

View Profile
« Reply #21 on: 25 February, 2012, 18:49:11 »
+1

You define more variables. Just like 1->x and stuff. ITS EASY BRO.
Look up a python tutorial for dummys.
Logged

If something above sounds rude, feel free to vote it down, it was not meant to be rude<<lolol
--Always stay relAXEd!--


Spoiler for Hidden:


[







Spoiler for Still Alive:
This was a triumph.
I'm making a note here: HUGE SUCCESS.
It's hard to overstate my satisfaction.

Aperture Science:
We do what we must because we can.
For the good of all of us
Except the ones who are dead.

But there's no sense crying over every mistake
You just keep on trying till you run out of cake
And the science gets done and you make a neat gun
For the people who are still alive.

I'm not even angry.
I'm being so sincere right now.
Even though you broke my heart and killed me.
And tore me to pieces.
And threw every piece into a fire.
As they burned it hurt because
I was so happy for you.

Now these points of data make a beautiful line
And we're out of beta we're releasing on time.
So I'm GLaD I got burned think of all the things we learned
For the people who are still alive.

Go ahead and leave me.
I think I prefer to stay inside.
Maybe you'll find someone else to help you.
Maybe Black Mesa -
THAT WAS A JOKE. HA HA, FAT CHANCE.
Anyway, this cake is great:
It's so delicious and moist.

Look at me still talking when there's science to do.
When I look out there it makes me GLaD I'm not you.
I've experiments to run there is research to be done
On the people who are still alive

And believe me I am still alive.
I'm doing science and I'm still alive.
I feel FANTASTIC and I'm still alive.
While you're dying I'll be still alive.
And when you're dead I will be still alive.

Still alive
Still alive
BlakPilar
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 20 February, 2013, 02:38:22
Date Registered: 16 July, 2011, 02:50:55
Posts: 735


Total Post Ratings: +43

View Profile
« Reply #22 on: 25 February, 2012, 18:58:29 »
0

I'm going to go with aeTIos on this and say read a Python tutorial. A lot of games do basic math and updating, which are covered in tutorials.
Logged
aeTIos
You got stair'd!
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: Today at 06:09:33
Date Registered: 15 September, 2010, 06:00:00
Location: Netherlands, Overijssel
Posts: 3146


Total Post Ratings: +120

View Profile
« Reply #23 on: 25 February, 2012, 19:00:54 »
0

My experience:
90% of programming is saying "calculate x+24c+6-f*2(55y)" and stuff. Not a joke.
Logged

If something above sounds rude, feel free to vote it down, it was not meant to be rude<<lolol
--Always stay relAXEd!--


Spoiler for Hidden:


[







Spoiler for Still Alive:
This was a triumph.
I'm making a note here: HUGE SUCCESS.
It's hard to overstate my satisfaction.

Aperture Science:
We do what we must because we can.
For the good of all of us
Except the ones who are dead.

But there's no sense crying over every mistake
You just keep on trying till you run out of cake
And the science gets done and you make a neat gun
For the people who are still alive.

I'm not even angry.
I'm being so sincere right now.
Even though you broke my heart and killed me.
And tore me to pieces.
And threw every piece into a fire.
As they burned it hurt because
I was so happy for you.

Now these points of data make a beautiful line
And we're out of beta we're releasing on time.
So I'm GLaD I got burned think of all the things we learned
For the people who are still alive.

Go ahead and leave me.
I think I prefer to stay inside.
Maybe you'll find someone else to help you.
Maybe Black Mesa -
THAT WAS A JOKE. HA HA, FAT CHANCE.
Anyway, this cake is great:
It's so delicious and moist.

Look at me still talking when there's science to do.
When I look out there it makes me GLaD I'm not you.
I've experiments to run there is research to be done
On the people who are still alive

And believe me I am still alive.
I'm doing science and I'm still alive.
I feel FANTASTIC and I'm still alive.
While you're dying I'll be still alive.
And when you're dead I will be still alive.

Still alive
Still alive
AngelFish
This is my custom title
Administrator
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Gender: Male
Last Login: Today at 01:08:43
Date Registered: 15 August, 2010, 09:18:54
Posts: 3192


Total Post Ratings: +222

View Profile
« Reply #24 on: 25 February, 2012, 19:00:59 »
0

I still dont get how you can make games with coding after getting a little taste of coding language python Tongue

Eck, this question sure is vague...

A nice analogy might be "I still don't understand how they predict the weather after using an iPhone app." Tongue

Here's a high level overview of how games work though:

  • The user executes the program by running it in some fashion
  • The program initializes itself (allocates memory, checks to make sure the levels are present, sets constants, etc...)
  • The program then begins executing. It will often go into a menu around this point, which will allow the user to select what level they want to play and other stuff.
  • The program loads all the data necessary then begins executing the game code.
  • The program enters what is referred to as a "big honkin' loop." This loop is where the entire game happens.
  • Inside the "big honkin' loop, many things occur. The first is sometimes that the world is generated and rendered onscreen.[/li
    • Then all of the stuff the player will interact with is rendered (such as enemies)
    • The player's controls are checked for inputs. If there are inputs, the world is adjusted accordingly. Otherwise, the game continues as if nothing happened (because that's exactly what happened).
    • When the player tells the game to quit/exit, the game breaks out of the loop and shuts down.

Logged

∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ
BlakPilar
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 20 February, 2013, 02:38:22
Date Registered: 16 July, 2011, 02:50:55
Posts: 735


Total Post Ratings: +43

View Profile
« Reply #25 on: 25 February, 2012, 19:03:33 »
0

My experience:
90% of programming is saying "calculate x+24c+6-f*2(55y)" and stuff. Not a joke.

Yes games also have a lot of complex math, but even games like Crysis have simple math in them.

I still dont get how you can make games with coding after getting a little taste of coding language python Tongue

Eck, this question sure is vague...

A nice analogy might be "I still don't understand how they predict the weather after using an iPhone app." Tongue

^ This. One does not simply know all the programming after a "little taste."
Logged
AngelFish
This is my custom title
Administrator
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Gender: Male
Last Login: Today at 01:08:43
Date Registered: 15 August, 2010, 09:18:54
Posts: 3192


Total Post Ratings: +222

View Profile
« Reply #26 on: 25 February, 2012, 19:32:43 »
0

Games like Crysis are largely an exercise in "How simple can we make the code to do this?" I've used some of the published algorithms from games including Crysis before and it's amazing just how simple some of the things are. In crysis II, for example, a lot of the stuff they use are best described as hacks. Were you a bit disappointed when you saw that Deep Thought's fruit ninja used a bunch of static sprites to make the fruit "rotate?" Turns out, that's what Crysis does for some of its plant shading. Complete rubbish as far as true realism goes, but who can argue with the results? Being able to simplify things tremendously like that is part of the Art of Game Programming. It's also a very advanced topic in places Tongue

EDIT: I love Deep Thought's way of rotating the fruit, if it's not clear. Great job, Hal!
« Last Edit: 25 February, 2012, 19:33:56 by Qwerty.55 » Logged

∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ
BlakPilar
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 20 February, 2013, 02:38:22
Date Registered: 16 July, 2011, 02:50:55
Posts: 735


Total Post Ratings: +43

View Profile
« Reply #27 on: 25 February, 2012, 19:46:40 »
0

Personally I wasn't surprised when I saw it. That's exactly the way I would've done something like that. In fact, it is the way I do things. For animations I just use a bunch of sprites and loop them together based on the game's time. Plus I'd imagine that's the fastest way to do that kind of thing, especially with shading and in large games like Crysis. I always love finding out how things that seem complex are actually really simple. It all comes down to whether or not you're over-thinking something or not.
Logged
Spyro543
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: Yesterday at 01:49:00
Date Registered: 15 April, 2011, 01:42:09
Location: Ohio
Posts: 998


Total Post Ratings: +59

View Profile WWW
« Reply #28 on: 25 February, 2012, 20:40:52 »
0

I know quite a bit of Python already: all of the basic built-in functions, how to do GUIs, and how to connect to the internet with it. However, I still don't have enough knowledge to make a decent game. It takes quite a lot of programming knowledge to make good graphical games.
Logged


I own a Compact Computer 40!
Programming languages known: BASIC, C
Favorite Pokemon: Dialga
Favorite games: Super Hexagon, Torchlight II
epic7
Chopin!
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 04:47:36
Date Registered: 22 October, 2011, 01:45:43
Location: Northeast US
Posts: 2181


Total Post Ratings: +122

View Profile
« Reply #29 on: 25 February, 2012, 20:41:59 »
0

The program enters what is referred to as a "big honkin' loop." This loop is where the entire game happens.
Lol, people call it the big honkin' loop? Tongue
Logged



Current Projects:
TitleLanguageProgressStatus
DrillMiner    C (ndless)   40%         Paused

Spoiler for Programming languages I currently know:
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit Tongue)
Pages: 1 [2] 3   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.736 seconds with 32 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.