Jump to content
  • Advertisement

CarlosMartinez

Member
  • Content Count

    29
  • Joined

  • Last visited

Community Reputation

130 Neutral

About CarlosMartinez

  • Rank
    Member
  1. CarlosMartinez

    mysql database

    i thought SELECTs were like looping through the entire database, well all your help should help me be on the way, now i suddendly dont feel stucked, and i can go on and keep working on my project, thanks a lot
  2. CarlosMartinez

    mysql database

    just a quick example of what i need to be clear:   lets say i have these tables:   users: pk iduser name     roles: pk idroles role_name   priviledges: pk idpriv priv_name   alright so i have an user: iduser=0, name=test   i have roles: 0=admin, 1=moderator, 2=member, 3=guest   so i would have another table to state a relationship:   user_role: pk iduser_role fk iduser fk idroles   up until this point its pretty easy, each user will have one role, but then mr. priviledges joins the party.   we have these priviledges: 0=view, 1=post, 2=edit, 3=delete.   so now we need another relation table and this one is the one i dont quite understand, because using your method, i would have to do the following:   role_priviledge: pk role_priviledge fk idrole fk idpriv   so if i want to give admins full rights, i would have to add 4 elements to that table, like       pk role_priviledge=0 fk idrole=0 fk idpriv=0 then one for fk idpriv=1, then one for 2 and one for 3.   this is the way that role_priviledge table would work, so if possible, i'd like it to work on a more efficient way, like admin has rights 0,1,2,3, all in one element.   the reason why i feel this is a need, is because if i had 100 roles, and 1000 priviledges, the role_priviledge table would be a hell to query and to understand.
  3. CarlosMartinez

    mysql database

      oh i see now, so if i have multiple possible values, i dont have to have them one by one on the table, like poison and stuff, i just have them as values and use those values according to the type, very interesting.
  4. CarlosMartinez

    mysql database

    im not quite sure, it just feels more efficient if u could virtually link a user with his own item table, instead of checking one by one every item the user has gotten on a database lots of users are going to use, lets say i have 1000 users and 1000 items, whenever i wanna see items for user 123, i would have to loop through the entire character_item table, to check for his CID, i am fairly new to the database subject but that just feels unefficient, i guess im just thinking like object oriented.
  5. CarlosMartinez

    mysql database

    i have another question that i will also ask here because i think its related.     lets say i want something like an rpg, i have my user table with my user called 001, that user 001 has one item from the item table with the id of 123.     so 001 has one 123, somehow i have that on my database.   now lets say 123 is a potion that restores 100 life points to my user, how would i store this effect on the database? like how would it appear in the database that the item must restore 100 life points to the user?
  6. CarlosMartinez

    mysql database

    is there a way for it not to store the items one by one? but have like a table of items for each character?, the way you are suggesting, everytime a user gets an item, the character_items adds a new row to store the item, also what if the character gets an item he already has? how would it increment?
  7. CarlosMartinez

    mysql database

    i read there was a way using explode, where i would put all the data in a text element on a table, but i dont really liek it, i want to know how to link a user to his own item table
  8. CarlosMartinez

    mysql database

    i have seen those extra tables before, like 1. characters, 2. items, 3. character-items.   but i dont quite get it, what if i want several items for 1 single character, do i need to get a lot of those #3s?
  9. CarlosMartinez

    mysql database

    well im working on a browser based game right now and i came to the part when i need to structure what will be my database, shortly after i started thinking about it i realized i dont have enough experience managing databases at all, so i got a couple questions about it, hopefully one of you can help me out here:   so in the game i want each user to be able to unlock certain items, so i need to keep track of that lock/unlock thing for each item, what i dont know, is how that would work in the database, should i have a user database separate from the item database? or should i use 2 tables inside the same database? how would it work?    actually being more general, how would the whole database work when it comes to users? what they can unlock, their current status, sessions?, everything related to the database is useful for me right now.   also these items im planning to let the players unlock, can be  more than one, so they would have quantity, so how do i connect an item-table to each user?   im not sure im being clear enough, im not even sure i understand what i need to be asking here, what i do know is that im confused and any help might be just what i need to get going.
  10. CarlosMartinez

    web browser game development

    well i have some experience with object oriented programming on javascript, but i'd like to see how extreme is "the good parts", also i already read some books on the canvas, and i actually liked the tool much more than flash even though it feels harder when it comes to animation and stuff, it wont be a problem here, the only thing that concerns me about working with canvas, is that the code is actually pretty open for anyone to see, and any experienced person might be able to find in-vulnerabilities easily by going through the code.   as for the last 4, i've never been a big fan of working with external libraries, even tho i know their potential, but im not saying i wont give them a try, learning a library that is not well documented could get a little messy tho.   overall, i feel its a little scary to work like that, it would be great if there was tutorials or open source codes to learn about this, having no clue about how serversided apps work, for example, i saw this on socked.io:   var io = require('socket.io').listen(80); io.sockets.on('connection', function (socket) { socket.emit('news', { hello: 'world' }); socket.on('my other event', function (data) { console.log(data); }); });   i dont understand a word of it, and i dont know where to put it, or how. also for the database, learning mongoose feels too hard now, my cpanel only offers database options for mysql, and i dont know how anything else would work.     Im not saying what you posted isn't great, what im saying is that it might seem easy for a person as experienced as you, but to me things just got even scarier, what i really want to learn is the basics of how it all works, instead of a library that will help me through it ( dont know if that makes sense), or maybe just learn the basics in some kind of introductory way like the most basic tutorial for it, before i get to go deeper on those libraries.   thank you a lot though
  11. CarlosMartinez

    web browser game development

    so i have the basics of programming and "visual" web development (i mean i can make things look the way i want them).     the reason im posting here is because i want to learn how to make real time browser games, without using flash, i want to use the tools that come with the browser itself like php, javascript, html5 etc...    i have some general questions and some specific questions, so lets start with the general ones:   general questions:   1- do you know about a good book that will get me on the right track, specially on the networking part.   2- what is a good way that you would recommend to interact with the database in real time, or interact with other players, i can load stuff from databases and write on them, but usually when i use php to manipulate databases, it requires a submit button to send data to the server, so i would like to know if there is a way to do this without leaving the current page, like with javascript but accessing the actual server.   3- even tho i have knowledge of programming, i have pretty much nothing when it comes to networking, how would it work?, (like the log in stuff, to get the user and have him play against or with other users in real time), that part sounds really scary to me, but hopefully its not THAT hard. so yeah, how would it work?    specific questions:   4- lets say i want to have a battle between 2 users, each one of them will have 3 characters, and each character wil have 3 different spells, is it a good thing to have every available character and every available spell in the database?   5- (only if the anwer of #4 is yes), then alright, each character in the database will have data like hp, mana, items and pretty much numeric stuff, but it will also have 3 spells, those spells would have complex effects that i cant just put in numbers in the database, so how would it work?, lets say one of the spells should hit one of the enemies for 50 hp, and then break that 50hp and give each of the teammates 50% of that as a shield (25 & 25 with 2 teammates), how would i put all that effect in a database? and how would i use it?       well thats pretty much all i need, feel free to answer even if you cant answer all of the questions, also note that the most important of those for me is #3, because i dont have any kind of experience or basics on that field, so any help will be appreciated, thanks a lot.
  12. CarlosMartinez

    HTML 5 Canvas game programming

    i tried it already and it was even worse, i just hid the cursor, you should be able to test it now and see what i mean.
  13. CarlosMartinez

    HTML 5 Canvas game programming

    so i want to start testing the capabilities of the canvas element of html 5, i already got a couple books on the subject, but i like to code my own stuff, i quickly reached a point where i just had to post here asking for help. so the thing is, im trying to code a game like Arkanoid, as i think its a game that will test the stuff i need tested on canvas. so im going to assume you are familiar with Arkanoid games, and im going to show you the problem im having: as you can see in this flash game: http://www.2flashgames.com/fullscreen.php?id=4695.htm the player bar movement is really sharp, it follows the mouse like immediately, no delay, almost no flickring. in my attempt on canvas: http://parkamoid.webatu.com/ it takes a small delay for the bar to reach the mouse position, i have tried a lot of stuff trying to fix the issue, but i just cant figure out the reason. so any suggestions?
  14. It is not your aptitude but your attitude that determines your altitude.
  15. CarlosMartinez

    isometric maps question

    im going to try it out and post here the results, but i have a question, what is the mouse offset? im working on a set 800x600 canvas and i can't click anywhere else, so i dont understand how would that mouse offset work, im actually working with a tile offset which is completely different because well, if tiles are out of the screen then i need to scroll and then i get it repainted but not starting on 0,0 so thats my offset.
  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!