Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Sep 2004
Offline Last Active Aug 28 2016 12:29 PM

#5283872 How much Maths/Physics do I have to know?

Posted by on 28 March 2016 - 11:20 AM

You already know enough. Have a firm grasp of vectors and keep making games.
If you eventually need something more it will be specific to your project, and you can learn it then.

#5266853 Help me understand CYMK

Posted by on 18 December 2015 - 12:21 AM

I have reasearched some of the whole RGB to CYMK conversion. From what I get, basically my colors look different after converting because the printer cannot make all the colors the screen does. Is that correct?


So I have this question:




Image (1) is my original RGB image (ignore bad shrinking), and in a perfect world that is what I want on paper.


I used http://www.rgb2cmyk.org/ to convert (1) and of course I got something very different in the result. So I started manually tweaking (1) and got (2). If I feed (2) to the website, it shows me (3) as preview, which is an acceptable result.


Now, my problem is: when I click the link, and download the .jpg (tried .tiff too, same result), and open in on my desktop (ms paint, gimp, windows viewer) all of them show me (4). Something much more pale that what the web preview showed me as my result....


So my question is: Why? Why is the downloaded file so different from the web preview?


My theory is that it is because the web preview is aplying one of those "profiles" I keep hearing about, so it is showing me how my image "should" look printed... but when I download and open it plain, there is no transformation and that is why that image is so flat and boring. Is that it?

If I just send my download (4) to the printer shop, and they apply their profile, is the image going to come to life in the printed version?


More info: the print shop says they use profile "fogra39" but i dowloaded something and coudln't made it work on that website.


Edit: Solved. Chrome & Firefox modify CMYK images to display them closer to their RGB counterparts. (4) is the actual image. (3) is just chrome's version of it.

#5262257 Cocos2d-x...... :'(

Posted by on 16 November 2015 - 09:19 AM

I enjoyed SDL2

I really like C++ so far

I'm not in a hurry


Good! Then stick with it, you are already having fun and on your path to make games.



my goal in the longer run is to try making games for iOS and android, I thought I should find a tool that would suit those needs.


If you learn C++ and SDL2, Cocos2d-x will be easy when the time comes.


You will be able to adapt to anything they throw at you. So don't worry about your future plans, you will be changing laguages/tools all your life. Learn to program and to make games... the tools will come and go.


Good luck.

#5252363 Isometric game

Posted by on 15 September 2015 - 10:03 AM


My question is I need to draw the tiles to feet well on this prespective? or it's for a normal rectangle change the position and the it look like and isometric view?



For isometric games you draw the tiles in that perspective. (google: isometric tileset)


In the case of kingdom rush I think it is just one full background image, since there is no scrolling maps.

#5236758 Pacman style collision detection Unity 5

Posted by on 25 June 2015 - 10:53 AM

I have a game that works in a similar way to pacman (ie is a tight maze). I have 2 issues.

1: I have a player object which is around 50 pixels square and I have added a boxcollider2d to it that is 60 pixels square. I am trying to move this player down the corridor which is 60 pixels wide but if I press against the wall it seems to get partially stuck and moves as if it is in treacle until it is clear of that particular wall tile. It also seems to get completely blocked occasionally by wall tiles. If I make the boxcollider2d 58 pixels square then my player moves fine even after being pressed up against a wall tile. However this also means there is some sideways movement in the corridor by 2 pixels as the object is no longer exactly the same width as the path.

2. If I am moving say to the right and there is a path leading down, I have to be pixel perfect in my alignment in order to change direction. Pacman never has this issue. Do I need to have a sweet zone where it automatically aligns my character with the path or is there a better way?


Here are a few random suggestions in no particular order:

1.- Turn friction and restitution to zero.

2.- Turn your walls into edges and link them with "vertex0" and "vertex3" (Box2d manual: chapter about "edge shapes" and "chain shapes").

3.- Turn your character collision into a circle, not a square.

4.- Turn your character collision into four, small, revolute-joint circles (north, east, west, south), so he "rolls" along the hallways.


But to be honest... It seems to me that using box2d is giving you more headaches than solutions.

Unless your game really needs them, I suggest you forget about realistic physical collision and just implement your own solution for this game... the way pacman did it.

#5228389 PONG stop the ball from shaking? AI player. Suggestions

Posted by on 11 May 2015 - 11:22 AM

I think this is your problem.

if (moveDistance > ballDistance)
   moveDistance = ballDistance / 2;

Splitting the distance in half is quite arbitrary. How about: moveDistance = Math.Abs(ball.direction.Y)
That way you if you are too close, you match the speed of the ball and you never go over/under.

Hope that helps.

#5216319 String: How to find the most common character occurrence.

Posted by on 13 March 2015 - 01:50 PM


The output for said function would be <'o', 2>, it does not present the last letter to appear, only the last in order of UNICODE.



Is that what you are actually looking for?

If it is, here's what i would do...


Everytime you do:

characterCounts[(int)characterToConvert - INDEX_CONVERTER]++;

check if that newly increased value is the new highest... and if it is, update your values to display.


That way the printed character is the last one on the string and you also get rid of that second loop.

#5212594 How were you learning programming at the age of 5?

Posted by on 23 February 2015 - 07:57 PM

When i was 6, my father taught me Logo:



If i had a kid now, i think i would give Hopscotch a shot:


#5186537 Collision Detection in a GTA-like Game

Posted by on 12 October 2014 - 02:04 PM

Hi mr moon, my suggestion:


First, use bouding circles just to know if the other object is close enough.


Then, if it is, draw your rotated zombie's current frame to a temporal texture (your graphics library should have a way of doing this, that is, drawing to memory instead of screen... or worst case scenario you have to rotate the sprite yourself, google will show you rotating algorithms).


Use that new generated texture to do your standard pixel pixel perfect collision checking.


Hope that helps. Bye.

#5085010 How to avoid depth fighting

Posted by on 11 August 2013 - 02:03 PM

There is a property you can set before drawing a polygon: glPolygonOffset.


Quoting: "glPolygonOffset is useful for rendering hidden-line images, for applying decals to surfaces (this is your case), and for rendering solids with highlighted edges."

What it does it "pulls" or "pushes" the polygon before doing the z test. Thus avoiding the z-fighting.



Good luck.