Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Tile-based games

HitakiHitaki Posts: 13Member
Has anyone made tile-based games in here, if anyone has
please read this.

Currently I'm working on sort of game and it's gonna
be tile-based. I just wondered that are the tiles
somehow rotated in games like jagged alliance 2 etc?
I'm using now just normal squares, so if anyone knows
what's the idea behind making them like this:

/
/
/
/

What about hexes? IMO you lose a lot of processing time
using hex-tiles.
----------
|e/ e|
|/ |
| /|
|e /e|
----------

Those e's stand for empty space. So you need bigger
sprite than the actual tile really is. What's the point in
this? Walkability?

I just wondered this because when my engine draws the game
scenery it has to process 2 to 3 layers of sprites and they're
in 16bit mode... Even if I make the engine to draw only
the visible tiles there's gonna be a lot of drawing.
How much fps you'd think fallout-games have on celeron 333?

Sorry 'bout the language. I haven't had much opportunities
to use it so it's a bit rusty...

Thanks.
-Hitaki


Comments

  • AriseArise Posts: 42Member
    U should have now problem using sprites in your game( even on multiple layers )on an ancient pentium 1 .
    Game speed depends on compilers a lot.
    If u make your game for windows directdraw should work fine implementing your game engine .
    celeron 333 it's enough for starting programing.
    If u want 3d graphics then a 3d accel is required.
    About hex tiles : i used them before but they gave me lots of problems .
    [code]
    __ __ __
    /a1__/c1__/e1
    __/b1__/d1__/
    /a2__/c2__/e2
    __/b2__/d2__/
    /a3__/c3__/e3
    __/b3__/d3__/
    /a4__/c4__/e4
    __/ __/ __/

    [/code]
    if u wish to move your character from a1 to a4 there should be no problems (there are no problems in vertical movement) , but if u try to move from a2 to e2 your movement might seem a litle bit stupid (zig zag move).U have 2 aproach :
    a2,b1,c2,d1,e2
    a2,b2,c2,d2,e2
    if you make a game in wich the main character is always drunk ;-)
    also if your game will be a panzer general game style u could try the hex aproach

    if you make a game in wich the main character is always drunk ... ;-)

    P.S. >

    also check this page (basic info about tile games and hexagons):
    http://www-cs-students.stanford.edu/~amitp/gameprog.html



  • HitakiHitaki Posts: 13Member
    : U should have now problem using sprites in your game( even on multiple layers )on an ancient pentium 1 .

    How's that? Fallout 1 was tilebased and worked fine on my older P75? But then again
    it was 256 color right?

    : Game speed depends on compilers a lot.

    Hmm. I wonder what's wrong in my code because if I turn optimization switches on the
    game usually doesn't work. I use gcc + linux. If I recall right debugger says that
    my asm function causes the problem... Maybe I should send the asmcode here
    for laughs.

    : If u make your game for windows directdraw should work fine implementing your game engine .

    I hate win. It sucks way too much. Besides I want to know when my code is buggy and with win
    I can never know when the os causes the odd behaviour. And another thing. If I'd start using
    win I should buy a compiler...

    -Hitaki

  • AriseArise Posts: 42Member
    Games programming and linux ? i have some strange feelings about.
    Windows is the best platform for writing games. That's my opinion and i hate when someone tells me that linux is the best .
    I know that linux is a great OS (i use it) but for me win rulz in games development .
    As far as i know fallout1 have implementations for dos and win .
    I don't remember if fallout worked in linux.

    ::: I want to know when my code is buggy and with win I can never know when the os causes the odd behaviour.

    Your code is buggy ? :-)
    Then why don't u take a break ? why don't u learn again c++ ?
    few weeks ago i read an article about errors : 99.7 % stupid code written by programers and only 0.3 % systems errors.

    :::And another thing. If I'd start using : win I should buy a compiler...
    djgpp - is free and is multiplatform including windows.
    As far as i know Borland offers his compiler ver5.5 for free.
    Some friens tell me about a combination between VIDE + Borland compiler . They say that this is a killer combination. :-)
    I tried VIDE + BCC and for me seems ok.
    Also i heard something about Watcom C/C++ . ( it is realy free ? does it work under windows ?)
    About buying a compiler : who said that u must buy a compiler ?
    but this is already another story ...

    ::: Hmm. I wonder what's wrong in my code because if I turn optimization switches on the game usually doesn't work. I use gcc + linux .

    Just read the documentations included in gcc package . Also use gcc switches with care . (start with few optimizations first and if your game run fine , add more )
    Once i compiled my buggy code (under gcc) with egcs and it worked just fine.

    ::: my asm function causes the problem...
    What kind of a programmer are u ? (in my whole experience i discovered that asm mixed with optimizations always fail :)))))) ) . Anyway i never found some good books , papers or documents about asm in linux.



  • gautamgautam Posts: 642Member
    Well its tough to find ASM code explanation in linux ? There are some very good books for that. Prentic Hall publications has one good book

    Hmm Game programming in Linux - Its not as easy as it is in windows. A lot more frustrating though.




    : Games programming and linux ? i have some strange feelings about.
    : Windows is the best platform for writing games. That's my opinion and i hate when someone tells me that linux is the best .
    : I know that linux is a great OS (i use it) but for me win rulz in games development .
    : As far as i know fallout1 have implementations for dos and win .
    : I don't remember if fallout worked in linux.
    :
    : ::: I want to know when my code is buggy and with win I can never know when the os causes the odd behaviour.
    :
    : Your code is buggy ? :-)
    : Then why don't u take a break ? why don't u learn again c++ ?
    : few weeks ago i read an article about errors : 99.7 % stupid code written by programers and only 0.3 % systems errors.
    :
    : :::And another thing. If I'd start using : win I should buy a compiler...
    : djgpp - is free and is multiplatform including windows.
    : As far as i know Borland offers his compiler ver5.5 for free.
    : Some friens tell me about a combination between VIDE + Borland compiler . They say that this is a killer combination. :-)
    : I tried VIDE + BCC and for me seems ok.
    : Also i heard something about Watcom C/C++ . ( it is realy free ? does it work under windows ?)
    : About buying a compiler : who said that u must buy a compiler ?
    : but this is already another story ...
    :
    : ::: Hmm. I wonder what's wrong in my code because if I turn optimization switches on the game usually doesn't work. I use gcc + linux .
    :
    : Just read the documentations included in gcc package . Also use gcc switches with care . (start with few optimizations first and if your game run fine , add more )
    : Once i compiled my buggy code (under gcc) with egcs and it worked just fine.
    :
    : ::: my asm function causes the problem...
    : What kind of a programmer are u ? (in my whole experience i discovered that asm mixed with optimizations always fail :)))))) ) . Anyway i never found some good books , papers or documents about asm in linux.
    :
    :
    :


  • HitakiHitaki Posts: 13Member
    : Games programming and linux ? i have some strange feelings about.
    : Windows is the best platform for writing games. That's my opinion and i hate when someone tells me that linux is the best .
    : I know that linux is a great OS (i use it) but for me win rulz in games development .

    I know about how great DirectX api is but hey it's a free world... Besides I'm not willing
    to have several OS:es if I could only have one, like linux or Beos or Solaris or something.

    : As far as i know fallout1 have implementations for dos and win .
    : I don't remember if fallout worked in linux.
    So what? Does that prevent writing games for linux?

    : Your code is buggy ? :-)
    Of course it is! I'm a beginner damnit!

    : Then why don't u take a break ? why don't u learn again c++ ?
    Because I'm not interested of writing programs that don't do anything useful. Like some
    programming exercises. And in my life I have never seen a book that talks about how to
    write code "in the right way".

    : few weeks ago i read an article about errors : 99.7 % stupid code written by programers and
    : only 0.3 % systems errors.

    That's why I'll never release anything so fear not. I'm just doing it for fun.

    :And another thing. If I'd start using : win I should buy a compiler...
    : djgpp - is free and is multiplatform including windows.
    : As far as i know Borland offers his compiler ver5.5 for free.
    : Some friens tell me about a combination between VIDE + Borland compiler . They say that this is a killer combination. :-)
    : I tried VIDE + BCC and for me seems ok.

    Lessee. Compiler + directx development stuff takes more that 100Megs. I'm not interested of
    packing that on disks since I don't have net-access in my apartment.

    : Also i heard something about Watcom C/C++ . ( it is realy free ? does it work under windows ?)
    IMHO watcom c/c++ version > 10 costs about $200?

    :: my asm function causes the problem...
    : What kind of a programmer are u ? (in my whole experience i discovered that asm mixed with optimizations always fail :)))))) ) . Anyway i never found some good books , papers or documents about asm in linux.
    Like said, I'm a beginner. Are you expecting that everyone are so almighty and great like you?
    I think that you are one of those "I'm super-elite and others are nothing" type of guys. It's great
    that you handle everything but don't expect everyone to be on yer level.

    I just don't understand the whole coding scene. It's like I should be shouting "I'M NOT GOOD,
    I'M BEGINNER, KILL ME NOW! " the whole time when trying to learn programming.

    ....And now I'm off to wait e-mail bomb or at least a load of flames. Thanks. =)
    -Hitaki



  • AriseArise Posts: 42Member
    Your code is buggy ? :-)
    Of course it is! I'm a beginner damnit!

    Let me see... you know asm but u are a beginner in c++? How's that ?


    Then why don't u take a break ? why don't u learn again c++ ?
    Because I'm not interested of writing programs that don't do anything useful. Like some programming exercises.

    I agreed that .
    I don't like to make exercises programs , they are just so boring ,but i must admit that exercices are one of the best method for learning.



    And in my life I have never seen a book that talks about how :: to write code "in the right way".

    GNU relese some papers about c++ programming style , programming advices . Writing code in right way : All books have code written in right way !



    Lessee. Compiler + directx development stuff takes more that 100Megs. I'm not interested of packing that on disks since I don't have net-access in my apartment.

    I don't think that linux compilers are smaller than win compiler.
    (at least not all)
    And u don't need the whole DirectXSDK package . Only inc and lib files . Also u could use openGL.




    so u are a beginner and u learn c++ and asm (under linux !!!!)

    Im very confused ....
    u learn c++ . And u know asm very good or u are learning ?
    i thought that in those days someone makes his first steps in programming with c++ or pascal.
    I also know people who know asm very well but don't have a clue in c++ or others languages .( they are working with integrating pheripherals )

    maybe i'm to old to understand such things :)))

    P.S. I never said that i'm the elite . I'm far away :)))))

  • HitakiHitaki Posts: 13Member
    : Let me see... you know asm but u are a beginner in c++? How's that ?

    Nopers, I'm a beginner with everything in programming. Well maybe I could call myself
    little experienced but nothing worth calling myself a coder. IMHO the rule goes as with hackers:
    "You're not a coder until someone calls you that". The original sentence was something like
    "You're not a hacker until someone calls you that"

    : And in my life I have never seen a book that talks about how :: to write code "in the right way".
    :
    : GNU relese some papers about c++ programming style , programming advices .
    : Writing code in right way : All books have code written in right way !

    Well then there's difference between us. I call program buggy until it'd be worth selling or even
    publishing. And again IMHO if program works "kinda" it isn't written in the right way. The books
    that I've read have been about language syntax, there's never been anything "how to write
    algorhitms in the right way" like I said previously.

    : I don't think that linux compilers are smaller than win compiler.
    : (at least not all)

    Perhaps not but when you get a linux-distribution you have it all there. compiler, headers, libraries,
    debugger, etc.

    : And u don't need the whole DirectXSDK package . Only inc and lib files . Also u could use openGL.

    Maybe. But I want to learn graphics and programming right from the basics, like how do you blit,
    use transparency, doublebuffer, use high/true color modes etc. That I've understood so far.
    Because I'm stupid I need to learn everything from the bottom in order to understand it
    completely.

    : so u are a beginner and u learn c++ and asm (under linux !!!!)
    What's with linux? It's better for beginners because it doesn't allow invalid memory handling.
    I mean when I was using dos or win I repeatedly made them freeze because I was learning
    pointers. So finally I fed up with that and started using linux. Languages are still the same
    so why not?

    : Im very confused ....
    : u learn c++ . And u know asm very good or u are learning ?

    Only learning. Sofar I haven't made anything worth mentioning, but I do understand the memoryhandling
    idea and bit-masking so when I have time I have to start writing function that draws sprite on some
    buffer, with transparent areas. If I can understand the idea of true transparency of pixels algorhitm
    (30% background, 70% foreground) maybe I'll write function for that too. =)

    : i thought that in those days someone makes his first steps in programming with c++ or pascal.

    Well I have written with pascal, delphi, c and c++ but I've never done anything worth publishing
    so I'm a beginner. Calling ppl that can do something like '"what's yer name" and print it ' beginners
    is too good for them. Anyone can do that, beginner is someone who is interested in coding
    but doesn't know much yet. Coding field is just so huge.

    : maybe i'm to old to understand such things :)))
    Or then our views just differ too much in order to understand each other.

    Arigato or how it should be, anyway thanks.
    -Hitaki




Sign In or Register to comment.