Jump to content

  • Log In with Google      Sign In   
  • Create Account


WunderStrudel

Member Since 16 Jun 2013
Offline Last Active Jun 29 2014 10:04 PM
-----

Posts I've Made

In Topic: Unity 2D tiled maps

26 June 2014 - 11:28 PM

Making a tile engine in 2D is very easy, especially  using unity. (: 
Basicly you only need 3 main functions. 

generateTileMap() {

    This Function is gonna "generate" the values, to fill into a 2D array (public int[][] foo = .....). so basicly the information you need for the different block types.

 

}

 

buildTileMap () {

    in here you are gonna go through your 2d array "foo" and place a different texture, decided by the value at it's cords in the 2d array. 

 

}

 

generateCollision() {

    This is basicly where you make the collisions, also decided by the value value at it's cords in the 2d array. for example. 

    

    for (int x = 0; x < blocksX.length(); x++) {

         for ( int y = 0; y < blocksY.length(); y++) {

               

               if (Block[x][y] == 1 ) { // Dirst Maybe

                   Collider();

               } else if (Block[x][y] == 2) { // Water maybe

                  then execute whatever you want to happen when in the water. 

 

               }

         }

    }

   

}

 

And just so it is said!! d: 
The code above is NOT! working code. it is only for example purpose, i'm not really sure if it is half java and half c++, havent really written in c in a while. So dont copy paste any of the code, it surely wont work. (: 

Hope you make it work, if not i think i have an old project laying around, where i build a 2D tile engine you could take a look at. you can just pm me. 
Sincerly WunderStrudel.


In Topic: C++ / opengl/glut - Text rendering

03 October 2013 - 08:02 PM

Ohhhh (: 

Actualy started out using "string", but then it didn't work with displaying the variables, so i though that maybe they had to be "char" becos those you loop through, if that makes any sense :D 


In Topic: C++ / opengl/glut - Text rendering

03 October 2013 - 03:47 PM

Thank you for anwsering, although i'm not sure really sure which approach to take from here. 

Just cant figur out how to cheat it into displaying that freakin variable d; 

 

Btw. sry for my bad english, i'm kinda sleep "depribed"? idk, have been lookin at this freakin code in like 18 - 24 hours now d:   


In Topic: C++ 2D Isometric map problem

29 July 2013 - 09:24 AM

This gamedev tuts+ article is a really nice introduction to isometric perspective in video games: http://gamedev.tutsplus.com/tutorials/implementation/creating-isometric-worlds-a-primer-for-game-developers/ Not C++ specifically, but the underlying theory remains pretty much constant for whatever language you choose to work in.

If it's specifically the coordinate conversion formulas you're having trouble with, check this article out: http://clintbellanger.net/articles/isometric_math/ It was written by Clint Bellanger, the lead developer of the FLARE (Free/Libre Role-Playing Engine) project, and it's unquestionably one of the best resources I've ever found on the subject. It helped me immensely when I was trying to figure out isometric math. smile.png

Thanks you very much, those are some awesome links!!! 


In Topic: C++ 2D Isometric map problem

27 July 2013 - 05:07 PM

I believe you should use sprites of the same size, also you must keep a ratio difference from x to y.

This link cover is all (It wasn't me who wrote it):

http://www.gameproducer.net/2011/09/18/illustrated-newbies-guide-to-isometric-game-development/

 

Good luck.

 

Ohh thanks man (: 
I'll try with this one, and see if i can make it work d; 


PARTNERS