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

gareth_mcdaid

Members
  • Content count

    7
  • Joined

  • Last visited

Community Reputation

157 Neutral

About gareth_mcdaid

  • Rank
    Newbie
  1. Random thoughts. 4 connected clients each running at a different FPS, each with different ping/pong times, requires Frame rate independent movement Using the elapsed time between frames to update the position , 1000/60 elapsed time = 16.6. One method is reading keyboard input detecting directional changes, recording a time stamp and position for each directional change, this information is sent back to the server on average once every 200 milliseconds. The sever as a tick rate of say 5 ticks for each second of time.   The server and client can use a buffer of previous player positions to achieve movement interpolation, this approach can’t be used for PVP in real time as there is no prediction ahead of time for the new player  positions. Projectiles can have predetermined behaviour using a sine wave generator, the client sends a player shoot packet back to the server, included is the position, angle and a time stamp, the server positions each projectile based of it’s elapsed time from being alive, With this information the server checks to see the bullet isn’t being positioned elsewhere and proceeds to send all connected clients the ally shoot packet.  
  2. The sine wave generator is using a time, elapsed_time in milliseconds, or a time stamp milliseconds, to get the position of the sine wave. The problem is I need to make the sine waves travel at any angle through 2D space, any help? The sine wave generator is part of a separate projectile system, 10 is the maximum frequency, elapsed_time is required because this is to be used in a client and server game, where timing is crucial.   Create event set=0; lifetime=3000 frequency=1 amplitude=50*1.0 pixels[0,0]=0 pixel_num=0 xx=0 Draw event if set=0 { start_time=current_time set=1 } elapsed_time =current_time-start_time if pixel_num<60*(lifetime/1000) { pixels[pixel_num,1]=(sin( (elapsed_time/lifetime)*(10*frequency) )*amplitude) } xx=0 pad=1 draw_set_color(c_red) for(i=0;i<pixel_num;i+=1) { if i>0 { draw_line(xx+100,100+pixels[i-1,1],xx+100+pad, 100+pixels[i,1]); } xx+=pad; } if pixel_num<60*(lifetime/1000) { pixel_num+=1 } The projectiles move independent of the frame rate, using the elapsed time, the elapsed time is used to position the projectiles, it’s required to keep the server and client synchronized at all times.   Distance is calculated by using constants and the elapsed time, the constants are based of the server tick rate and the target fps, and there is a speed constant for each projectile used to calculate the number of pixels to move the projectile per millisecond of time passed   The below code as the desired effect but for only for four directions, I need 360 degrees of movement for this to be of use in my projectile system.. angle=0 x=startx + (cos( degtorad(angle) )*distance) y=starty - (sin( degtorad(angle) )*distance)- ((sin( (elapsed_time/lifetime)*(10*frequency) )*amplitude) ) anlge=90 x=startx + (cos( degtorad(angle) )*distance)- ((sin( (elapsed_time/lifetime)*(10*frequency) )*amplitude) ) y=starty - (sin( degtorad(angle) )*distance) angle=180 x=startx + (cos( degtorad(angle) )*distance) y=starty - (sin( degtorad(angle) )*distance)- ((sin( (elapsed_time/lifetime)*(10*frequency) )*amplitude) ) angle=270 x=startx + (cos( degtorad(angle) )*distance)- ((sin( (elapsed_time/lifetime)*(10*frequency) )*amplitude) ) y=starty - (sin( degtorad(angle) )*distance)
  3. #include <iostream> #include <time.h> #include <stdio.h> using namespace std; FILE *output_log = NULL; const int numofbits=2; int current_pos=numofbits; const char target_num=122,start_num=97; char bits[numofbits]; char result_bits[numofbits]; clock_t ticks1; int string_length(char* string1) { int len=0; while (1) { if (*string1==0) { break; } string1+=1; len+=1; } return len; } void init_bits() { int i=0; for(i=0; i<=numofbits; i+=1) { bits[i]=start_num; result_bits[i]=target_num; } output_log=fopen("c:\\output_log.txt","w"); } void running() { int i=0,found=0,total_count=0; double clock_count=0; //char string1[1]; while (1==1) { clock_count+=1; if (clock_count>10000000) { //ticks1=clock(); total_count+=1; cout << total_count << endl; clock_count=0; } for(i=0; i<=numofbits; i+=1) { char a; //sprintf(string1,"%d",bits[i]); //fprintf(output_log,string1); a=bits[i]; fprintf(output_log, &a ); } fprintf(output_log,"\n"); found=1; for(i=0; i<=numofbits; i+=1) { if (bits[i] != result_bits[i]) { found=0; break; } } if (found==1) { break; } //cout << current_pos << endl; bits[current_pos]+=1; if ( bits[current_pos] >target_num) { bits[current_pos]=start_num; current_pos-=1; for (i=current_pos; i>=0; i-=1) { bits[i]+=1; if (bits[i]>target_num) { bits[i]=start_num; } else { current_pos=numofbits; break; } } } } } int main() { init_bits(); //cout << "Hello world!" << endl; running(); fclose(output_log); return 0; }
  4. How do you work out how many pictures there are for a given number of pixels and colours? The image dimensions are 1 Bit Per Pixel = 2 colours 4*4 number of pixels = 16 pixels I think the answer is 2^16 = 65536 2 to power of 16 is 65536 Is this the correct answer?
  5. Hi everyone I am currently trying to write my own game making program its not going to be 3d but it will still have multiplayer and was wanting some information on want you would like to see in my game making tool. You can check out my web site for moor information go to the about web page and the download page to see my game making tool . web address www.bioware.freewebsitehosting.com My game making tool was base on game maker and comes with some cool demo games pacman etc. I made it with the allegro gaming library check it out and let me no what you think.
  6. Hi everyone I am currently trying to write my own game making program its not going to be 3d but it will still have multiplayer and was wanting some information on want you would like to see in my game making tool. You can check out my web site for moor information go to the about web page and the download page to see my game making tool . web address www.bioware.freewebsitehosting.com My game making tool was base on game maker and comes with some cool demo games pacman etc. I made it with the allegro gaming library check it out and let me no what you think.