Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: First game  (Read 8118 times)

0 Members and 2 Guests are viewing this topic.

tkir

  • Newbie
  • *
  • Posts: 6
    • View Profile
First game
« on: January 13, 2016, 03:57:23 pm »
Hi all!
it's my first game. About a month with SFML, about 7 month of studying programming from zero.


Code: https://github.com/tkir/tkir_Game

Now I tring to convert game in isometric map.
I checked collisions, but can't make pathfinder.
Is anybody made something like:
struct entityObject{
        Vector2f point[4];
};

std::vector<Vector2f> pathfinder (entityObject player,
    std::vector<entityObject> obstacles,
    Vector2f targetPosition)
{
        std::vector<Vector2f> path
        /* ... */

        return path;
}

std::vector<Vector2f> path = pathfinder(player, obstaclesVector, targetPos);
 


map contains from the float pixels, player is not a point (it have sizes)

Is somebody solved this pathfinder already?
« Last Edit: January 26, 2016, 09:25:33 am by tkir »

SpeCter

  • Full Member
  • ***
  • Posts: 151
    • View Profile
Re: First game
« Reply #1 on: January 13, 2016, 04:04:10 pm »
Your pathfinder should not be dependend on your visual representation of the map.

Example here:
http://simblob.blogspot.de/2014/07/pathfinding-on-isometric-grids.html

tkir

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: First game
« Reply #2 on: January 25, 2016, 08:20:10 pm »
Hi!
Next step is pathfinder. It work with isometric map. Smoothing is workin too!
[video]https://youtu.be/zS8hRD04FHg[/video] /*how to add video??*/

github: https://github.com/tkir/goldenbyte2016

« Last Edit: January 26, 2016, 07:35:53 am by tkir »

Mortal

  • Sr. Member
  • ****
  • Posts: 284
    • View Profile
Re: First game
« Reply #3 on: January 25, 2016, 09:38:46 pm »
it looks better. i was wondering, are you going to make it as game or just a practice in tile-base games?

btw, to show video  just copy and paste the link from browser search bar without s in http://www.youtube.com/watch?v=#####

tkir

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: First game
« Reply #4 on: January 25, 2016, 10:04:53 pm »
It's my first experience in game coding, & it's best practice in C++.

May be for a month Pathfinder & parser for isometric map will transform into library.
Is it expedient for other SFML users?

Mortal

  • Sr. Member
  • ****
  • Posts: 284
    • View Profile
Re: First game
« Reply #5 on: January 25, 2016, 11:09:34 pm »
i haven't done any tile-based game yet. but you made pretty good, i have learned from it alot  :)
« Last Edit: January 26, 2016, 02:05:31 pm by MORTAL »

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: First game
« Reply #6 on: January 26, 2016, 01:19:30 pm »
May be for a month Pathfinder & parser for isometric map will transform into library.
Is it expedient for other SFML users?

You should read this link: Write Games, not Engines. Don't set out and try to write a generic library that anyone can use, instead focus on making a game with your code.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: First game
« Reply #7 on: January 27, 2016, 01:39:07 am »
At 00:30 in your video, the "enemy" inside the walls in the centre of the map learns how to travel through objects and then, for some reason, prefers to travel backwards.  ;D
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

grok

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • Email
Re: First game
« Reply #8 on: January 27, 2016, 10:13:08 am »
I spot tile glitches from time to time. Am I right or it is due to video recording?

tkir

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: First game
« Reply #9 on: January 29, 2016, 06:12:11 pm »
Yes. It's problem of SFML.

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: First game
« Reply #10 on: January 31, 2016, 11:51:00 pm »
I spot tile glitches from time to time. Am I right or it is due to video recording?
Yes. It's problem of SFML.
This is inaccurate. SFML can reliably draw tiles without glitches if done correctly.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

 

anything