Jump to content
  • Advertisement

CoffeeAddict19

Member
  • Content Count

    12
  • Joined

  • Last visited

Community Reputation

6 Neutral

About CoffeeAddict19

  • Rank
    Member

Personal Information

  • Interests
    Programming

Social

  • Github
    coffeeaddict19

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I was thinking about writing an application layer firewall to sit between a game server like (quake 3 is the only protocol I could find documented in any detail) that could do packet inspection and drop packets that didn't fit the spec (range checking the server leaves out), looked suspicious (like a client sending control messages from Zimbabwe when the server is in Texas or weird patterns that could indicate DOS or probing) or to make rules that were not coded into the game (like blocking off certain weapons). To do that I would need a proxy that listens for clients on an IP and forwards traffic to the server, then back to the clients. ^How practical is such an idea in UDP? I know some multiplayer implementations take latency into account when interpolating player movements. How big of a deal will that be? Does anyone know of a well documented protocol spec besides Quake 3? Is there a commonly used, defined protocol for Unity or other engines you can recommend? I'm interested in furthering skills in networking...seemed like a worthwhile task, just not sure how practical it is. I have seen stuff like this in the automation world Tofino Modbus is an example and would like to translate it to the game world if I can... Thanks, John
  2. CoffeeAddict19

    How to stay motivated?

    Motivation with game dev...I nibble at it every night (or try). Sharing work with wife and friends at work helps. Which is why I focus on web app games because they are easy to share. On low motivation spots at work...I compensated on training the development group and (mostly) support group on certain topics. Sharing information is something I enjoy. Breaks like that kept me motivated. I was fortunate enough to be allowed (even encouraged) to do this at work as long as my development work was not interrupted. If you're having issues with alcohol and it is at a point where it effects your work or life...suggest AA.
  3. CoffeeAddict19

    At what time do you sleep and wake up?

    For a few months it was sleep whenever my son decided to sleep and wide awake when he was not...so 8:30PM to 6AM with occasional wakeup at 2AM. Now it's more like 10PM to 6AM. Have a kid. It'll turn your life upside down!
  4. Guess this depends on whether it's a multiplayer game you are interested in or not. If it is a multiplayer game... The client has absolute control over what runs on their machine. Perhaps I should have been more precise...you need to maximize the presentation logic on the player side. The eye candy needs to be on the client side. The actual game logic, particularly the stuff that decides if a move is valid and if it results in a win, needs to be on the server. If you put it on the client side then you leave yourself wide open to cheating and perhaps even a compromised server. As I said before...if you have a crappy machine, I would suggest doing work in a web browser (suggest Chrome or Firefox). Modern browsers are awesome...SVG (2d) and WebGL (3d) right out of the box. Fairly straightforward and no IDE or even compiler is required.
  5. CoffeeAddict19

    Leaderboards Without a server?

    Suggestion... 1. Distribute your software (game) and require that they register with your server to end up on the leaderboard. So the client sends a POST message with their e-mail in the message. The server responds with a signed sha256 hash of that e-mail. From that point on that signed hash identifies the player and is sent every single time the player needs to identify itself to the server. The signed hash and email go into a database on the server. 2. When a player's game is complete, it sends the same sha256 hash to the server with the relevant data (wins, losses, who played etc) in a POST message. That data goes into the database using the hash that identifies the player as a key. 3. When a player wants to see the leaderboard, they send a GET message to the server and a list of player statistics is returned (use e-mail or partial e-mail as a key with stastics as the value). The statistics are alll stored in a database so whenever the server recieves the GET message it just has to do a query. ^The problem will all of that is that it is certainly possible for a player to impersonate another player to the server or for a player impersonate the server to a player and cause all kinds of bad things to happen. You would need to use some kind scheme with public/private key encryption to prevent that. Ideally you would want a server to host the game...so the server is adding the statistics, not the client which you really have no control of. No matter what you do I would not allow a direct sql connection from the client (player) to the server. Have a webapp to the inserting and querying and act as a shield.
  6. The web application route is the one I am following, it may work for you. I like it because its easy to distribute (passing a URL instead of an install file) and you can offload the resource intensive stuff to the web server. Python is commonly available on web servers and works well for back-end stuff so you can use it to run the logic of your game. There is a free hosting (with well defined limitations) for python here: https://www.pythonanywhere.com/ Python can also call C++ DLLs so you can re-use your own or someone else's C++ code in your game. For a finished game you can write the UI in Javascript/HTML with HTTP as a communication medium. That's a lot of layers (and languages) to work through if you have limited experience...I would suggest installing Python 2 or 3 (I use 2 but whatever) and write a command line game in python (tic tac toe). Once that works, I would suggest converting it to a web application and writing the UI (board and stuff) in HTML with SVG elements for display. Javascript can do asynchronous calls to the server and be a client side back-end. If you want to look there is some sample code here for tictactoe: https://github.com/coffeeaddict19/tictactoe
  7. OOP and Functional Programming are two different approaches to solving problems. OOP is just all the rage right now. What you are describing sounds like Functional Programming. You can read about it here: http://www.codenewbie.org/blogs/object-oriented-programming-vs-functional-programming I'm not a graphics expert but as far as I know most graphics APIs flip between two pieces of memory...the visible 'buffer' that is being rendered and the back 'buffer' that is redrawn all the time. When the API is done drawing on the back buffer it cycles the back buffer to the visible buffer. So point being...as long as you are redrawing the back buffer probably no issue.
  8. CoffeeAddict19

    Question about C++ , C# and Java

    How about you put all the back-end low level logic (the stuff that you want to run fast) in a C++ DLL. Then write your GUI (the stuff that can run slow because humans will always run slower) in the high level language of your choice. Then call the C++ DLL from your GUI code. Gives you total freedom to code in the GUI language of your choice without effecting performance. Added bonus is that as long as the interface that the DLL and front-end GUI code does not change, you can change the code in either piece without having to recompile everything.
  9. CoffeeAddict19

    Question about C++ , C# and Java

    C++ has the potential for better performance. You can try to write perfect code or you can write code that is good enough to get the job done. I would suggest the latter. My point is...choose whatever language you are comfortable with that will result in a finished product. I would submit that focusing on readability of code and a well thought out, well executed, and extensible design is more important than performance. About writing a GUI...nothing says you can't write the GUI in one language which is well suited to high level GUI stuff and the logic in a different language well suited to performance. In the example of a web application...you can write the back-end code (where speed matters) in C++, the web app code in Python and the GUI in JavaScript/XHTML markup.
  10. CoffeeAddict19

    What are bytes

    Typically the bit level stuff is handled at the hardware level. At the software level you'll open a socket, assign it to a port number. Then you specify the number of bytes you want to read from the socket. It will behave differently depending on if it is blocking or non blocking but bottom line you will receive an array or stream of bytes. Then it's a matter of a) verifying if it's junk or noise and b) parsing the bytes into data you can work with (characters, Booleans, long int, doubles whatever). At a higher level you can automatically try to parse the bytes you get into a data structures (called deserializing). Bottom line, the bytes are meaningless without context. A lot of higher level libraries like HTTPClient from .net framework abstract all this complexity so you only have to dive into all of this complexity unless you are talking to a device that communicates with a proprietary protocol. If you want to get into the guts of how this works I suggest researching Modbus. You can read about it here: http://www.simplymodbus.ca/FAQ.htm Hope that helps.
  11. CoffeeAddict19

    tic-tac-toe review request

    The goal was to make it extremely difficult. I said primitive because the algorithm I used (if you can call it that) is very simple. Seems to work quite effectively though. Go figure. I'll see I can add an "easy" setting. Thanks for the code review Alberth! Will make the changes as I have time and push to GIT.
  12. CoffeeAddict19

    tic-tac-toe review request

    I was looking for an opportunity to learn/improve skills so I wrote this simple Tic-Tac-Toe game. I have written Python code for simple network tests and know enough JavaScript to get by. Still not certain on fine details though, particularly what subtle (or not) best practices I am likely missing. Code review, testing and advice on how to improve would be appreciated. Code is running on PythonAnywhere here: http://coffeeaddict.pythonanywhere.com/tictactoe Code is here on GIT: https://github.com/coffeeaddict19/tictactoe The three pieces are: JavaScript and Markup: tictactoe_page.html Bottle Framework Implementation: tictactoe_bottle.py Python Game Logic: tictactoe_logic.py If you look closely at the game logic the AI is...primitive. Researching MinMax to improve it is the next thing on list but in my experience if I wait for perfection I never get anything done. Anyway...how can I improve this game and this code? Thanks, John
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!