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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - GameBear

Pages: [1] 2 3 ... 5
1
SFML projects / Re: Sideview tactical rpg - first mockup
« on: May 31, 2017, 06:55:11 am »
Right now it is a simulation, mainly because I try and train the agent ai to navigate correctly.

But the game mode will be real-time, you will control one aentral figure, through him effect others.
but you will need to be able to see all units, including hidden ones on "your team" and any spotted.

Also, thanks :)

2
SFML projects / Re: Sideview tactical rpg - first mockup
« on: May 30, 2017, 11:06:02 pm »
How my map generator forms out side view maps.. I'm pretty happy with the result...



It generates maps top down, sometimes making loops, side tunnels, shafts and big open rooms, all maps generates makes sure that there is always a way to avoid falls of more than 6 tiles.
Agents can use a rope to crawl down 5 tiles, and he can jump 2 tiles to hang on to ropes. I'll have to figure out if i should add "swing" to the ropes or if that would be to complicated for the ai.
Right now Ai is okay at moving around, but bad at finding their way, i'm considering giving them a* or another path finding, another option would be to give them memory of where they have been.

but each time i add a new feature i also have to retrain the ai's

3
Graphics / Re: Tile Map
« on: May 30, 2017, 04:35:24 pm »
Change STileGrass.setPosition(i * 70, j * 70);
To STileGrass.setPosition(i * 70, j * 70);

The setPosition() takes two operators,
X position and Y position. Like this:
setPosition(X,Y);
If X is j then j is horizontal
If Y is i then i is vertical.

Still, what is your language, I'd love to point you to some tutorials....

4
Graphics / Re: Tile Map
« on: May 30, 2017, 12:52:46 am »
To draw in another place you can either set the view:
https://www.sfml-dev.org/tutorials/2.4/graphics-view.php
sf::View view(sf::FloatRect(0, -530, 600, 600));
window.setView(view);

 

Or draw with an offset:

//Wherever you declare variables//
Int xOffset = 0;
Int yOffset = 530;

//Render part.
 STileGrass.setPosition((i * 70)+xOffset ,( j * 70)+yOffset );
 window.draw(STileGrass);
 
If I understand correctly...

Out of curiosity, what is your native language?
Best regards :)

5
Graphics / Re: Tile Map
« on: May 29, 2017, 09:03:00 pm »
for(int j = 0; j<5;i++)

The last i should be a j in this one :)

6
Graphics / Re: Tile Map
« on: May 29, 2017, 04:21:36 pm »
There are multiple ways to do this, but the easy way is with a 2d array for the map info, and a "print" function for drawing.
Posido code:

//Array
int mapArray[4][5] =
    {
        {0,0,0,0,0},
        {0,1,1,1,0},
        {1,2,2,2,1},
        {2,2,2,2,2},
    };
//Some sprites
SF::sprite airSp....
SF::sprite grassSp....
SF::sprite dirtSp....

//Let's say all sprites are 8 by 8 pixels
Int spriteSize = 8;

//Render it
Window.beginDraw();
for(int i = 0; i < 4; i++){
for(int j = 0; j < 5; j++){
If(mapArray[i][j] == 0) {
  airSp.setPosition(i*spriteSize,j*SpriteSize);
  Window.draw(airSp);
}
Else If(mapArray[i][j] == 1) {
  grassSp.setPosition(i*spriteSize,j*SpriteSize);
  Window.draw(grassSp);
}

Else If(mapArray[i][j] == 2) {
  dirtSp.setPosition(i*spriteSize,j*SpriteSize);
  Window.draw(dirtSp);
}

}
}
Window.display();
 


Please note, this is posido code, not actual code.
Also, wrote iron my phone, so errors are most likely.... But the algorithm should be sound.

7
SFML projects / Sideview tactical rpg - first mockup
« on: May 29, 2017, 01:55:09 pm »
So, I'm currently working on procedural generated areas and some simple artificial neural network mixed with state machine for ia.
After a lot of iterations it hit me how usable this thing was for a game. So I started making some mockup art while away from my programming computer.

This is not much, but more will come :)

One challenge ahead of me will be rendering the outline of partially hidden objects and units... Anyone have a suggestion on that?

Best regards :)


8
SFML game jam / Re: Making a Jam on Itch io with prices
« on: May 28, 2017, 11:01:51 am »
How long would the jam last? Don't think I'd be able to do an intense 48-hour one again. hehe
Not sure about that yet, but I'm leaning towards two models:
A semi long jam (14+ days or more)
A month open for jam, but 7 days to work on it.

To allow for more sign ups, and time for beginners to seek any knowledge they may need....

Previous rules for the SFML jam was that others should be able to compile it. That is, you can use any library as long as it's fully public. Seems fair and reduces "huge advantages" ;D
Not sure about any library, but yes, it must be free libraries, so no paid content.

Just also wanted to mention that the English word that I think you are actually looking for is "prize". ;)
Doh, forgot that... :) thanks...

9
SFML game jam / Re: Making a Jam on Itch io with prices
« on: May 27, 2017, 01:32:19 pm »
Its great to see some interest :)

-shipping the book: I'd be using Amazon or PacktHub, limiting the price to no more than 7 dollars for the most expensive location (standard delivery) so that is not a thing i'm concerned about :

-Assets: I'm still most inclined to allow people to use Assets, (Art and code) allowing people to use free art and music, but requiring them to mention it. (Same with code)

-How basic: I'll let that be a personal judging, as long as it is not core game mechanics copied (So if your game is two balls bouncing who's only interaction is colliding with the wall and each other, pre-made collision functions would be a no go)
but basic functions (such as distance calculation, sorting arrays, input handeling ect.) would be fine, as long as the entry contains a disclaimer that states as much)

-books, I Know these would be less worth for more advanced users, my hope was it to lure beginners to give it a try, maybe have a "Beginner" tag and an "Veteran" tag, putting a t-shirt/mug/cap or some such in the price pile fore the veterans would be okay, but i would have to check with the SFML team if that would be okay with them....
I know anyone could say beginner/veteran, Id be hoping for a honor system here, motivated by the fact that the book would be more worth for actual beginners, and the shirt/mug/cap would be funnier/more of a trophy for a veteran.

-A Point multiplayer/bonus or some such for homemade/freshly-made assets may be a good suggestion, allowing all to compete regardless of artistic proves but giving a bonus to those who make their own (again regardless of the artistic proves...)

-About not being interested in prizes, I'd be okay with someone donating their book to a school or friend or such :)

-About when... not sure yet, but August/September should be doable and give enough time for interested people to sign up :)


Thanks for the input guys :)

10
Graphics / Re: Rotate a Sprite centered
« on: May 25, 2017, 03:30:47 pm »

11
Graphics / Re: Checking 2 shapes Position
« on: May 25, 2017, 10:21:52 am »
That depends.
Right now, you check if they are in the absolute same location.
That is, if their coordinates are the same. This will rarely happen outside of grid based programs.
Other options could be:

Check if distance is less than their combined radius.
(useing pythagarus to get the distance, also, since your circles are triangles, it may give some collision where there is none)

A bounding box collision test.
(easy to implement, not so precise unless you only use squares)

Line intersection test.
(a bit harder to implement but perfect for geometric shapes as it can allow you to find any intersection perfectly)

Lastly pixel perfect collision.
(this is a trade off. It's easy enough to implement by following a tutorial, and it will give perfect results with any bitmap images, but it consumes a lot more power than most want for moat applications. Use this only of needed)

I guess there are more out there, but if you learn these and what you want to use, you are a good part of the way,and it will teach you a lot.

A bonus info, I suggest that in this code:
///// ENEMY MOVE /////
      if(Triangle.getPosition().x == 0){
         dx = 0.5;
      }else if(Triangle.getPosition().x == 768){
         dx = -0.5;
      }
      if(Triangle.getPosition().y == 0){
         dy = 0.5;
      }else if (Triangle.getPosition().y == 568){
         dy = -0.5;
      }
      Triangle.move(dx, dy);
 

Instead of == you use >= and <= (greater than or equal to, and less than or equal to)
The reason is that == is absolute, so of by some means your enemy moves from say 767.5 to 768.1 it will just keep moving.
If you instead had said >= it would still change direction.
Of course, if you are 100% sure there will never be a case where this happens, than == is just fine :)

12
General / Re: Animation Problem
« on: May 20, 2017, 08:03:37 pm »
to answer that we'd need to know how you handle animation.
but one suggestion could be to use the sf::Clock or you could increase animation frame by less than a whole eg:

CurrentFrame (a float)
DisplayFrame (an int)

CurrentFrame += 0.1;
if(CurrentFrame >= 3) CurrentFrame = 1;
DisplayFrame = (int)CurrentFrame;

this code will loop DisplayFrame between 1 and 2 for each 10 updates. likevise:

CurrentFrame += 0.25;
if(CurrentFrame >= 6) CurrentFrame = 1;
DisplayFrame = (int)CurrentFrame;

will loop between between 1,2,3,4 and 5, for each 4 updates.

13
SFML projects / Re: "Our Dear Paper Fighters" - Top down shooter
« on: May 20, 2017, 07:55:28 pm »
I really love this project, and follows it religiously.. reminds me of all the "games" we made back in the school years (age 10+ i guess)

So much imagination and such awesome presentation!

One question, the shadows (in your video above) are all the same offset from the objects that cast them.
Have you considered dynamic distance? so the helicopter will cast a shadow higher up. misiles shadows will change distance as the get near the ground?
(okay, last one will require they know where/what they will hit.... but that could be done with ray casting)

dont know... just thinking out loud... either way... its an awesome game so far...

keep up the good work and thumbs up :)

14
SFML game jam / Re: Making a Jam on Itch io with prices
« on: May 14, 2017, 04:12:02 pm »
Thank you for the feedback... That is surely something to consider... My thoughts are;

I see no issue in sticking with it (for me that is) so if this is the main problem, I may just run a Jam without prizes to see if that is correct... :)

But about prizes;

being useful, that was part of my "bet"
The newer programmers/sfml users has more interest in these books, thus more incentive to participate. That is part of my goal..  To inspire/lure new people in.

Varying prizes; I'll try to avoid that, but to be honest, when it's a free contest, I don't feel people have no right to complain if prizes change from jam to jam. Yes you use time on it, but you know the prizes beforehand and use the time of your own will.

One winner/rest losers.
That is of course a sad feeling to have, but from my knowledge/experience, that feeling is just as likely whenever a winner is announced in any contest, regardless of the amount of prizes.
Best solution I've ever heard is to only announce the winner(s) and not rank the rest (officially at least)

I don't know, my idea behind doing it was to try to give SFML some of its much deserved attention. But if this is not what the SFML community would like, I will of course withdraw.
But I will probably run a jam any ways, just without prizes...

Best regards :)

15
SFML game jam / Making a Jam on Itch io with prizes
« on: May 14, 2017, 03:16:04 pm »
So, seeing as my post in the other thread got no response, I decided I wanted to make a dedicated thread for it.

Here is what I'd like to do (And will do if there is support for it)

-Hold a 1-2 week game Jam. SFML will be a requirement
-1 man team development
-Theme, Vote on a list of 10+ themes, top 3 will be open to use, individually or mixed. creators choice.
-Graphics and sound assets: any free/legal will be allowed. (I think, still not 100% on this one)
-Code assets: Basic framework can be done beforehand (window, game loop ect.) but game mechanics must be made after start.
-SFML tribute must be included in game, regardless of theme.
-Prize: the winner will be able to choose one of the following books (print edition):
SFML Game Development
SFML Essentials
SFML Blueprints
SFML Game Development By Example
Mastering SFML Game Development
Any new SFML Books that comes out before i start the contest
The prize can be given away as a donation if the winner already have the books.

How Ill do it:
-I'll use some time from now to hammer out the details.
-Then ill give 1 month for theme suggestions (I will sort trough these so all are pg 15 or some such) (posting on Itch now, and all other places i can think of)
-1 Week for theme voting
-Announcement of theme, 1-2 weeks for development
-Games come in. 1 week for reviews (no voting yet, but commenting welcome
-1-2 weeks for voting
-announcement of winner



How does this sound?

Q/A:
1) Is this prize paid for already?
- Yes'ish. the money are set aside, but not knowing the selected prize, it cannot be paid.

2) Will there be more prizes?
- Only if others decide to tip in

3) Will this be the only time i sponsor such a contest?
- That will depend on the interest, but i hope to make one contest each 3-4th month

4) Can anyone partissipate?
- Yes, but you will have to live a place where PacktPub or Amazon will send stuff to you to receive the prize

5) Will there be beginner/intimate categories?
- Sadly no, not unless more people sponsores prices so we can devide stuff up.

6) Do you need any help holding this Jam?
- I can handle the stuff myself, but anyone involved with Jams, SFML or sponsoring who wish to help are welcome. but if you are part of the Jam setup you will not be allowed into the Jam. I also claim the right to refuse help for whatever reason I fond needed. (This is mainly to avoid cheating or over-staffing)

Pages: [1] 2 3 ... 5
anything