• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

crohnsandme

Members
  • Content count

    23
  • Joined

  • Last visited

Community Reputation

123 Neutral

About crohnsandme

  • Rank
    Member
  1. ok forget all above here is my new problem....   i am only dealing with single tiles on floor level so i know i maybe need stricter if statments once i jump up more levels but i can jump on top of a tile and both the left and right collision work for the sides of tile   coding:   //topoff                       if (character.playerPosition.Y <= tile.Rectangle.Top &&                          character.playerPosition.X + (character.rectangle.Width / 2) >= tile.Rectangle.X + (tile.Rectangle.Width/5) &&                         character.playerPosition.X + (character.rectangle.Width / 2) <= tile.Rectangle.Right+70)                     {                                                      character.playerPosition.Y = tile.Rectangle.Y - 64;                             character.velocity.Y = 0f;                             character.hasJumped = false;                                                                                                        }                       //leave top of tile                     else                         if (character.playerPosition.Y <= tile.Rectangle.Top &&                          character.playerPosition.X + (character.rectangle.Width / 2) <= tile.Rectangle.X)                         character.hasJumped = true;                     else                             if (character.playerPosition.Y <= tile.Rectangle.Top &&                              character.playerPosition.X + (character.rectangle.Width / 2) >= tile.Rectangle.Right)                                 character.hasJumped = true;                                                                                                                                 //touch left                       if (character.playerPosition.X + 64 >= tile.Rectangle.X &&                         character.rectangle.Y  >= tile.Rectangle.Y &&                         character.rectangle.Left <= tile.Rectangle.Left)                     {                         character.playerPosition.X = tile.Rectangle.Left - 64;                     }                       //touch right                       if (character.playerPosition.X  >= tile.Rectangle.Left  &&                         character.playerPosition.X <= tile.Rectangle.Right+80&&                         character.rectangle.Y >= tile.Rectangle.Y                          )                     {                         character.playerPosition.X = tile.Rectangle.Right+80;                     }     but now when my character is on top of the tile it wont jump, i think i does attempt to jump but because of the on top if statement it always throws it back to the same position?   i tried saying if character.rectangle.bottom == tile.rectangle.top but i noticed when debugging that they never are the same? which i think maybe my problem?
  2. does anyone have any tutorials on collision with tiles?  my player touching left of a tile works fine here is that code     if (character.playerPosition.X + 64 >= tile.Rectangle.X &&                         character.rectangle.Y  >= tile.Rectangle.Y &&                         character.rectangle.Left <= tile.Rectangle.Left)                     {                         character.playerPosition.X = tile.Rectangle.Left - 64;                     }   and when i switch a few things round to do the right of the tiles it shoots me to the very right of all my tiles   if (character.playerPosition.X  <= tile.Rectangle.X + tile.Rectangle.Width  &&                         character.rectangle.Y >= tile.Rectangle.Y &&                         character.rectangle.Left <= tile.Rectangle.Left)                     {                         character.playerPosition.X = tile.Rectangle.X + tile.Rectangle.Width;                     }   any chance anyone can help me work this out?im happy with the on top and underneath but the right is causing me problems
  3. ok i admit that sounds confusing but could be because i been staring at the computer for last few hours , i think i can see where my problem is.... i am using an 2d array to create my map not a file(maybe my first mistake?)   here is an example of the map i using atm to test collision                   {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},                 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},                 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},                 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},                 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},                 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},                 {0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0},                 {0,0,0,0,0,0,0,0,0,0,0,2,2,1,2,2,2,2,2,2},                  {0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2},                 {0,0,0,0,1,0,0,0,1,0,0,2,2,2,2,2,2,2,2,2},                             }, 90);   now in the tutorial i used they used 64 as that final value for the size of width and height but then my camera has the map zoomed out far but when i changed it to 90 it made the tiles closer to the screen, but thew now when it comes to the collision the values are all weird, so my tiles width and height is 90x90 but my character is 128x128... i  need to try work out the if statements for the collision.... so frustrating , guess this is the problem following an tutorial and then changing things it forces you to learn and understand each line of code to find the problems guess thats supposed to be part of the fun lol
  4. yes, basically when i have the collision for top,bottom,left and right i jump onto a tile and i end up half way up screen lol i tried using fixed numbers to work out whats happening but i must be missing something , also when it shoots half way up screen it will slowly fall down very slowly, i will relook over the coding and if im struggling by tonight i will post what i have got up and see whats wrong :)   thanks
  5. ok well seeing as we will be using this at university im guessing ill go get lunas book and then i can read the other also for the things that are missed out of lunas book?   thanks guys/girls
  6. hi all, so i am trying to do a tile map and get my character to collide with them and jump from one to another etc, my character is 128,128px but my tiles that i found online (free) are only 32x32px , will this cause problems when doing collision?   the collision theory i am following is 2 rectangles one for character(r1) and one for each tile(r2)    this is example for if its touching top of the other            if    (r1.Bottom >= r2.Top - 1 &&                 r1.Bottom <= r2.Top + (r2.Height / 2) &&                 r1.Right >= r2.Left &&                 r1.Left <= r2.Right );   now am i right in thinking surely if my rectangle for character is 128,128 and the rectangle for each tile is only 32,32 this collision isnt going to work (which it doesnt atm) ? how do you normally work this out? my character looks good on screen 1600x900px at 128x128... so should i make tiles bigger or shouldnt it matter?
  7. hi all, so i am slowly moving onto to 3D and know at university i will be using directx so i want to get a little headstart learn the basics and be comfortable using the tools needed, i see a few different books for beginners with directx just thought is there any specific ones i should look for that will do me well? thanks
  8. oh no i am making a game with the resolution 1600x900 (for now it will eventually have an fullscreen mode) so the character i am using at the moment is 125x125px so maybe use the same? for now i am tinkering with drawing trying to make what i want but using sprites from heli attack 3 for now :) if worst comes i can still use these sprites as its only for educational and a showpiece to show my uni what i know already but i would like to say "ye this is all my own artwork also" :)
  9. hahahaha omg it was so obvious after i wrote the previous post i basically had said what i needed to do lol :) now onto creating a  tiled map so i can take advantage of the working camera :)
  10. ok this is annoying me now i decided because the only enemies for now will be same enemiy texture in list its pointless making a complex sprite manager when its only a 1 player simple game, so back to the camera problem   if i remove the sprite.begin and end from the main class none of the menus are drawn, i have tried a few different ways trying to end before the next begin and having no luck , here is the MAIN class code     protected override void Draw(GameTime gameTime)         {             GraphicsDevice.Clear(Color.CornflowerBlue);               spriteBatch.Begin();             switch (CurrentGameState)             {                 case GameState.Playing:                      actionScene.Draw(spriteBatch);//spriteBatch.Draw(actionBackTexture, new Rectangle(0, 0, screenWidth, screenHeight), Color.White);                      break;                   case GameState.MainMenu:                     spriteBatch.Draw(backgroundTexture, new Rectangle(0, 0, screenWidth, screenHeight), Color.White);                     spriteBatch.Draw(crosshairTexture,crosshairRect,null,Color.White,rotation,origin,SpriteEffects.None,0);                     break;                 case GameState.Options:                     spriteBatch.Draw(optionsTexture, new Rectangle(0, 0, screenWidth, screenHeight), Color.White);                     break;             }             spriteBatch.End();             base.Draw(gameTime);                      }   and then here is the main actionscene where the player,enemies,bullets everything in game is drawn etc    public void Draw(SpriteBatch spriteBatch)         {             //spriteBatch.Begin(SpriteSortMode.Deferred,               //  BlendState.AlphaBlend,                 //null, null, null, null,                 //transform);             spriteBatch.Draw(backgroundTexture,backgroundRect,Color.White);             character.Draw(spriteBatch);             crossHair.Draw(spriteBatch);               if (firing)             {                 foreach (Bullet bullet in bulletList)                     bullet.Draw(spriteBatch);             }         }   ye at the moment there are no enemies, nor map tiles etc so for now its just the player the crosshair and bullets drawn   can someone help me find what/where to put the camera sprite.begin please thanks
  11. yes i sumbled across a copy of illustrator :D i like this and think i like using the mouse for the dragging the lines etc so going to stick with the mouse and practice :) one last thing and i guess this shouldnt matter because you can scale vector art but whats an usual size canvas to work on say a character sprite?
  12. thanks yes atm the moment i have gone back to create a sprite manager (which i just learnt) so its helping me make sure i understand it proerly , then i will go back to focusing on getting the camera to follow camera plus side scrolling, then finally create a map then i will be happy , i want to then look at perpixelcollision plus getting enemies into the game maybe attacking with swords instead of bullets everywhere plus it helps show the perpixelcollision :) so alot of work to do i hope to try spend a few hours a day on this before university starts in september so i have a decent background in making the 2d games so i can then focu on the 3D games
  13. ahh yes that is fine , at the moment i have took a step back and decided to clean the coding up of what i have so far ie, create a spritemanager to make it easier for others to read my code and help me learn more about making a spritemanager, but soon as i am sorted with that i will be back to look at the camera problem im glad its not a major problem and seems to be easy enough to sort out :)   thanks for looking
  14. hi all , so i have a main class   HeliClass    which holds my different scenes   then i have an actionscene which holds all my players , weapons,enemies etc   i have created a camera class and then i have created a new camera within my player class (i have also tried to create it within the actual actionscene) but i think its all ok apart from when it comes to the draw method when i have to include the camera within the spritebatch.begin(.............) but i am getting an error because obviously i have an spritebatch.begin in the main class which holds  the different scenes.... so i tried writing a new spritebatch.begin in the player/actionscene but getting the error obviously i cant begin a new one until the end has been called     can anyone help me with this problem. if needed to see any code i will paste it in if needed. i just wondered if this is a common problem people get?   i cant see how to create the new camera in the main heliClass because i need to pass the character values which are created within the player/action class?
  15. thanks for that link spiro but i will be honest i am a beginner, learning c# for the last 2-3 months from books on my own so looking at that C++ is very intimidating as i cant follow it 100% i understand to use polymorphism instead of the switch cases but as for now i feel i would be jumping ahead and not understanding things if i was to try and implement what you are suggesting i expect once i have more confidence and experience i will learn better ways etc i suppose if i had knowledge of C++ i would understand that tutorial better and would be able to follow what they are saying