i'm a newbie with cocos2dx, i'm trying to create a game using tilemaps with cocos2dx and tiled (.tmx), I don't know what if it's the good way to go, but I want to create an endless map, a game when you can run and run for ever if you want.
I was trying to use two tilemaps and repeat one next to each other without success (i'm still very limited in knowledge of cocos2dx :) ).
Did you recommend me this approach? if no, what do you recommend me?, if yes how can i put two tilemaps one next to each other?
You should follow this official tutorial to learn how to create good endless title map: http://www.cocos2d-x.org/docs/tutorial/parkour-game-with-javascript/chapter7/en
Even this is a tutorial for javascript but the class used is the same. Hope it help.
Related
After a few years with cocos2d, i have to say the truth ,i am seek of putting CCMenus in code, order them, create CCScenes to every page with coding, especially when i see the simple way its done with Apple's storyboards .
I know that the cocos2d interface builder project was shut down(they say so in the site) , so i wonder what are my ways , to work with cocos2d to order scene/buttons and storyboards ,but not do it all by coding (coding the coordinates,buttons,pages,scrollers,etc) .
Is there an option for me that i haven't heard about ??
(i use the cocos2d v2.0)
Thanks.
Have a look at SpriteBuilder (an amazing open source project forked off CocosBuilder).
I am immediately placing this as a community wiki thing. I don't want to ask for help in programming yet or have even a specific question about programming, but rather the process and the resources needed to make such a game.
To put it simply: My college friend and I decided to give ourselves a really big challenge to further our skills in programming. In six months time we want to show ourselves a Pac-Man game. Pac-Man will be AI-controlled like the Ghosts and whichever Pac-Man lives the longest after a set of tries wins.
This isn't like anything we've done so far. The goal here, for me, isn't to create a perfect game, but to try and complete it, learn a whole bunch in the process. Even if I don't finish in the time, which is a good possibility, I would want to have at least tried this.
So my question is this: How should I start preparing myself? I already have started vector math, matrices, all that fun stuff. My desired platform would be DirectX 9.0c; is that advisable? Keep in mind that this is not a preference just for this project, but I wish to have some kind of future in graphics development, so I want to pick a platform that is future-safe.
As for the game development in general, what should I take into consideration? I have never done a real game before, so any and all advise to development of mid-scale projects( if this would be a mid-scale project ) is greatly appreciated.
My main concerns are the pit-falls and demotivators.
Sorry if the question is so vague. If it doesn't belong here, then I will remove it. Otherwise, any and all advise regarding making larger projects is greatly appreciated.
Given you've not tried this sort of thing before here's a few things I'd recommend.
Start with something other than DirectX (and presumably C++)
DirectX and C++ expose you to a lot of low-level stuff you can learn later. Keep things simple and perhaps try XNA and C# which is close enough you can port it later but will let you skip a lot of things like memory management and pointers for now.
Start with 2D instead of 3D
The original Pacman is 2D so you won't be needed vector math for now.
So where does that leave you?
Well, a few things to think about are the game loop, keeping things in sync, updating the screen and responding to user input.
These are great principles and will let you get something up and running a lot sooner. Do not underestimate how important it is to keep seeing progress - this is hard if you set the technical bar too high initially.
I'd go down this route (ordered to keep things fun and interesting)
Get a screen displaying - this is highly visual
Get a Pacman responding to user input
Get Pacman constrained to within the walls
Get a ghost responding to secondary user input - you can chase each other
Figure out some collision detection
Get the dots and power pills rendering so you can score and eat ghost
Render some more ghosts and figure out AI
Work out the code for finding when the level is complete
Make the map change and state reset when on a new level
Once you've got this working and running you can then decide if you want to play with better AI, 3D math or switch over to C++.
I had to write a pacman game in Java for an OO class. I found it to be very straightforward, possibly with the exception of figuring out the best way to map walls. After a bit of research, I came across this: http://javaboutique.internet.com/PacMan/source.html which uses bit-shifting to determine walls. It looks like complexity overkill, but I found it to be pretty elegant after I played around with the math a little. Other than that, pacman is a very array-friendly concept, so use an array for the board, some basic sprites, tinker with the speed and refresh, keep track of game data, and toss it in a loop.
As for the AI with the ghosts, there are articles written about them. Each ghost has a specific "strategy". Or you could roll your own..you could program them to be as easy as always heading towards pacman (or his general location/quadrant), or as complex (shortest-path) as you'd like.
Play pacman! This is the first task for your project!
I'd look at the original arcade cabinet assembly code for Pacman and the description of what it does. It's a real eye opener :)
Personally, here's what I would do:
study open source games to see what they do
buy a book about game programming (actually, I have a book about game programming already, but you probably want something more recent than that)
pick a toolset/game development library (Sourceforge, Google Code)
work through the tutorials that come with that library, possibly change to a different library if the API is too weird
come up with a requirements document
draw up a first pass design ("plan to throw one away"), try to have somebody review it
decide on a test plan
write up a schedule, not because I want to stay on schedule but because I want to break things down into easily-defined tasks
write the smallest complete game I could (eg., a Pac Man sprite that I can control inside a window: no maze, ghosts, score, lives, ability to die, etc.)
add features to that game until I've implemented the whole thing
Sounds like a good idea for a learning project! The 2 general things I recommend for your approach are
work in iterations
read a bunch about C++ and DirectX along the way
Start small -- write some code that does nothing more than draw Pac-Man on the screen. Then build on that by implementing movement across the screen. Then build the map boundaries and the inability to travel through them. And continue in this fashion, prioritizing the next task you need to complete, and then doing whatever it takes to complete it. Try not to make the tasks too big.
In order to figure out how to complete the tasks, you'll need to read. Books, web sites and existing code are all very helpful in figuring out how to do what you want. It's worth looking at several different ways to complete the same task, because some ways are better than other, or might better fit your project.
Good stuff! I am glad that Pacman motivates and inspires you.
Things to get started.
1) Decide on the development environment.
a) Are you building a standalone game or a networked game.
b) Which language are you targetting at to improve?
2) How well versed with AI?
3) How well versed with the programming algorithms techniques - like A * (A star) path finding, Dijkstra algorith, collision detection, hit testing or even recursive programming?
4) Are any of you talented in graphical design?
Good luck.
P/S FYI, if I were to write a Pacman game, I would do it in C# and Silverlight 4.0 (I can write C++ comfortably but my priority is to jump on the Silverlight bandwagon).
I decided that I want to make a game for the iphone I was thinking of using oolong or sio2 any recommendations?
Both have the problem of lack of tutorials, is it possible to somehow use a normal C++ game tutorial and integreate the engines rather than the one used in the tutorials? So if the C++ tutorial talks of creating an engine I can skip it and use sio2 or oolong?
Thanks
You're making a game, not a game engine. The short answer is, yes, you can just use those engines to make the game.
The long answer is that you should probably go through the tutorials doing it the way that they do it just to get a feeling for C++/OpenGL/whatever. Then, using the knowledge that you have gained, make your own game using oolong or SIO. Trust me, you are not going to want to use the code you wrote when you were learning C++ to make an actual game, unless you can read something and immediately master it.
Look into Unity. Not C++ for the scripting, but it's a very popular engine.
How about cocos2d? It's BSD license, has docs and tutorials, and I've seen many people use it to create a game in a day.
okay i'm making a game using c++ (for the engine) and openGL, now i've had lots of trouble using cal3d library for importing my 3d max models into my c++ project,
as a matter of fact i dunno where to even start, i can't find any decent guide and their documentation is pure shit really. i've been searching and trying stuff in this for over a month, but i don't even understand the file structure it uses so far :S
i really need some help, r there any other libraries? any decent guide i can use? i'm stuck
thnx alot
Rather than write your own exporter, consider using one of the built-in exporters for FBX, COLLADA, Crosswalk (.XSI), the Quake/Doom3 .MD3/.MD4 format, or even OBJ. It'll be much easier to parse the resulting file format on your end than to write and maintain a brand-new exporter.
Max is a complete pain for any kind of scripting or plugin. I'd suggest using maya instead if at all possible. You'll get better results for animation and rigging, too. I know it's not a direct answer to your question but part of the problem is the info for stuff like this is not easy to come by.
Hi I am working in VC++ and I am quite interested in game programming and I have few queries.
1).What one must know before starting game programming ?
2).Can anybody give me info # resources like tutorial ,links ,etc. which would help me to start as fast as possible ?
3).Also give me info # some good books on game programming ?
Any help would be greatly appreciated.
Before you start programming you must have a good understanding of the language, how to program and how to structure and test your code. Oh, and a huge amount of either patience or free time. On the maths front, Vectors, Matrices and Quaternions are the main things I found I needed.
The other thing that often goes overlooked when I programmer starts writing a game is someone to create the assets. Preferably someone specialized in it.
You mention DirectX, which is not actually a fast way to go as you have to build everything from square one, which means a lot more maths, performance testing and overall handwork. I would suggest at least a rendering engine like Ogre3D. There are plenty of tutorials and a very good community.
There is a good post here on why you should write games not engines.
The main reason you would want to use DirectX is to enhance your understanding of the lower levels, all the things an engine is abstracting for you. While I think this is a good thing to do, I wouldn't want to do it for a major or first project.
The main site I used for help was gamedev.net, although I also found some intresting articles on gamesutra
It takes time and requires a lot of patience. And playable game is more than just working C++ code.
gamedev.net.
First, download Visual C# Express Edition, and then download XNA Game Studio 3.1.
After that, check out the XNA Creators Club - that has lots of help to get you up and running quickly.
Are you 100% dedicated to C++? If not, I would recommend starting with XNA/C# instead. DirectX will force you to spend a lot of time up front learning API calls before you ever get something on the screen. XNA will allow you to start coding your game very quickly while getting immediate feedback while you program.
If you are committed to C++, I would recommend Beginning Game Programming by Jonathan Harbour. He starts with an easy to understand framework that won't take long to pick up. Remember that to use DirectX you will have to learn win32, and low level DirectX code.
For tutorials, try googling "c++ beginning game programming tutorial". Gamedev.net will be another invaluable resource. Go to the "For Beginners" forum and look through the stickies.
As for what you must know, it depends on your aspirations and your choice of tools. As a beginner, you will want to start small and in 2D or text games. To get a Pong game going in XNA, you only need to have basic C# skills and basic collision detection. To get a Pong game going in DirectX, you will need to understand win32 code, and a ton of device calls. To do a console text game, you only need to know basic C++ and maybe some basic gameflow techniques.
If using DirectX is not a fixed requirement, you should consider OpenGL, and use a library like SFML or Allegro to handle all the basic stuff.
http://www.talula.demon.co.uk/allegro/
http://www.sfml-dev.org/