PDA

View Full Version : camera window


arty-fishL
02-05-2010, 04:57 PM
This could be quite useful for multiplayer games that use the keyboard, so there could be a splitscreen, worlds that would be useful with several views at once, selecting scenes to go to, flat moving pictures etc.

basically this could happen:

- set up a special camera tripod related item.
- make a billboard elsewhere that is linked to that tripod..
- view the live virtual camera view from that tripod on the billboard, even when the actual camera is elsewhere.
- repeat the proccess for more views on one screen.

Note that the billboard pictures move as the items on view from the special camera tripods move.

Edit:
I have made something like it.
Its posted here: Multiple windows (if this link breaks, its over on the share worlds section) (http://www.alice.org/community/showthread.php?p=17088#post17088)
Jython!!!!!!:D

shaydon
02-12-2010, 01:34 AM
can you please upload an example that would be really helpful

x2495iiii
02-12-2010, 02:07 AM
Unfortunately that's just a suggestion, shaydon. It doesn't exist, he's asking for it to be implemented.

shaydon
02-12-2010, 07:43 PM
Unfortunately that's just a suggestion, shaydon. It doesn't exist, he's asking for it to be implemented.

oh ok then
:(

Dameria
02-12-2010, 07:57 PM
Yes I have asked for this exact thing in my "Multiple Cameras" post in the suggestion box. It would be very useful to have a billboard that can have a live feed from another camera in the program.

zonedabone
02-16-2010, 04:34 PM
Actually, I'm working on this right now. One alice application would be the main camera, and a second alice application can be opened for other views.

jediaction
02-16-2010, 05:11 PM
I dont get exactly whats going on. Mabye i can help but i dont udnerstand whats wrong

King Gamer(gorit)
02-16-2010, 05:23 PM
Im doing something similiar zonedabone dang. but whatever Im still doing it.

jediaction
02-16-2010, 06:11 PM
question not answered

x2495iiii
02-16-2010, 06:35 PM
question not answered

Jed, you really need to make a habit of carefully reading previous posts before posting questions like this.

Seriously, it's all explained in the previous posts. Just read them and you'll get your answer.

jediaction
02-16-2010, 07:19 PM
x2495iiii, you have to understand, i do read them, i just dont get it sometimes even though others do, you have to respect that

Niteshifter
02-16-2010, 09:18 PM
If anyone's trying to do this in Jython, then this might help, since I've actually looked at some source code from different programs that do this (to be specific, it was part of the "Portal" source):

Try making the camera render itself on an image such as a billboard.

x2495iiii
02-16-2010, 09:23 PM
This could be quite useful for multiplayer games that use the keyboard, so there could be a splitscreen, worlds that would be useful with several views at once, selecting scenes to go to, flat moving pictures etc.

basically this could happen:

- set up a special camera tripod related item.
- make a billboard elsewhere that is linked to that tripod..
- view the live virtual camera view from that tripod on the billboard, even when the actual camera is elsewhere.
- repeat the proccess for more views on one screen.

Note that the billboard pictures move as the items on view from the special camera tripods move.

His suggestion.

Yes I have asked for this exact thing in my "Multiple Cameras" post in the suggestion box. It would be very useful to have a billboard that can have a live feed from another camera in the program.

His agreement.

Actually, I'm working on this right now. One alice application would be the main camera, and a second alice application can be opened for other views.

His proposal to make the suggestion happen.


What part's confusing?

zarfang8
02-16-2010, 09:58 PM
Actually, I'm working on this right now. One alice application would be the main camera, and a second alice application can be opened for other views.

Do you have a special place in the Alice team, or are do you making another version of alice, like MAMA?

zonedabone
02-16-2010, 10:02 PM
No. There are two alice worlds. You open alice twice, and run each world together. these worlds save the location data in a file. the other program reads this file and moves the target objects to the specified position. Complex in theory, but very simple in practice. Only about 25 lines of jython code. :)

jediaction
02-16-2010, 10:23 PM
When i get the chance on sunday ill do it

arty-fishL
02-17-2010, 10:02 AM
I have made something like it.

Its posted here: Multiple windows (if this link breaks, its over on the share worlds section) (http://www.alice.org/community/showthread.php?p=17088#post17088)

Jython!!!!!!:D

zonedabone
02-17-2010, 04:06 PM
Hey. I already did this, except mine has moving objects! Beat that!

http://www.alice.org/community/showthread.php?p=17049#post17049

I know. It's cool.

KaiChang
02-19-2010, 03:25 PM
that would be cool, for multiplayer games :D

arty-fishL
02-19-2010, 04:04 PM
I was wandering how, if a multiplayer game was to be made, both windows would be controlled at the same time. But then I thought. One window, the window that is in front could recieve all keyboard events and, as long as both players use different keys; say player 1 w,a,s,d and player 2 ^,<,>,v, send certain keyboard commands to the other world(s) so they could proccess them. So one world, the master world, recieves all keyboard events and sends the right ones to the other world(s) and keeps the other ones for itself, therefore iliminating the problem of both worlds not being able to recieve keyboard events at once.

Just sharing my thought, use it if you didn't already think of it, I can't think of what to use it for. What multiplayer games could be made?

jediaction
02-19-2010, 04:19 PM
I see. Thats a big problem. We will just use like variables. W,S,A,D move Player 1 is "player 1" = true. if = false, then dont move him. We will just do that with everyone else too. The host would be able to do whatever they wanted. I would be incharge of making maps and game play. King game (gorit) is incharge of the rofiles and siignals to different worlds. I will help but after the game play.

Dameria
02-19-2010, 04:26 PM
jediaction, what he was saying was a suggestion, not a problem.

It is a good suggestion, but that would only be if we wanted to do co-op. What I think we are leaning more towards is the multiplayer aspect, where we have only 1 window open, but on 2 separate computers. There is no need for a second window once we get the servers up and running.

There is one thing wrong with your idea though (just in case you do decide to make a co-op game): the player2 would only be allowed to click one thing at a time, they would not be able to click the up arrow key, and enter to fire at the same time, because it would be getting saved through a text file, and (although it is not impossible) it would be hard to determine two keyboard inputs at once (although player1 would be able to do it).

arty-fishL
02-19-2010, 04:49 PM
Yeh, I see where your coming from.

Also, see with the online play, how do we stop some sad person from editing the world to create a 'hacked' version that means they could cheat at the online game, like changing a life number variable (or something like that) up to way over the top, or even if that variable was set in game they could add a method that kept changing that variable back up?

jediaction
02-19-2010, 04:55 PM
Yeh, I see where your coming from.

Also, see with the online play, how do we stop some sad person from editing the world to create a 'hacked' version that means they could cheat at the online game, like changing a life number variable (or something like that) up to way over the top, or even if that variable was set in game they could add a method that kept changing that variable back up?


We have had a discussion abotu this and we said there will be a detector to say if someone is hacking. Then we will ban there account.

jediaction, what he was saying was a suggestion, not a problem.

It is a good suggestion, but that would only be if we wanted to do co-op. What I think we are leaning more towards is the multiplayer aspect, where we have only 1 window open, but on 2 separate computers. There is no need for a second window once we get the servers up and running.

There is one thing wrong with your idea though (just in case you do decide to make a co-op game): the player2 would only be allowed to click one thing at a time, they would not be able to click the up arrow key, and enter to fire at the same time, because it would be getting saved through a text file, and (although it is not impossible) it would be hard to determine two keyboard inputs at once (although player1 would be able to do it).


I was looking at it like a problem.

Dameria
02-19-2010, 05:01 PM
Yeh, I see where your coming from.

Also, see with the online play, how do we stop some sad person from editing the world to create a 'hacked' version that means they could cheat at the online game, like changing a life number variable (or something like that) up to way over the top, or even if that variable was set in game they could add a method that kept changing that variable back up?

Yes you are absolutely right arty, hacking would be a serious issue, but I guess for now we just have to continue on just assuming that no one is going to change the code that is already there. We have to learn to walk before we can run (actually make multiplayer work before we worry about potential problems).

In reality though, I don't see a way to stop people from doing it. I however see on a screenshot of the mama program some like "create exe". Could this possibly be used to create a .exe from the Alice world we make? If it is (and I know completely nothing about mama), then we might be able to make the game, and then create a .exe from it and just save that through the internet, then we could all play through the .exe (because it would show no code, therefore nothing for us to change before playing).

If the "create exe" is not what I think it is though, then I see no other way of preventing hacking other than to hack Alice itself and change the code so that the code is not showing when you open the world.

We have had a discussion abotu this and we said there will be a detector to say if someone is hacking. Then we will ban there account.

I think that banning their account is a little too harsh, and should only be done if it is absolutely necessary. I think we should try my idea first, but if it doesn't work then I guess we have no choice but to ban.

I was looking at it like a problem.

But it is not a problem because the multiplayer game will only need 1 window.

jediaction
02-19-2010, 06:27 PM
Yes you are absolutely right arty, hacking would be a serious issue, but I guess for now we just have to continue on just assuming that no one is going to change the code that is already there. We have to learn to walk before we can run (actually make multiplayer work before we worry about potential problems).

In reality though, I don't see a way to stop people from doing it. I however see on a screenshot of the mama program some like "create exe". Could this possibly be used to create a .exe from the Alice world we make? If it is (and I know completely nothing about mama), then we might be able to make the game, and then create a .exe from it and just save that through the internet, then we could all play through the .exe (because it would show no code, therefore nothing for us to change before playing).

If the "create exe" is not what I think it is though, then I see no other way of preventing hacking other than to hack Alice itself and change the code so that the code is not showing when you open the world.



I think that banning their account is a little too harsh, and should only be done if it is absolutely necessary. I think we should try my idea first, but if it doesn't work then I guess we have no choice but to ban.

exe. is the future. Start easy first

Dameria
02-19-2010, 06:37 PM
Yes but does mama's "create exe" work properly yet? Or is it still buggy? I have never used mama.

x2495iiii
02-19-2010, 11:39 PM
It works pretty well, but it's not perfect yet. You can play RP3 as an exe file, for example, but several small things have been changed, like the fonts of the 3d texts, the counters not working, and stuff like that.

Also, for the multiplayer world thingy, why don't you create it so that vital things, like life numbers, are saved with the data that's on the server (that only you can access) and read to each user's account when they load it. It'd be a lot of text, but text files are small.

Or you could use a jython script to read vital variable values in the game (and/or methods that alter them) and check them against a static list and determine if the user is trying to cheat based off of the results of the comparison.

arty-fishL
02-20-2010, 02:37 PM
It works pretty well, but it's not perfect yet. You can play RP3 as an exe file, for example, but several small things have been changed, like the fonts of the 3d texts, the counters not working, and stuff like that.

I just tried Mama and I still prefer Alice, if I was to use it I would just use it for the object modeller that doesn't need to take ages to convert and the exe export. The scripting thing is also different, with all Python being called from methods and no scripting done in the edit script bit (or I just I can't find that bit) and no command bar, it is quite annoying.

Is there any other way to import alice files rather than renaming them from a2w to mam, this works, but not without problems, ?

x2495iiii
02-20-2010, 03:45 PM
You're supposed to do it inside Mama by clicking Tools>Import Alice World.

KaiChang
02-22-2010, 09:25 AM
ill make a simple racing game, including 1 player or 2 player options. Post it when its done, might be a while b/c of school.

jediaction
02-22-2010, 12:16 PM
Cant wait. Im going to make a city game where you walk around a city and chat

meirs
02-22-2010, 02:54 PM
First of all, I really liked to read this thread, it gives me lots of ideas about future extensions to Mama.

I just tried Mama and I still prefer Alice, if I was to use it I would just use it for the object modeller that doesn't need to take ages to convert and the exe export. The scripting thing is also different, with all Python being called from methods and no scripting done in the edit script bit (or I just I can't find that bit) and no command bar, it is quite annoying.
?
Mama does support free scripting within a separate window and with syntax highlight. I just released version 1.5.2, which improves the configuration - added instructor/administrator config.txt file which dominates the user config.xml file.

So to enable scripting simply edit config.txt within Mama root folder, uncomment the line containing the variable 'enableFreeScripting' and set it's value to true. On the next run you'll see a new button - 'program' - added at the bottom of the editor window. Pressing that button will open a window for writing a free Mama script with syntax highlight. On world start that script will be ran.

Mama language is pretty similar to Python - in the coming days I will add to the documentation (en.eytam.com/mama/doc) a guide for scripting.

meirs
02-22-2010, 04:28 PM
Yes but does mama's "create exe" work properly yet? Or is it still buggy? I have never used mama.

Mama is quite stable, and the "create exe" is stable as well. I put a lot of effort into the stability of the whole system, since as a programmer I know how important is the reliability of a development tool.

Dameria
02-22-2010, 05:02 PM
The only reason why I am hesitant about downloading mama is because I hear that when you create a world it saves it as something different than .a2w? I want to be able to post my worlds on this forum, and I don't know if that would conflict with me being able to do so (would other people be able to play my "Mama" created worlds in Alice 2.2?)

Also, if I were to create a .exe, would I be able to upload that to the internet so people can download and play on Alice 2.2? Or would you need neither Alice or Mama in order to play it? With .exe, will the people playing be able to see the script, or will it only play the game? It would be great if it did not show script and did not require Mama to play it, then we could create anti-cheating online games.

meirs
02-22-2010, 05:37 PM
You can run Alice worlds within Mama, but not the other way. Mama worlds contain additional information not understood by Alice.

Once you create standalone exe file with Mama, you don't need any of Mama or Alice - that's the meaning of standalone. And yes, you can put it anywhere you like, let other download it - and they would be able to run it.

Dameria
02-22-2010, 06:13 PM
And there would be absolutely no way (or almost no way) for them to change the code within it? If so then this is exactly what we need for the jython scripting that is being planned in order to prevent cheating...

jediaction
02-22-2010, 06:46 PM
Exactly. Thats what we said, oh and does anyone know how to bring in a pictrue into alice thats like not a square like DOTA. How did you make the title weith the cool red text? It was half transparent

Dameria
02-22-2010, 06:51 PM
Exactly. Thats what we said, oh and does anyone know how to bring in a pictrue into alice thats like not a square like DOTA. How did you make the title weith the cool red text? It was half transparent

Jediaction, I said that before, not anyone else. I am pretty sure I came up with that idea. Also, what do you mean bring a picture into Alice? Do you mean like the fire animation where it is a 2D picture? Ask x2495iiii i think he knows how to do that stuff.

jediaction
02-22-2010, 08:18 PM
I dont know how to bring in a half transparent pictrue like a """""not square""""" picture. Chris knows

meirs
02-23-2010, 01:41 AM
And there would be absolutely no way (or almost no way) for them to change the code within it? If so then this is exactly what we need for the jython scripting that is being planned in order to prevent cheating...
That I cannot assure, since it is possible to extract the world file from the executable package, and then open it with normal Mama IDE. If that will be an important issue, I'll make it as an RFE (request for enhancement) for the next version.

Niteshifter
02-23-2010, 02:01 AM
Right now, I don't think you can stop people from accessing the code to cheat in games, but what you can do in Jython is obfuscate* the code so that it's not worth it to the people who just go in to cheat the game.

*The main problem with this though is the person doing the code has to have a lot of experience in the string manipulation side of the language as well as Alice also has it's limitations with Jython as well, although it isn't all that much.

You could also use this obfuscated code to send in a useless method to check if the game had been modified or not (if the method was sent, then do nothing, else, the game was modified), but once again, it uses a lot of experience with string manipulation.

zonedabone
03-01-2010, 09:06 PM
Possibly, if the game runs with an online server, the server can verify things, and sort of run each game. THis would of course require accounts to be stroed online. (OOH!!!!:p)

Dameria
03-01-2010, 09:12 PM
Can you just store vital variables like health, ammo, speed, and such within the online server, and then call it into the world as you make the methods? This might not be possible, and even if it was it might slow down the worlds considerably, but I don't know, maybe its worth a shot.

Well anyway lets stop talking about anti-cheating until we can actually get a working online game done through the servers first!!!

jediaction
03-02-2010, 05:54 PM
Right now, I don't think you can stop people from accessing the code to cheat in games, but what you can do in Jython is obfuscate* the code so that it's not worth it to the people who just go in to cheat the game.

*The main problem with this though is the person doing the code has to have a lot of experience in the string manipulation side of the language as well as Alice also has it's limitations with Jython as well, although it isn't all that much.

You could also use this obfuscated code to send in a useless method to check if the game had been modified or not (if the method was sent, then do nothing, else, the game was modified), but once again, it uses a lot of experience with string manipulation.

The whole game would have to be in jython code. King Gamer, did you make that sample 2 player game yet that can run on two different alices with moving objects? Oh yah, where is the post that has the type in a text and it pops up on the other alice, i want that again