Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 03 Sep 2008
Offline Last Active Aug 04 2014 01:53 PM

#5079000 How does the programmer merge systems together in the industry

Posted by SillyCow on 19 July 2013 - 01:58 PM

You usually try to keep the merging to a minimum.

You define an API that borders the code you are working on now with others.

This API-border is very well defined.


The API is a set of functions like: Enemy.move(x,y).


One programer will create the function "move" which moves the enemy. The other programer will create the AI function which tells the enemy when to move.


The only thing they have to decide in advance is that enemy has a move function that takes x & y. This is the API.


The AI programer does not care about how the enemy moves (collison detection etc...).

The "move" programer does not care about why the enemy moves ( the AI ).

And the only thing they decided in advance, is that move takes two parameters: x & y


You can define such API borders in advance any time you want to split the job.


So basically there is a well defined border, and usually a lot of discussion goes in to that. The better you are at the design stage, the less you work you will have merging it later. 

#5078257 Jumping - What did I do wrong?

Posted by SillyCow on 16 July 2013 - 03:00 PM

1. This code can't loop by itself. 

2. If your computer freezes, it's more likely that you have corrupted your memory than an endless loop. (Unless you mean that your game freezes).


Since there is not enough code to analyze this, my suggestions are:

1. Use a debugger, and break excution (see where your computer is stuck).

2. If a debugger is unavailable, add some printf's and print the character ID + the character state. You should be able to figure out what's wrong. (Dump it into a log file)

3. Post more code, so someone can figure out your problem.


You should really try suggestions 1 & 2 first, unless you want to wait for someone to figure out the problem.

#5077241 Texture alpha blending?

Posted by SillyCow on 12 July 2013 - 07:08 PM

What are you using to render?

IF it's OpenGL did you gl_enable blending?

#5077180 Free / Open source multiplayer servers

Posted by SillyCow on 12 July 2013 - 01:20 PM

I get the impression you are looking for something higher-level than the solutions being offered to you. Something like Smartfox Server or Photon would serve, but unfortunately they aren't free.


I could use any message queue for messaging, but I was hoping to get some added value besides packeting over TCP/IP. Message queus also tend to lack a security layer, which is a big deal over WAN.


Thanks for the links, I'm a complete newbee in multiplayer, so I was unaware of these.


Regarding Smartfox, 100 concurrent users should be enough at first. I see that smart-fox community edition supports it, but I can't find the license on their site. Do you know if I can use the community edition in a commercial game? Also Photon's 100 users for 10$ might also be fine, since if I use my own I'll probably pay ~10$ for hosting.


Also, what do you guys think of the Google offer I mentioned above? I cringe at the thought of forcing people to use Google+, but it looks very easy, and very robust. Also, I couldn't figure out the pricing.

#5077100 Free / Open source multiplayer servers

Posted by SillyCow on 12 July 2013 - 09:19 AM

I'd like to add multiplayer to one of my android strategy games.


Are there any free MP frameworks you can recommend? The server can be implemented in any language/environment. But the client needs to be Java, as I'm not using NDK. Since this is all hobby work, it needs to be free (or extremely cheap).


My main requirement is real-time messaging (~ 1-2 second delays). I haven't even decided if I want to support WAN. If you have something which is LAN only (one of the clients is the server), that might be enough.


Is there a staple opensource multi-player engine?


Also, while I was pondering the problem, google released this:


Would you recommend using it?

Do you know what the pricing model is?

Have you used it before?

#5074221 Web Developer Instrested In developing Games

Posted by SillyCow on 30 June 2013 - 01:41 PM

What kind of game do you wish to develop?

With your skill-set, there are two types of games you should try to develop:


1. Tic Tac Toe - Website using PHP and cookies.


2. Pong using Javascript and HTML5 Canvas.


If you are going with 2, I suggest you learn how to use JavaScript really well. Doing games requires more knowledge than web-forms.

Here is a very simple link to something almost game-like: http://sixrevisions.com/html/bouncing-a-ball-around-with-html5-and-javascript/


Here is a more complicated link with user input: http://cssdeck.com/labs/ping-pong-game-tutorial-with-html5-canvas-and-sounds


Disclosure, I've never used these specific link, I just searched google for "HTML5 pong" and verified that the explanations seem legit.


The one problem with canvas though, is that it works kinda slow on Androids. So don't expect your first games to be multi-platform. Also, HTML renderers on all mobile platforms are weak relative to native code. But since you allready know HTML, it will be an easy landing for you.

#5073983 Circular buffer usage

Posted by SillyCow on 29 June 2013 - 02:21 PM

Having a circular buffer prevents you from allocating new memory.

It also prevents memory  fragmentation.

Both of these problems will cause performance drops.


Any task that involving queues where performance is an issue will benefit from a circular buffer.


They are also in use in hardware and embedded programming.

Here, memory allocation (new / malloc ) is sometimes not available.

#5059605 What are the steps to creating a game?

Posted by SillyCow on 05 May 2013 - 06:49 PM

Since I am a bad artist, and usually work alone, this is how it goes for me:

  1. Think of a cool idea.
  2. Make a one level ugly prototype. (I sometimes use text instead of actual graphics here)
  3. Play the prototype and see if it's any good.
  4. Improve the gameplay protoype until the game is fun.
  5. Make the game pretty (Add art, menus, etc...)
  6. Send to beta-testers (friends)
  7. Improve controls & Fix bugs based on their input
  8. Publish game.
  9. Improve controls & Fix bugs based on user input

Since I work alone and know how to program, I skip the design document phase.

#5041933 A short question!

Posted by SillyCow on 11 March 2013 - 11:46 AM

Don't use openGL for your first 2D platformer.

Use any 2D framework instead.

#5024033 Version control for begginers

Posted by SillyCow on 21 January 2013 - 03:02 PM

Do not make the mistake of using GIT as your first source control.

I use it at work, it's very powerful, but it takes a long time to understand.

If you have a small project (~5 people) , there is no need for distributed source control. It just complicates everything.


I can make the following recommendations: 

1. Use SVN

2. Use it from a GUI ( you'll understand stuff way faster then command line )


If you're using windows: Download Tortoise SVN and create a local repository.

If you want to upgrade to a server-client setup: Download Visual SVN server,.


Use GIT once you are working on giant project with several remote work - sites (e.g. Compiling a Linux Kernel) .

Using it for a small project is just looking to complicate things. Also, many SVN concepts can serve as an intro to GIT (commit,checkout,branch,merge, diff,patch, etc...) . 

#5022352 How to record Android gameplay?

Posted by SillyCow on 16 January 2013 - 05:26 PM

The stock android emulator will not run at 30 FPS if you are doing heavy rendering.


Look at BlueStacks - http://www.bluestacks.com/ . It's an android emulator that's much faster than the stock android emulator.

It renders OPENGLes very well.

After you install bluestacks, install your APK there, and run it.


Then run your favourite screen capture program,

I recommend Camstudio or Microsoft Expression Blend.


Bluestacks manages to render most of the stuff correctly. I have seen it produce minor glitches though.

#5015916 How come many of you prefer to make games from scratch rather than use an eng...

Posted by SillyCow on 30 December 2012 - 06:53 PM

For me it boils down to two things:

1. Ready made engines are bloated, and my games are small.

2. Curiosity - I like to understand how stuff works. (That's why I started programming in the first-place)

When it comes to things which don't interest me much, like audio synthesis, I use engines without a second thought.

#4994872 Concurrent rendering & game-logic

Posted by SillyCow on 28 October 2012 - 05:43 PM

I have an engine design question:

I would like to run my logic on a different thread then the rendering.
The problem: The logic thread moves the units around, generally changing their state, while the render thread tries to render them.

The most naive approach is to use a bunch of locks on the different entities. But as far as I know locks are performance eaters. Although I know that since hyper-threading that overhead has gone down significantly.

Another option is to copy the state on every render frame before I render it. But that also looks very expensive performance-wise.

I could also lock the renderer while the logic is running, but then what's the point of being multi-threaded?

So I'd like to know:

What is the correct approach to concurrent rendering while running game-logic?

#4976547 Help, teaching 12-13 year olds to code

Posted by SillyCow on 04 September 2012 - 01:39 PM

Maybe I'm stating the obvious but if I was teaching kids my first priority would be to get them to understand the concept of OOP (mainly inheritance).

That is a terriible terrible idea,

I have to second this.
As a kid I got started with BASIC.
The cool thing about basic is that you don't even need functions.

Your average 12 year old does not understand:
1. If statements
2. Functions
3. Loops
4. Variable Typing
4a. Variable declaration
5. Splitting code into different modules etc...

BASIC did not require any of these concepts to generate a cool result.
As a kid, easy success is a great motivator.

Since basic does not really exist anymore (Visual basic is more like C# / Java),
I am thinking one might think of toying around with java-script as a first language.
It does not require any of the above (you can even use undeclared variables in global scope).
It might actually be useful for the kids later.

Little by little you can add the more complicated concepts listed above.

The downside is And there are no easy input functions such as getch() or scanf(), and the javascript canvas is as complicated as any GDI library.

But I don't know any language with a graphics library as simple as basic:
DRAW "r5 d5 l5 u5"

Regarding OOP specifically:
It is not a "Holy" concept.
As someone who learnt to program before good C++ compilers were available for home development, you can do a-lot without OOP,
Teaching it as the only way of programming is major mistake universities make today.
It causes programmers to believe that over-designing is a goal in itself.

#4974891 World scale RTS

Posted by SillyCow on 30 August 2012 - 01:45 PM

Of course there are many challenging aspects. But one could have creative solutions.
Balance as an example: why have balance? Conquer the world as the US for the easiest mission (level one). Enforce world peace by ruling from Afghanistan as the hardest mission.

Regarding the fps part. I like the idea, but I don't think I can do it. Fps games are so different from RTS games, that I would need three different engines.

I checked out superpowers. Graphically and ux wise it looks very similar to what I want to achieve. But gameplay wise it looks completely different.