• 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.

!Null

Members
  • Content count

    49
  • Joined

  • Last visited

Community Reputation

380 Neutral

About !Null

  • Rank
    Member

Personal Information

  1. Okay so. I'm working on a project for University. It's an FPS.   I have made a basic server and the client and server can communicate via UDP (fairly simple stuff)   My question basically is, how should I deal with sending data from the client to the server and broadcasting the data of all players back to the client.   I've never really done anything like this before so it's all new to me.   Any advice would be appreciated.
  2. Thanks guys for all the support. I'll continue to try to make this work and when I'm done i'll post the result (after its submitted otherwise It wont get marked at all) Goran Milovanovic Thanks I'll have a look at it
  3. [quote name='BeerNutts' timestamp='1354047137' post='5004647'] [quote name='!Null' timestamp='1354038870' post='5004590'] It's an FPS [/quote] Wait a second. From a one lecture that teaches you an Echo Server, you're supposed to know how to program an FPS networked game? I think something is missing here. Is it just a 2 player game or a true multiplayer (ie, 2 - 16)? FWIW, creating a truly robust FPS Networked game is PRETTY FRIGGING HARD. Now, you can create a protocol that runs good over LAN, but would do poorly over the internet that's not too difficult (not too difficult for someone who understand networking protocols at least). BTW, there's a networking forum here that has loads of information that you may want to look over all the posts there. [/quote] yep you got it right. We haven't been given the exact spec yet but i get the impression that a 1v1 would be enough but even if you got a 1v1 going it would be just as 'easy' to get more players going. If i could get it working over LAN that would at least be a step. I do know a little about networking but if I'mhonest I don't really like doing it from a programmatic stand point. I've been looking through some of the functions and stumbled through some networking functions [quote] NetAcceptTCP(); NetClose(); NetConnectTCP(); NetCreateChannel(); NetCreateChannelTCP(); NetDataReady(); NetGetIP(); NetReceiveFrom(); NetReceiveFromTCP(); NetSendTo(); NetSendToTCP(); NetSetMulticastIP(); NetVarReceiveFrom(); NetVarReceiveFromTCP(); NetVarSendTo(); NetVarSendToTCP(); [/quote] Also thanks I might move the post over. And i'll have a look a look through there too.
  4. It's an FPS
  5. Okay so I'm taking this courses while I'm abroad and our final big project is to build a game (which is fine) and network it. The latter is my concern. We had a lecture / lab on building a echo server in C which i got most of I guess. But now I'm not sure how I'm suppose to mold this to help me network my game. The game is developed using a scripting language developed by the college (which has heavy hints of C++). I'm not looking for you guys to 'do my homework for me' I'd just appreciate some step in the right direction. If you need to know anything just let me know.
  6. [quote name='alnite' timestamp='1352658607' post='4999971'] While this might be language-dependent, you can't normally switch-case objects like strings. switch-case could only be used on integers, as it creates a [url="http://en.wikipedia.org/wiki/Branch_table"]jump/branch table[/url]. Additonally, in some languages, you are allowed to [i]fall through[/i] a case statement. [code] switch (x) { case 0: doSomething(); case 1: doSomethingElse(); break; default: doDefault(); break; } [/code] if x = 0, doSomething() and doSomethingElse() are executed. This style of coding could be useful in certain cases (no pun intended). [/quote] You are right. This is a language dependent thing because i know that in java 1.7 switch statements support strings
  7. here a quick example I wrote up. the code is java but the idea is the same [code] package example; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.*; import javax.swing.*; public class Main implements MouseListener { private final static int SCREEN_WIDTH = 640; private final static int SCREEN_HEIGHT = 480; private final static int tile_size = 32; private int map[][]; private int mousex, mousey; private JFrame frame; private JPanel panel; public Main() { map = new int[SCREEN_WIDTH / tile_size][SCREEN_HEIGHT / tile_size]; frame = new JFrame(); panel = new JPanel(); panel.setBackground(Color.red); frame.setSize(new Dimension(640,480)); frame.setContentPane(panel); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.addMouseListener(this); frame.setVisible(true); int k = 0; for(int i = 0; i < map.length; i++) { for(int j = 0; j < map[i].length; j++) { map[i][j] = k; k++; } } } public static void main(String[] args) { Main main = new Main(); } @Override public void mouseClicked(MouseEvent e) { System.out.println(map[e.getX() / tile_size][e.getY() / tile_size]); } @Override public void mousePressed(MouseEvent e) { } @Override public void mouseReleased(MouseEvent e) { } @Override public void mouseEntered(MouseEvent e) { } @Override public void mouseExited(MouseEvent e) { } } [/code]
  8. say you have a map array which is 32x32 (tiles of size 32x32 not a whole picture) and say your screen size was 640x460 this gives you a total number of tiles x:20 y:15 20 x15 = 300 tiles this means that we can do very easy mouse translation. when you click the mouse. get the mouse x and y location of the click/ then do something like int tile = map[ (int)mouseX / 32][(int)mouseY / 32] so to show an example of this. imagine your screen 640x480 and imagine we click at mouse location 450 150 450 / 32 = 14 150 / 32 = 4 so now we have our tile 14 across and 4 down which would select tile 56. as for making the tile brighter im not sure
  9. Sweet. be sure to let us know how you get on
  10. Okay. The simplest way to do a tiled map with textures (images) is simple You have your width of your window and the height of the window (say 640x480) and then you want to assign a tile size. this will be the size you want the 'environment' to be (not the characters or enemies etc) so trees,grass all that stuff. I usually pick either 16x16, 32x32 or 64x64 for my tiles. Then (if we are not using slick and tiled maps) we do the following below. [code] static final int WIDTH = 640; static final int HEIGHT =480; int tileSize = 32; int map[][] map; Random rand = new Random(); public void init() { map = new int[WIDTH / tileSize][HEIGHT / tileSize] for(int i = 0; int i < map.length; i++) { for(int j = 0; j < map[i].length; j++) { map[i][j] = rand.nextInt(2); } } } } [/code] we create a 2D array for our map (just like a matrix) and the size is basically how many tiles across and down your map is. So 640 / 32 = 20. 480 / 32 = 15. (you can obviously create your own maps and load them in from a text or something but That's too much detail for the moment. after that all you have to do if loop through the code. if the element at index i,j = 0 we draw nothing (or a default tile) and if the element at index i,j = 1 we draw something interesting [code] for(int i = 0; int i < map.length; i++) { for(int j = 0; j < map[i].length; j++) { switch(map[i][j]) { case(0): g.drawImage('your default tile',i*32,j*32); break; case(1): g.drawImage('your interesting tile',i*32,j*32); break; default: g.drawImage('default tile',i*32,j*32); break; } } } } [/code] and this will draw out your tile map. after which you draw your player after you draw you map, so that the player is rendered on top of the map and not behind. then when you want to move a player between somewhere on the map. you can just to tile movement (eg move it by a tile at a time rather than pixels at a time) The slick2D way is a lot easier in my opinion though. If you make a 2D map using Tiled map editor. you can load and display the map very quickly like this [code] import org.newdawn.slick.*; public class Game extends BasicGame { private TiledMap map; public Game() { super("This is where you put the title"); map = new TiledMap("location") //and some other parameters I can't remember off the top of my head. Check the javadock for slick } public static void main(String[] args) { AppGameContainer gc = new AppGameContainer(new Game()); gc.setDisplayMode(640,480,false); gc.start(); } @Override public void init(GameContainer container) throws SlickException { } @Override public void update(GameContainer container, int delta) throws SlickException { } @Override public void render(GameContainer container, Graphics g) throws SlickException { map.render(); } } [/code] Simples ;). and you can still do your gird movement and stuff the same way. Sorry if this is a long winded explanation. if something is unclear just ask. hope this helps
  11. Oh yeah Slick2D is up to date. You just need to download the Nightly build (as that's always the most recent update) I'm just a bit confused as to why you have a grid of buttons. Do you want to select characters with the mouse or whatever and have them move to that point (animating while moving?) If so there are easy ways of doing this. Also you can used Tiled editor to make your tiled maps and loads them into java with the Slick2D methods
  12. [quote name='Bismuth' timestamp='1349813240' post='4988462'] [quote name='Cornstalks' timestamp='1349812336' post='4988454'] Actually, you're running out of precision in that operation. -255 * 409 is -104,295, but [font=courier new,courier,monospace]int16_t[font=arial,helvetica,sans-serif] [/font][/font]only has 16 bits of storage, which means it can only store values in the range ?32,768 to 32,767. So what happens? Your intermediate result gets chomped down to 16 bits *before* the divide happens, and the end result is a weird value due to [url="http://en.wikipedia.org/wiki/Integer_overflow"]overflow[/url]. What should you do about it? Use a bigger data type. [/quote] Could you please elaborate on that? What exactly is the factor that causes the calculation to be processed in 16-bit? Shouldn't the program detect that its running out of precision and automatically use a bigger (i.e. 32-bit) temporary buffer? Which variables exactly should be increase in size? EDIT: Is there a way to increase the temporary buffer size without changing the variable data types? [/quote] That's not how it works. Yes there is something that causes the calculation to be processed in 16-bit...its the fact you told it that your values are all 16 bit signed integers. when you get an overflow, instead of crashing your program. The value gets wrapped around. so when you reach the max value, it goes back to 0 and starts counting up again. Is there a reason you chose int16_t or did you copy it from somewhere. Like I said change it to int32_t or higher and see the results
  13. If you are using Java + Netbeans have you had a look at Slick2D. http://slick.cokeandcode.com/ I've used it for many 2d tile based game project. It has support for tiled maps and makes animation easy. If you wan't more info you should have a look at it and you can send me a message or something. or ask more questions here.
  14. I think you have found your answer from most of these replies. If you don't believe them then change them to int64_t and see the result
  15. My profession is Software engineering and I have a part time job writing ASP.NET software. I'm quite advanced with Java, c#. and I am intermediate with c++