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

Author Topic: First sfml gave, very basic!  (Read 3334 times)

0 Members and 1 Guest are viewing this topic.

Eritey

  • Newbie
  • *
  • Posts: 12
    • View Profile
First sfml gave, very basic!
« on: January 29, 2013, 09:44:19 pm »
Good evening,

Thought It was about time I showed some people the extremely basic game I've been working on. It was really a learning experience of how to create the framework around a game instead of aiming to create a game.

I guess the main thing I learn't was to create an entityManager to house all the entities in the game instead of having bits and bobs everywhere. Still not sure If I implemented it as correctly as I could have but I'll get up a github later so you lovely people can rip my code apart and tell me how terrible it is.

Controls:
  • Left mouse to fire
  • WASD to control the player
Objective:

The idea of the game is that you have to dodge/attack enemies, after 15 seconds the wave resets and the next week the enemies will be greater in number and travel slightly faster.

Red enemies spawn randomly and will seek you out in an attempt to destroy you.
Blue enemies will all spawn at the start of a wave but will travel randomly around.

Todo:
  • Add in more interesting enemies
  • Create a nice looking hud
  • Make the main menu and game over states nicer looking
  • Add sound

Download

http://puu.sh/1UxZG
« Last Edit: January 29, 2013, 09:50:13 pm by Eritey »

Lo-X

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
    • My personal website, with CV, portfolio and projects
Re: First sfml gave, very basic!
« Reply #1 on: January 29, 2013, 11:03:51 pm »
Nice =)

You should block the player when he tries to get out of the frame, I lost myself :p
Add an HUD would be indeed useful, we cannot know how much life remains

The querty controls are not very handy for a frenc like me, that's hard to stay alive :p

Eritey

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: First sfml gave, very basic!
« Reply #2 on: January 29, 2013, 11:22:14 pm »
Nice =)

You should block the player when he tries to get out of the frame, I lost myself :p
Add an HUD would be indeed useful, we cannot know how much life remains

The querty controls are not very handy for a frenc like me, that's hard to stay alive :p

I attempted to stop the player running off but I'm not great at collision logic, so if someone could help me with that I'd be much appreciated.

io

  • Jr. Member
  • **
  • Posts: 52
  • z/OS by day, SFML by night
    • View Profile
Re: First sfml gave, very basic!
« Reply #3 on: January 30, 2013, 05:52:58 am »
I get a crash when I exit the game (maybe something with pointers/not closing cleanly?)

As for not going off the screen, a simple solution off the top of my head would be since you have the players x/y you can check on your move event something like (super pseudo code)

if( player.x >= 0 && a is pressed )
   move player_left
if( player.x <= window.size.x && a d is pressed )
   move player_right

I think your score/wave tracker is not working properly.   I've finished two 15 second stints and it says only one wave completed.  Also, regardless if I shoot boxes or not I still get 500 points.

Other than that nice project for your first release :)
« Last Edit: January 30, 2013, 05:57:55 am by io »

pogrady

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: First sfml gave, very basic!
« Reply #4 on: February 01, 2013, 07:19:37 am »
Hey thats fun.  The blues float around while the reds make a bee line for you.

If you hit one are you supposed to die?