Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,053 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,278 people online right now. Registration is fast and FREE... Join Now!




How to make a 2D Game engine ?

2 Pages V  1 2 >  
Reply to this topicStart new topic

How to make a 2D Game engine ?, How to make a 2D Game engine ?

Gebbo
post 14 Mar, 2008 - 08:44 AM
Post #1


New D.I.C Head

*
Joined: 14 Mar, 2008
Posts: 1



Thanked 1 times
My Contributions


Hello i was wondering how would you make a 2D Multiplayer game engine in Visual Basic or Visual C++.. It has to be able to support multiplayer, render particles, sounds, compiling, e.x.e files e.t.c Ive done some programming similar to visual C++ but different so i can grasp how to do it fairly well..

I need to know if you have any tutorials..

Tutorials..
Compilers
Examples
How to e.t.c
User is offlineProfile CardPM

Go to the top of the page

aj32
post 14 Mar, 2008 - 02:59 PM
Post #2


D.I.C Addict

Group Icon
Joined: 30 Aug, 2007
Posts: 577



Thanked 2 times

Dream Kudos: 675
My Contributions


You could try the "DarkGDK" for Visual Studio 2008, but I'm not quite sure if that's exactly what you need! smile.gif
User is offlineProfile CardPM

Go to the top of the page

autodog
post 24 May, 2008 - 08:11 PM
Post #3


New D.I.C Head

*
Joined: 24 May, 2008
Posts: 4


My Contributions


Or search for XNA Game Studio

This post has been edited by autodog: 24 May, 2008 - 08:32 PM
User is offlineProfile CardPM

Go to the top of the page

yanom
post 25 May, 2008 - 03:54 PM
Post #4


New D.I.C Head

*
Joined: 5 Apr, 2008
Posts: 46


My Contributions


You want to make a 2d mmorpg, don't you
User is offlineProfile CardPM

Go to the top of the page

autodog
post 28 May, 2008 - 04:11 AM
Post #5


New D.I.C Head

*
Joined: 24 May, 2008
Posts: 4


My Contributions


QUOTE(yanom @ 25 May, 2008 - 04:54 PM) *

You want to make a 2d mmorpg, don't you

Does it really matter if he wants to create a 2d mmorpg or not? He/she will come to some kind of conclusion about his/hers idea
User is offlineProfile CardPM

Go to the top of the page

KYA
post 29 May, 2008 - 02:15 AM
Post #6


#include <nerd.h>

Group Icon
Joined: 14 Sep, 2007
Posts: 4,174



Thanked 48 times

Dream Kudos: 1150
My Contributions


A whole is the sum of its parts. An engine, if broken down is really a bunch of code handling all possible needs of a video game. You need a game loop and each cycle takes care of sound, graphics, etc...
User is online!Profile CardPM

Go to the top of the page

Tom9729
post 29 May, 2008 - 09:44 AM
Post #7


Debian guru

Group Icon
Joined: 30 Dec, 2007
Posts: 1,447



Thanked 10 times

Dream Kudos: 325
My Contributions


If you have to ask, it's beyond your abilities. smile.gif
User is offlineProfile CardPM

Go to the top of the page

mensahero
post 1 Jun, 2008 - 10:08 AM
Post #8


c0mput3rz Are Only Human

Group Icon
Joined: 26 May, 2008
Posts: 664



Thanked 17 times

Dream Kudos: 75
My Contributions


QUOTE(Tom9729 @ 29 May, 2008 - 10:44 AM) *

If you have to ask, it's beyond your abilities. smile.gif


hmm.. nice quote.. made me think a lot.. rolleyes.gif good for sigz..
User is offlineProfile CardPM

Go to the top of the page

Tom9729
post 1 Jun, 2008 - 10:36 AM
Post #9


Debian guru

Group Icon
Joined: 30 Dec, 2007
Posts: 1,447



Thanked 10 times

Dream Kudos: 325
My Contributions


QUOTE(mensahero @ 1 Jun, 2008 - 11:08 AM) *

QUOTE(Tom9729 @ 29 May, 2008 - 10:44 AM) *

If you have to ask, it's beyond your abilities. smile.gif


hmm.. nice quote.. made me think a lot.. rolleyes.gif good for sigz..

It sounds a little snobby I know, but you don't see Gabe Newell asking on internet forums how to write the engine for Half-Life 3 (just a hypothetical example). smile.gif
User is offlineProfile CardPM

Go to the top of the page

Tom9729
post 1 Jun, 2008 - 10:44 AM
Post #10


Debian guru

Group Icon
Joined: 30 Dec, 2007
Posts: 1,447



Thanked 10 times

Dream Kudos: 325
My Contributions


Edit: Oops, usually this forum concatenates two consecutive posts by the same user. Please read this as a continuation of my last post. smile.gif

Something like writing a game engine just starts to make sense once you have (at least) some of the skills necessary. Most of the people asking how to write a MMORPG on this forum have little to no programming experience, and somehow think that just because something is graphical (as opposed to writing something like Checkers for the commandline) it'll be really easy.

The people who are writing games and game engines don't need to ask where to start. Not to say that they won't ever need help (man, Google and C reference books are helpful), but when they do it's usually for very specific problems.

This post has been edited by Tom9729: 1 Jun, 2008 - 10:46 AM
User is offlineProfile CardPM

Go to the top of the page

Rickster0
post 30 Aug, 2008 - 02:37 PM
Post #11


D.I.C Head

Group Icon
Joined: 8 Jul, 2008
Posts: 151



Thanked 9 times

Dream Kudos: 50
My Contributions


first things first

google vbGore this is EXACTLY what you are trying top achieve go on the forums and ask around...

i did it and they where very helpful
User is offlineProfile CardPM

Go to the top of the page

5thWall
post 19 Sep, 2008 - 10:50 PM
Post #12


New D.I.C Head

*
Joined: 17 Sep, 2008
Posts: 32



Thanked 1 times
My Contributions


I don't really know any API's unless you're willing to learn a new, little known, language. However I did take a game programming class last semester and know some of the basics. It sounds like you're at about the same point I was before I took the class.

Anyway the first thing you'll need is, as KYA said, a game loop. A method that get's called 60 or so times a second is good. Then just have that method update the objects in your game as needed. Though if you stop here and just do that you'll become overwhelmed quickly. So the next thing you should implement is...

A state machine. Think about what sort of states and sub-states your game will have. So like your title screen would be one state, the main menu would be another, actual gameplay would be another state (most likely with a handful of sub-states). Have something like an enumeration represent any possible state your game could have and then use a big case switch statement in your game loop to only update the objects needed in each state, including transitioning to another state.

One more thing I'd like to show you to make wrapping your head around everything that makes a game a little easier is the Model, View, Controller architecture. Basically what you want to do is divide the execution of your game into three roles.
  1. The Model, which will hold most of your game objects, and the methods that govern their interactions.
  2. The View, which will render a snapshot of the model at any given time. I recommend giving this it's own loop (draw loop) similar to the game loop I mentioned earlier.
  3. The Controller, which should be the main part of your application. Have it hold both game and draw loops, as well as the current state of the game. All your UI should be dealt with by the controller.
Make each of these an object and only have them deal with their assigned roles.

That should get you started. You'll have to look for tutorials on how to implement each of these in your language of choice, but at least now you know what to start looking for. Once you have your MVC, state machine and loops set up work on one state and role at a time.

Good luck and happy programming. smile.gif
User is offlineProfile CardPM

Go to the top of the page

2 Pages V  1 2 >
Fast ReplyReply to this topicStart new topic
Time is now: 11/21/08 06:34AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month