Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 June, 2013, 11:25:18 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1] 2 3 ... 5   Go Down
  Print  
Author Topic: Pacman Nspire -  (Read 4187 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
pianoman
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 20 October, 2011, 04:23:28
Date Registered: 21 May, 2011, 19:13:57
Location: You can know that my current velocity is about 0 m/s.
Posts: 427


Topic starter
Total Post Ratings: +24

View Profile
« on: 08 July, 2011, 19:35:13 »
+2

Hi, everyone!
I figured it was time that this game came to the nspire in Lua, so I decided to start it.
I'm still working on the movement of Pacman and the ghosts, but I thought it through, and it seems like it would be possible.
If anyone would like to attach any maps (not too big), I might use them in the game.
That would be very helpful.
I'll keep you all posted (pun intended) on progress.
Thanks!
Logged

Stefan Bauwens
Creator of Myst 89 - סטיבן
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Today at 10:11:37
Date Registered: 25 February, 2011, 15:41:10
Location: Belgium
Posts: 1747


Total Post Ratings: +135

View Profile WWW
« Reply #1 on: 08 July, 2011, 19:53:04 »
0

Good Luck!
Logged












 
Take my Calculator Quiz|Member map|A useful tool|Would you be interested in an European calculator community meeting?
Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Online Online

Gender: Male
Last Login: Today at 11:19:08
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1736


Total Post Ratings: +180

View Profile WWW
« Reply #2 on: 08 July, 2011, 20:33:19 »
0

Good luck pianoman!

I know its kinda hard to make this game in Lua, because you will need to do lots of calculations and screen refreshes, so I hope that it will work out!
Logged

pianoman
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 20 October, 2011, 04:23:28
Date Registered: 21 May, 2011, 19:13:57
Location: You can know that my current velocity is about 0 m/s.
Posts: 427


Topic starter
Total Post Ratings: +24

View Profile
« Reply #3 on: 08 July, 2011, 20:34:28 »
0

Thanks! It will be a lot of screen refreshes, but I suppose that's one advantage of event-based languages Smiley
Logged

Art_of_camelot
The matrix has you.. ಠ_ಠ
Support Staff
LV12 Extreme Poster (Next: 5000)
*
Online Online

Last Login: Today at 11:18:50
Date Registered: 30 August, 2008, 04:55:55
Location: Dr. Light's Laboratory
Posts: 4507


Total Post Ratings: +154

View Profile WWW
« Reply #4 on: 09 July, 2011, 14:23:47 »
0

Sounds cool, and like it might work decently for Lua. Question: are you going to have stages full screen or are you going to allow them to be larger than the screen and scroll (this would be relevant for people making stages for you Smiley)? Personally, I think it might be easier if you just do them full screen and avoid scrolling.
« Last Edit: 09 July, 2011, 14:24:35 by Art_of_camelot » Logged

Projects:
TBA! Coming to an 83+ near you!

NerdTests.com says I'm a Cool Nerd King.  Click here to take the Nerd Test, get nerdy images and jokes, and write on the nerd forum!


pianoman
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 20 October, 2011, 04:23:28
Date Registered: 21 May, 2011, 19:13:57
Location: You can know that my current velocity is about 0 m/s.
Posts: 427


Topic starter
Total Post Ratings: +24

View Profile
« Reply #5 on: 09 July, 2011, 18:33:27 »
0

Yeah, I was planning on full screen.
I might open up a thread on that later. Tongue
Logged

adriweb
Editor
LV9 Veteran (Next: 1337)
*
Offline Offline

Gender: Male
Last Login: 14 June, 2013, 17:56:38
Date Registered: 13 April, 2011, 18:42:59
Location: South of France
Posts: 1202


Total Post Ratings: +186

View Profile WWW
« Reply #6 on: 09 July, 2011, 18:36:20 »
0

About the screen refresh, don't forget the optional parameters of platform.window:invalidate()

( platform.window:invalidate([x, y, width, height]) )

That refreshed only the part of the screen you want Wink



PS : avoiding scrolling is always easier and faster to do Tongue
« Last Edit: 09 July, 2011, 18:37:09 by adriweb » Logged


TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation
pianoman
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 20 October, 2011, 04:23:28
Date Registered: 21 May, 2011, 19:13:57
Location: You can know that my current velocity is about 0 m/s.
Posts: 427


Topic starter
Total Post Ratings: +24

View Profile
« Reply #7 on: 09 July, 2011, 18:41:56 »
0

Yeah, I'll be using oclua to test out some stuff like that before i hit the computer with it Tongue
Logged

apcalc
The Game
Coder Of Tomorrow
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 01:30:47
Date Registered: 20 March, 2010, 16:31:47
Location: 2003 UB313
Posts: 1393


Total Post Ratings: +118

View Profile
« Reply #8 on: 09 July, 2011, 19:25:44 »
0

This sounds quite interesting, I wish you the best of luck with development on this project! Smiley
Logged


Levak
LV8 Addict (Next: 1000)
********
Online Online

Gender: Male
Last Login: Today at 11:09:43
Date Registered: 04 April, 2010, 23:42:49
Location: France
Posts: 858


Total Post Ratings: +150

View Profile WWW
« Reply #9 on: 09 July, 2011, 20:06:11 »
0

About the screen refresh, don't forget the optional parameters of platform.window:invalidate()

( platform.window:invalidate([x, y, width, height]) )

That refreshed only the part of the screen you want Wink


This hasn't been tested as a bench, but I don't think that it's as faster as without argument.
There is two way of mind :

 - The on.paint(gc) is the user part of drawing the screen. Thus, the concerned shapes are drawn with a condition in all the gc:draw/fill routines. That will slow the entire process with a, most of the time, useless condition.

 - The on.paint(gc) fills the entire buffer without condition. When there is a specified condition, we apply a fusion mask to overlay the new buffer with the old screen. This is even faster when there is no condition, slower when there is one.

Thus, two ways of mind that have their avantages. I think a full bench will reveal which method is used, but I'm pretty sure it is the second one, so it is slower to draw a specified part of the screen.
Logged

Human always wants to survive and that's why he will fall one day.
My website - TI-Planet - iNspired-Lua
adriweb
Editor
LV9 Veteran (Next: 1337)
*
Offline Offline

Gender: Male
Last Login: 14 June, 2013, 17:56:38
Date Registered: 13 April, 2011, 18:42:59
Location: South of France
Posts: 1202


Total Post Ratings: +186

View Profile WWW
« Reply #10 on: 09 July, 2011, 20:22:39 »
0

Well we'd have to test that Smiley

But then why would TI do such a thing ... ><
Logged


TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Online Online

Gender: Male
Last Login: Today at 11:19:08
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1736


Total Post Ratings: +180

View Profile WWW
« Reply #11 on: 09 July, 2011, 21:38:35 »
0

Well, I'm developing a game (not saying the name :p) and the extra parameters are really important for me. Now I don't need to redraw all the images on the screen using gc:drawImage (which is slow), and I notice a big speedup. The game will be unplayable without it.
Logged

Levak
LV8 Addict (Next: 1000)
********
Online Online

Gender: Male
Last Login: Today at 11:09:43
Date Registered: 04 April, 2010, 23:42:49
Location: France
Posts: 858


Total Post Ratings: +150

View Profile WWW
« Reply #12 on: 09 July, 2011, 22:35:08 »
0

Well, I'm developing a game (not saying the name :p) and the extra parameters are really important for me. Now I don't need to redraw all the images on the screen using gc:drawImage (which is slow), and I notice a big speedup. The game will be unplayable without it.

Ok, but have you tested without arguments to make a real bench ?
Even if I trust in you, we have to be really sure of this.
« Last Edit: 09 July, 2011, 22:35:24 by Levak » Logged

Human always wants to survive and that's why he will fall one day.
My website - TI-Planet - iNspired-Lua
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Online Online

Gender: Male
Last Login: Today at 11:19:08
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1736


Total Post Ratings: +180

View Profile WWW
« Reply #13 on: 09 July, 2011, 22:53:36 »
0

Well, the thing is that I don't have to draw more images if I use this. Redrawing the screen alone might be faster, but for many games that need images, the combination will be faster. drawImage really can be a bottleneck in programs, and that is why I try to limit using it with redrawing only parts.
« Last Edit: 09 July, 2011, 22:55:03 by jimbauwens » Logged

Levak
LV8 Addict (Next: 1000)
********
Online Online

Gender: Male
Last Login: Today at 11:09:43
Date Registered: 04 April, 2010, 23:42:49
Location: France
Posts: 858


Total Post Ratings: +150

View Profile WWW
« Reply #14 on: 09 July, 2011, 22:55:59 »
0

Well, the thing is that I don't have to draw more images if I use this. Redrawing the screen alone might be faster, but for many games that need images, the combination will be faster. drawImage really can be a bottleneck in programs, and that is why I try to limit using it with redrawing only parts.

But, how can be sure of that ? The on.paint(gc) method is one unique function which cannot be defined for different part of the screen.

We have no proof, except a full bench, that the buffer is filled the same way and then superposed over the old screen, or, if the buffer is drawn locally.

Do you follow me ?
« Last Edit: 09 July, 2011, 22:57:49 by Levak » Logged

Human always wants to survive and that's why he will fall one day.
My website - TI-Planet - iNspired-Lua
Pages: [1] 2 3 ... 5   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 1.077 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.